diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2011-03-07 08:59:19 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-03-09 19:03:58 -0500 |
commit | 712d5d799a0e099437fc4dd42058a33d4fc37882 (patch) | |
tree | 7d2b3ebf5d03afc2cdb1c96492be3e4a9004ce96 | |
parent | e4891eb0ee3e35e9c3b4125b93a45d7901a82e57 (diff) |
powerpc: platforms/85xx irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/85xx/ksi8560.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/sbc8560.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 40 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/stx_gp3.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/tqm85xx.c | 3 |
7 files changed, 32 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/85xx/ksi8560.c b/arch/powerpc/platforms/85xx/ksi8560.c index f4d36b5a2e0..64447e48f3d 100644 --- a/arch/powerpc/platforms/85xx/ksi8560.c +++ b/arch/powerpc/platforms/85xx/ksi8560.c | |||
@@ -56,12 +56,13 @@ static void machine_restart(char *cmd) | |||
56 | 56 | ||
57 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 57 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
58 | { | 58 | { |
59 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
59 | int cascade_irq; | 60 | int cascade_irq; |
60 | 61 | ||
61 | while ((cascade_irq = cpm2_get_irq()) >= 0) | 62 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
62 | generic_handle_irq(cascade_irq); | 63 | generic_handle_irq(cascade_irq); |
63 | 64 | ||
64 | desc->chip->eoi(irq); | 65 | chip->irq_eoi(&desc->irq_data); |
65 | } | 66 | } |
66 | 67 | ||
67 | static void __init ksi8560_pic_init(void) | 68 | static void __init ksi8560_pic_init(void) |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 9438a892afc..1352d1107bf 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -50,12 +50,13 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, | |||
50 | 50 | ||
51 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 51 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
52 | { | 52 | { |
53 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
53 | int cascade_irq; | 54 | int cascade_irq; |
54 | 55 | ||
55 | while ((cascade_irq = cpm2_get_irq()) >= 0) | 56 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
56 | generic_handle_irq(cascade_irq); | 57 | generic_handle_irq(cascade_irq); |
57 | 58 | ||
58 | desc->chip->eoi(irq); | 59 | chip->irq_eoi(&desc->irq_data); |
59 | } | 60 | } |
60 | 61 | ||
61 | #endif /* CONFIG_CPM2 */ | 62 | #endif /* CONFIG_CPM2 */ |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 8190bc25bf2..793ead7993a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -47,12 +47,13 @@ | |||
47 | #ifdef CONFIG_PPC_I8259 | 47 | #ifdef CONFIG_PPC_I8259 |
48 | static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) | 48 | static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) |
49 | { | 49 | { |
50 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
50 | unsigned int cascade_irq = i8259_irq(); | 51 | unsigned int cascade_irq = i8259_irq(); |
51 | 52 | ||
52 | if (cascade_irq != NO_IRQ) { | 53 | if (cascade_irq != NO_IRQ) { |
53 | generic_handle_irq(cascade_irq); | 54 | generic_handle_irq(cascade_irq); |
54 | } | 55 | } |
55 | desc->chip->eoi(irq); | 56 | chip->irq_eoi(&desc->irq_data); |
56 | } | 57 | } |
57 | #endif /* CONFIG_PPC_I8259 */ | 58 | #endif /* CONFIG_PPC_I8259 */ |
58 | 59 | ||
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c index a5ad1c7794b..d7e28ec3e07 100644 --- a/arch/powerpc/platforms/85xx/sbc8560.c +++ b/arch/powerpc/platforms/85xx/sbc8560.c | |||
@@ -41,12 +41,13 @@ | |||
41 | 41 | ||
42 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 42 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
43 | { | 43 | { |
44 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
44 | int cascade_irq; | 45 | int cascade_irq; |
45 | 46 | ||
46 | while ((cascade_irq = cpm2_get_irq()) >= 0) | 47 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
47 | generic_handle_irq(cascade_irq); | 48 | generic_handle_irq(cascade_irq); |
48 | 49 | ||
49 | desc->chip->eoi(irq); | 50 | chip->irq_eoi(&desc->irq_data); |
50 | } | 51 | } |
51 | 52 | ||
52 | #endif /* CONFIG_CPM2 */ | 53 | #endif /* CONFIG_CPM2 */ |
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c index d48527ffc42..79d85aca476 100644 --- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c +++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c | |||
@@ -93,6 +93,7 @@ static inline unsigned int socrates_fpga_pic_get_irq(unsigned int irq) | |||
93 | 93 | ||
94 | void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) | 94 | void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) |
95 | { | 95 | { |
96 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
96 | unsigned int cascade_irq; | 97 | unsigned int cascade_irq; |
97 | 98 | ||
98 | /* | 99 | /* |
@@ -103,17 +104,16 @@ void socrates_fpga_pic_cascade(unsigned int irq, struct irq_desc *desc) | |||
103 | 104 | ||
104 | if (cascade_irq != NO_IRQ) | 105 | if (cascade_irq != NO_IRQ) |
105 | generic_handle_irq(cascade_irq); | 106 | generic_handle_irq(cascade_irq); |
106 | desc->chip->eoi(irq); | 107 | chip->irq_eoi(&desc->irq_data); |
107 | |||
108 | } | 108 | } |
109 | 109 | ||
110 | static void socrates_fpga_pic_ack(unsigned int virq) | 110 | static void socrates_fpga_pic_ack(struct irq_data *d) |
111 | { | 111 | { |
112 | unsigned long flags; | 112 | unsigned long flags; |
113 | unsigned int hwirq, irq_line; | 113 | unsigned int hwirq, irq_line; |
114 | uint32_t mask; | 114 | uint32_t mask; |
115 | 115 | ||
116 | hwirq = socrates_fpga_irq_to_hw(virq); | 116 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
117 | 117 | ||
118 | irq_line = fpga_irqs[hwirq].irq_line; | 118 | irq_line = fpga_irqs[hwirq].irq_line; |
119 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); | 119 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); |
@@ -124,14 +124,14 @@ static void socrates_fpga_pic_ack(unsigned int virq) | |||
124 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); | 124 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); |
125 | } | 125 | } |
126 | 126 | ||
127 | static void socrates_fpga_pic_mask(unsigned int virq) | 127 | static void socrates_fpga_pic_mask(struct irq_data *d) |
128 | { | 128 | { |
129 | unsigned long flags; | 129 | unsigned long flags; |
130 | unsigned int hwirq; | 130 | unsigned int hwirq; |
131 | int irq_line; | 131 | int irq_line; |
132 | u32 mask; | 132 | u32 mask; |
133 | 133 | ||
134 | hwirq = socrates_fpga_irq_to_hw(virq); | 134 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
135 | 135 | ||
136 | irq_line = fpga_irqs[hwirq].irq_line; | 136 | irq_line = fpga_irqs[hwirq].irq_line; |
137 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); | 137 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); |
@@ -142,14 +142,14 @@ static void socrates_fpga_pic_mask(unsigned int virq) | |||
142 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); | 142 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); |
143 | } | 143 | } |
144 | 144 | ||
145 | static void socrates_fpga_pic_mask_ack(unsigned int virq) | 145 | static void socrates_fpga_pic_mask_ack(struct irq_data *d) |
146 | { | 146 | { |
147 | unsigned long flags; | 147 | unsigned long flags; |
148 | unsigned int hwirq; | 148 | unsigned int hwirq; |
149 | int irq_line; | 149 | int irq_line; |
150 | u32 mask; | 150 | u32 mask; |
151 | 151 | ||
152 | hwirq = socrates_fpga_irq_to_hw(virq); | 152 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
153 | 153 | ||
154 | irq_line = fpga_irqs[hwirq].irq_line; | 154 | irq_line = fpga_irqs[hwirq].irq_line; |
155 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); | 155 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); |
@@ -161,14 +161,14 @@ static void socrates_fpga_pic_mask_ack(unsigned int virq) | |||
161 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); | 161 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); |
162 | } | 162 | } |
163 | 163 | ||
164 | static void socrates_fpga_pic_unmask(unsigned int virq) | 164 | static void socrates_fpga_pic_unmask(struct irq_data *d) |
165 | { | 165 | { |
166 | unsigned long flags; | 166 | unsigned long flags; |
167 | unsigned int hwirq; | 167 | unsigned int hwirq; |
168 | int irq_line; | 168 | int irq_line; |
169 | u32 mask; | 169 | u32 mask; |
170 | 170 | ||
171 | hwirq = socrates_fpga_irq_to_hw(virq); | 171 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
172 | 172 | ||
173 | irq_line = fpga_irqs[hwirq].irq_line; | 173 | irq_line = fpga_irqs[hwirq].irq_line; |
174 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); | 174 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); |
@@ -179,14 +179,14 @@ static void socrates_fpga_pic_unmask(unsigned int virq) | |||
179 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); | 179 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); |
180 | } | 180 | } |
181 | 181 | ||
182 | static void socrates_fpga_pic_eoi(unsigned int virq) | 182 | static void socrates_fpga_pic_eoi(struct irq_data *d) |
183 | { | 183 | { |
184 | unsigned long flags; | 184 | unsigned long flags; |
185 | unsigned int hwirq; | 185 | unsigned int hwirq; |
186 | int irq_line; | 186 | int irq_line; |
187 | u32 mask; | 187 | u32 mask; |
188 | 188 | ||
189 | hwirq = socrates_fpga_irq_to_hw(virq); | 189 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
190 | 190 | ||
191 | irq_line = fpga_irqs[hwirq].irq_line; | 191 | irq_line = fpga_irqs[hwirq].irq_line; |
192 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); | 192 | raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); |
@@ -197,7 +197,7 @@ static void socrates_fpga_pic_eoi(unsigned int virq) | |||
197 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); | 197 | raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); |
198 | } | 198 | } |
199 | 199 | ||
200 | static int socrates_fpga_pic_set_type(unsigned int virq, | 200 | static int socrates_fpga_pic_set_type(struct irq_data *d, |
201 | unsigned int flow_type) | 201 | unsigned int flow_type) |
202 | { | 202 | { |
203 | unsigned long flags; | 203 | unsigned long flags; |
@@ -205,7 +205,7 @@ static int socrates_fpga_pic_set_type(unsigned int virq, | |||
205 | int polarity; | 205 | int polarity; |
206 | u32 mask; | 206 | u32 mask; |
207 | 207 | ||
208 | hwirq = socrates_fpga_irq_to_hw(virq); | 208 | hwirq = socrates_fpga_irq_to_hw(d->irq); |
209 | 209 | ||
210 | if (fpga_irqs[hwirq].type != IRQ_TYPE_NONE) | 210 | if (fpga_irqs[hwirq].type != IRQ_TYPE_NONE) |
211 | return -EINVAL; | 211 | return -EINVAL; |
@@ -233,12 +233,12 @@ static int socrates_fpga_pic_set_type(unsigned int virq, | |||
233 | 233 | ||
234 | static struct irq_chip socrates_fpga_pic_chip = { | 234 | static struct irq_chip socrates_fpga_pic_chip = { |
235 | .name = "FPGA-PIC", | 235 | .name = "FPGA-PIC", |
236 | .ack = socrates_fpga_pic_ack, | 236 | .irq_ack = socrates_fpga_pic_ack, |
237 | .mask = socrates_fpga_pic_mask, | 237 | .irq_mask = socrates_fpga_pic_mask, |
238 | .mask_ack = socrates_fpga_pic_mask_ack, | 238 | .irq_mask_ack = socrates_fpga_pic_mask_ack, |
239 | .unmask = socrates_fpga_pic_unmask, | 239 | .irq_unmask = socrates_fpga_pic_unmask, |
240 | .eoi = socrates_fpga_pic_eoi, | 240 | .irq_eoi = socrates_fpga_pic_eoi, |
241 | .set_type = socrates_fpga_pic_set_type, | 241 | .irq_set_type = socrates_fpga_pic_set_type, |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq, | 244 | static int socrates_fpga_pic_host_map(struct irq_host *h, unsigned int virq, |
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c index bc33d1859ae..2b62b064eac 100644 --- a/arch/powerpc/platforms/85xx/stx_gp3.c +++ b/arch/powerpc/platforms/85xx/stx_gp3.c | |||
@@ -46,12 +46,13 @@ | |||
46 | 46 | ||
47 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 47 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
48 | { | 48 | { |
49 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
49 | int cascade_irq; | 50 | int cascade_irq; |
50 | 51 | ||
51 | while ((cascade_irq = cpm2_get_irq()) >= 0) | 52 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
52 | generic_handle_irq(cascade_irq); | 53 | generic_handle_irq(cascade_irq); |
53 | 54 | ||
54 | desc->chip->eoi(irq); | 55 | chip->irq_eoi(&desc->irq_data); |
55 | } | 56 | } |
56 | #endif /* CONFIG_CPM2 */ | 57 | #endif /* CONFIG_CPM2 */ |
57 | 58 | ||
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index 5e847d0b47c..2265b68e327 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -44,12 +44,13 @@ | |||
44 | 44 | ||
45 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) | 45 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) |
46 | { | 46 | { |
47 | struct irq_chip *chip = get_irq_desc_chip(desc); | ||
47 | int cascade_irq; | 48 | int cascade_irq; |
48 | 49 | ||
49 | while ((cascade_irq = cpm2_get_irq()) >= 0) | 50 | while ((cascade_irq = cpm2_get_irq()) >= 0) |
50 | generic_handle_irq(cascade_irq); | 51 | generic_handle_irq(cascade_irq); |
51 | 52 | ||
52 | desc->chip->eoi(irq); | 53 | chip->irq_eoi(&desc->irq_data); |
53 | } | 54 | } |
54 | #endif /* CONFIG_CPM2 */ | 55 | #endif /* CONFIG_CPM2 */ |
55 | 56 | ||