aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/locomo.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/common/locomo.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/common/locomo.c')
-rw-r--r--arch/arm/common/locomo.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 9dff07c80ddb..b55c3625d7ee 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -140,11 +140,11 @@ static struct locomo_dev_info locomo_devices[] = {
140 140
141static void locomo_handler(unsigned int irq, struct irq_desc *desc) 141static void locomo_handler(unsigned int irq, struct irq_desc *desc)
142{ 142{
143 struct locomo *lchip = get_irq_chip_data(irq); 143 struct locomo *lchip = irq_get_chip_data(irq);
144 int req, i; 144 int req, i;
145 145
146 /* Acknowledge the parent IRQ */ 146 /* Acknowledge the parent IRQ */
147 desc->chip->ack(irq); 147 desc->irq_data.chip->irq_ack(&desc->irq_data);
148 148
149 /* check why this interrupt was generated */ 149 /* check why this interrupt was generated */
150 req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00; 150 req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00;
@@ -161,33 +161,33 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
161 } 161 }
162} 162}
163 163
164static void locomo_ack_irq(unsigned int irq) 164static void locomo_ack_irq(struct irq_data *d)
165{ 165{
166} 166}
167 167
168static void locomo_mask_irq(unsigned int irq) 168static void locomo_mask_irq(struct irq_data *d)
169{ 169{
170 struct locomo *lchip = get_irq_chip_data(irq); 170 struct locomo *lchip = irq_data_get_irq_chip_data(d);
171 unsigned int r; 171 unsigned int r;
172 r = locomo_readl(lchip->base + LOCOMO_ICR); 172 r = locomo_readl(lchip->base + LOCOMO_ICR);
173 r &= ~(0x0010 << (irq - lchip->irq_base)); 173 r &= ~(0x0010 << (d->irq - lchip->irq_base));
174 locomo_writel(r, lchip->base + LOCOMO_ICR); 174 locomo_writel(r, lchip->base + LOCOMO_ICR);
175} 175}
176 176
177static void locomo_unmask_irq(unsigned int irq) 177static void locomo_unmask_irq(struct irq_data *d)
178{ 178{
179 struct locomo *lchip = get_irq_chip_data(irq); 179 struct locomo *lchip = irq_data_get_irq_chip_data(d);
180 unsigned int r; 180 unsigned int r;
181 r = locomo_readl(lchip->base + LOCOMO_ICR); 181 r = locomo_readl(lchip->base + LOCOMO_ICR);
182 r |= (0x0010 << (irq - lchip->irq_base)); 182 r |= (0x0010 << (d->irq - lchip->irq_base));
183 locomo_writel(r, lchip->base + LOCOMO_ICR); 183 locomo_writel(r, lchip->base + LOCOMO_ICR);
184} 184}
185 185
186static struct irq_chip locomo_chip = { 186static struct irq_chip locomo_chip = {
187 .name = "LOCOMO", 187 .name = "LOCOMO",
188 .ack = locomo_ack_irq, 188 .irq_ack = locomo_ack_irq,
189 .mask = locomo_mask_irq, 189 .irq_mask = locomo_mask_irq,
190 .unmask = locomo_unmask_irq, 190 .irq_unmask = locomo_unmask_irq,
191}; 191};
192 192
193static void locomo_setup_irq(struct locomo *lchip) 193static void locomo_setup_irq(struct locomo *lchip)
@@ -197,15 +197,14 @@ static void locomo_setup_irq(struct locomo *lchip)
197 /* 197 /*
198 * Install handler for IRQ_LOCOMO_HW. 198 * Install handler for IRQ_LOCOMO_HW.
199 */ 199 */
200 set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING); 200 irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING);
201 set_irq_chip_data(lchip->irq, lchip); 201 irq_set_chip_data(lchip->irq, lchip);
202 set_irq_chained_handler(lchip->irq, locomo_handler); 202 irq_set_chained_handler(lchip->irq, locomo_handler);
203 203
204 /* Install handlers for IRQ_LOCOMO_* */ 204 /* Install handlers for IRQ_LOCOMO_* */
205 for ( ; irq <= lchip->irq_base + 3; irq++) { 205 for ( ; irq <= lchip->irq_base + 3; irq++) {
206 set_irq_chip(irq, &locomo_chip); 206 irq_set_chip_and_handler(irq, &locomo_chip, handle_level_irq);
207 set_irq_chip_data(irq, lchip); 207 irq_set_chip_data(irq, lchip);
208 set_irq_handler(irq, handle_level_irq);
209 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 208 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
210 } 209 }
211} 210}
@@ -476,8 +475,8 @@ static void __locomo_remove(struct locomo *lchip)
476 device_for_each_child(lchip->dev, NULL, locomo_remove_child); 475 device_for_each_child(lchip->dev, NULL, locomo_remove_child);
477 476
478 if (lchip->irq != NO_IRQ) { 477 if (lchip->irq != NO_IRQ) {
479 set_irq_chained_handler(lchip->irq, NULL); 478 irq_set_chained_handler(lchip->irq, NULL);
480 set_irq_data(lchip->irq, NULL); 479 irq_set_handler_data(lchip->irq, NULL);
481 } 480 }
482 481
483 iounmap(lchip->base); 482 iounmap(lchip->base);