diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-11-29 04:38:34 -0500 |
---|---|---|
committer | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-01-13 11:18:49 -0500 |
commit | 9b3ffe523af895f6b969b971079da4c06c2743af (patch) | |
tree | abc106595c1174ae084bae74712a9f4f5d66809f /arch/arm/mach-ns9xxx | |
parent | 4f8d7541b591883ff25ab1e0146f72e533f6183f (diff) |
ARM: ns9xxx: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-ns9xxx')
-rw-r--r-- | arch/arm/mach-ns9xxx/board-a9m9750dev.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-ns9xxx/irq.c | 28 |
2 files changed, 28 insertions, 28 deletions
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c index b45bb3b802f1..0c0d5248c368 100644 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c | |||
@@ -37,44 +37,44 @@ void __init board_a9m9750dev_map_io(void) | |||
37 | ARRAY_SIZE(board_a9m9750dev_io_desc)); | 37 | ARRAY_SIZE(board_a9m9750dev_io_desc)); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void a9m9750dev_fpga_ack_irq(unsigned int irq) | 40 | static void a9m9750dev_fpga_ack_irq(struct irq_data *d) |
41 | { | 41 | { |
42 | /* nothing */ | 42 | /* nothing */ |
43 | } | 43 | } |
44 | 44 | ||
45 | static void a9m9750dev_fpga_mask_irq(unsigned int irq) | 45 | static void a9m9750dev_fpga_mask_irq(struct irq_data *d) |
46 | { | 46 | { |
47 | u8 ier; | 47 | u8 ier; |
48 | 48 | ||
49 | ier = __raw_readb(FPGA_IER); | 49 | ier = __raw_readb(FPGA_IER); |
50 | 50 | ||
51 | ier &= ~(1 << (irq - FPGA_IRQ(0))); | 51 | ier &= ~(1 << (d->irq - FPGA_IRQ(0))); |
52 | 52 | ||
53 | __raw_writeb(ier, FPGA_IER); | 53 | __raw_writeb(ier, FPGA_IER); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void a9m9750dev_fpga_maskack_irq(unsigned int irq) | 56 | static void a9m9750dev_fpga_maskack_irq(struct irq_data *d) |
57 | { | 57 | { |
58 | a9m9750dev_fpga_mask_irq(irq); | 58 | a9m9750dev_fpga_mask_irq(d); |
59 | a9m9750dev_fpga_ack_irq(irq); | 59 | a9m9750dev_fpga_ack_irq(d); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void a9m9750dev_fpga_unmask_irq(unsigned int irq) | 62 | static void a9m9750dev_fpga_unmask_irq(struct irq_data *d) |
63 | { | 63 | { |
64 | u8 ier; | 64 | u8 ier; |
65 | 65 | ||
66 | ier = __raw_readb(FPGA_IER); | 66 | ier = __raw_readb(FPGA_IER); |
67 | 67 | ||
68 | ier |= 1 << (irq - FPGA_IRQ(0)); | 68 | ier |= 1 << (d->irq - FPGA_IRQ(0)); |
69 | 69 | ||
70 | __raw_writeb(ier, FPGA_IER); | 70 | __raw_writeb(ier, FPGA_IER); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct irq_chip a9m9750dev_fpga_chip = { | 73 | static struct irq_chip a9m9750dev_fpga_chip = { |
74 | .ack = a9m9750dev_fpga_ack_irq, | 74 | .irq_ack = a9m9750dev_fpga_ack_irq, |
75 | .mask = a9m9750dev_fpga_mask_irq, | 75 | .irq_mask = a9m9750dev_fpga_mask_irq, |
76 | .mask_ack = a9m9750dev_fpga_maskack_irq, | 76 | .irq_mask_ack = a9m9750dev_fpga_maskack_irq, |
77 | .unmask = a9m9750dev_fpga_unmask_irq, | 77 | .irq_unmask = a9m9750dev_fpga_unmask_irq, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static void a9m9750dev_fpga_demux_handler(unsigned int irq, | 80 | static void a9m9750dev_fpga_demux_handler(unsigned int irq, |
@@ -82,7 +82,7 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq, | |||
82 | { | 82 | { |
83 | u8 stat = __raw_readb(FPGA_ISR); | 83 | u8 stat = __raw_readb(FPGA_ISR); |
84 | 84 | ||
85 | desc->chip->mask_ack(irq); | 85 | desc->irq_data.chip->irq_mask_ack(&desc->irq_data); |
86 | 86 | ||
87 | while (stat != 0) { | 87 | while (stat != 0) { |
88 | int irqno = fls(stat) - 1; | 88 | int irqno = fls(stat) - 1; |
@@ -92,7 +92,7 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq, | |||
92 | generic_handle_irq(FPGA_IRQ(irqno)); | 92 | generic_handle_irq(FPGA_IRQ(irqno)); |
93 | } | 93 | } |
94 | 94 | ||
95 | desc->chip->unmask(irq); | 95 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
96 | } | 96 | } |
97 | 97 | ||
98 | void __init board_a9m9750dev_init_irq(void) | 98 | void __init board_a9m9750dev_init_irq(void) |
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index 038f24d47023..389fa5c669de 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c | |||
@@ -22,40 +22,40 @@ | |||
22 | #define irq2prio(i) (i) | 22 | #define irq2prio(i) (i) |
23 | #define prio2irq(p) (p) | 23 | #define prio2irq(p) (p) |
24 | 24 | ||
25 | static void ns9xxx_mask_irq(unsigned int irq) | 25 | static void ns9xxx_mask_irq(struct irq_data *d) |
26 | { | 26 | { |
27 | /* XXX: better use cpp symbols */ | 27 | /* XXX: better use cpp symbols */ |
28 | int prio = irq2prio(irq); | 28 | int prio = irq2prio(d->irq); |
29 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | 29 | u32 ic = __raw_readl(SYS_IC(prio / 4)); |
30 | ic &= ~(1 << (7 + 8 * (3 - (prio & 3)))); | 30 | ic &= ~(1 << (7 + 8 * (3 - (prio & 3)))); |
31 | __raw_writel(ic, SYS_IC(prio / 4)); | 31 | __raw_writel(ic, SYS_IC(prio / 4)); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void ns9xxx_ack_irq(unsigned int irq) | 34 | static void ns9xxx_ack_irq(struct irq_data *d) |
35 | { | 35 | { |
36 | __raw_writel(0, SYS_ISRADDR); | 36 | __raw_writel(0, SYS_ISRADDR); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void ns9xxx_maskack_irq(unsigned int irq) | 39 | static void ns9xxx_maskack_irq(struct irq_data *d) |
40 | { | 40 | { |
41 | ns9xxx_mask_irq(irq); | 41 | ns9xxx_mask_irq(d); |
42 | ns9xxx_ack_irq(irq); | 42 | ns9xxx_ack_irq(d); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void ns9xxx_unmask_irq(unsigned int irq) | 45 | static void ns9xxx_unmask_irq(struct irq_data *d) |
46 | { | 46 | { |
47 | /* XXX: better use cpp symbols */ | 47 | /* XXX: better use cpp symbols */ |
48 | int prio = irq2prio(irq); | 48 | int prio = irq2prio(d->irq); |
49 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | 49 | u32 ic = __raw_readl(SYS_IC(prio / 4)); |
50 | ic |= 1 << (7 + 8 * (3 - (prio & 3))); | 50 | ic |= 1 << (7 + 8 * (3 - (prio & 3))); |
51 | __raw_writel(ic, SYS_IC(prio / 4)); | 51 | __raw_writel(ic, SYS_IC(prio / 4)); |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct irq_chip ns9xxx_chip = { | 54 | static struct irq_chip ns9xxx_chip = { |
55 | .ack = ns9xxx_ack_irq, | 55 | .irq_ack = ns9xxx_ack_irq, |
56 | .mask = ns9xxx_mask_irq, | 56 | .irq_mask = ns9xxx_mask_irq, |
57 | .mask_ack = ns9xxx_maskack_irq, | 57 | .irq_mask_ack = ns9xxx_maskack_irq, |
58 | .unmask = ns9xxx_unmask_irq, | 58 | .irq_unmask = ns9xxx_unmask_irq, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | #if 0 | 61 | #if 0 |
@@ -92,10 +92,10 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) | |||
92 | 92 | ||
93 | if (desc->status & IRQ_DISABLED) | 93 | if (desc->status & IRQ_DISABLED) |
94 | out_mask: | 94 | out_mask: |
95 | desc->chip->mask(irq); | 95 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
96 | 96 | ||
97 | /* ack unconditionally to unmask lower prio irqs */ | 97 | /* ack unconditionally to unmask lower prio irqs */ |
98 | desc->chip->ack(irq); | 98 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
99 | 99 | ||
100 | raw_spin_unlock(&desc->lock); | 100 | raw_spin_unlock(&desc->lock); |
101 | } | 101 | } |