diff options
| -rw-r--r-- | arch/arm/mach-sa1100/irq.c | 57 |
1 files changed, 11 insertions, 46 deletions
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index 2dc6a2a9c60c..5589b23ed043 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c | |||
| @@ -154,10 +154,10 @@ static int sa1100_gpio_wake(struct irq_data *d, unsigned int on) | |||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | /* | 156 | /* |
| 157 | * This is for IRQs from 0 to 10. | 157 | * This is for GPIO IRQs |
| 158 | */ | 158 | */ |
| 159 | static struct irq_chip sa1100_low_gpio_chip = { | 159 | static struct irq_chip sa1100_gpio_chip = { |
| 160 | .name = "GPIO-l", | 160 | .name = "GPIO", |
| 161 | .irq_ack = sa1100_gpio_ack, | 161 | .irq_ack = sa1100_gpio_ack, |
| 162 | .irq_mask = sa1100_gpio_mask, | 162 | .irq_mask = sa1100_gpio_mask, |
| 163 | .irq_unmask = sa1100_gpio_unmask, | 163 | .irq_unmask = sa1100_gpio_unmask, |
| @@ -165,22 +165,22 @@ static struct irq_chip sa1100_low_gpio_chip = { | |||
| 165 | .irq_set_wake = sa1100_gpio_wake, | 165 | .irq_set_wake = sa1100_gpio_wake, |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | static int sa1100_low_gpio_irqdomain_map(struct irq_domain *d, | 168 | static int sa1100_gpio_irqdomain_map(struct irq_domain *d, |
| 169 | unsigned int irq, irq_hw_number_t hwirq) | 169 | unsigned int irq, irq_hw_number_t hwirq) |
| 170 | { | 170 | { |
| 171 | irq_set_chip_and_handler(irq, &sa1100_low_gpio_chip, | 171 | irq_set_chip_and_handler(irq, &sa1100_gpio_chip, |
| 172 | handle_edge_irq); | 172 | handle_edge_irq); |
| 173 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 173 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
| 174 | 174 | ||
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | static struct irq_domain_ops sa1100_low_gpio_irqdomain_ops = { | 178 | static struct irq_domain_ops sa1100_gpio_irqdomain_ops = { |
| 179 | .map = sa1100_low_gpio_irqdomain_map, | 179 | .map = sa1100_gpio_irqdomain_map, |
| 180 | .xlate = irq_domain_xlate_onetwocell, | 180 | .xlate = irq_domain_xlate_onetwocell, |
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | static struct irq_domain *sa1100_low_gpio_irqdomain; | 183 | static struct irq_domain *sa1100_gpio_irqdomain; |
| 184 | 184 | ||
| 185 | /* | 185 | /* |
| 186 | * IRQ 0-11 (GPIO) handler. We enter here with the | 186 | * IRQ 0-11 (GPIO) handler. We enter here with the |
| @@ -212,37 +212,6 @@ sa1100_gpio_handler(unsigned int irq, struct irq_desc *desc) | |||
| 212 | } while (mask); | 212 | } while (mask); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | /* | ||
| 216 | * Like GPIO0 to 10, GPIO11-27 IRQs need to be handled specially. | ||
| 217 | * In addition, the IRQs are all collected up into one bit in the | ||
| 218 | * interrupt controller registers. | ||
| 219 | */ | ||
| 220 | static struct irq_chip sa1100_high_gpio_chip = { | ||
| 221 | .name = "GPIO-h", | ||
| 222 | .irq_ack = sa1100_gpio_ack, | ||
| 223 | .irq_mask = sa1100_gpio_mask, | ||
| 224 | .irq_unmask = sa1100_gpio_unmask, | ||
| 225 | .irq_set_type = sa1100_gpio_type, | ||
| 226 | .irq_set_wake = sa1100_gpio_wake, | ||
| 227 | }; | ||
| 228 | |||
| 229 | static int sa1100_high_gpio_irqdomain_map(struct irq_domain *d, | ||
| 230 | unsigned int irq, irq_hw_number_t hwirq) | ||
| 231 | { | ||
| 232 | irq_set_chip_and_handler(irq, &sa1100_high_gpio_chip, | ||
| 233 | handle_edge_irq); | ||
| 234 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
| 235 | |||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | |||
| 239 | static struct irq_domain_ops sa1100_high_gpio_irqdomain_ops = { | ||
| 240 | .map = sa1100_high_gpio_irqdomain_map, | ||
| 241 | .xlate = irq_domain_xlate_onetwocell, | ||
| 242 | }; | ||
| 243 | |||
| 244 | static struct irq_domain *sa1100_high_gpio_irqdomain; | ||
| 245 | |||
| 246 | static struct resource irq_resource = | 215 | static struct resource irq_resource = |
| 247 | DEFINE_RES_MEM_NAMED(0x90050000, SZ_64K, "irqs"); | 216 | DEFINE_RES_MEM_NAMED(0x90050000, SZ_64K, "irqs"); |
| 248 | 217 | ||
| @@ -353,13 +322,9 @@ void __init sa1100_init_irq(void) | |||
| 353 | 32, IRQ_GPIO0_SC, 0, | 322 | 32, IRQ_GPIO0_SC, 0, |
| 354 | &sa1100_normal_irqdomain_ops, NULL); | 323 | &sa1100_normal_irqdomain_ops, NULL); |
| 355 | 324 | ||
| 356 | sa1100_low_gpio_irqdomain = irq_domain_add_legacy(NULL, | 325 | sa1100_gpio_irqdomain = irq_domain_add_legacy(NULL, |
| 357 | 11, IRQ_GPIO0, 0, | 326 | 28, IRQ_GPIO0, 0, |
| 358 | &sa1100_low_gpio_irqdomain_ops, NULL); | 327 | &sa1100_gpio_irqdomain_ops, NULL); |
| 359 | |||
| 360 | sa1100_high_gpio_irqdomain = irq_domain_add_legacy(NULL, | ||
| 361 | 17, IRQ_GPIO11, 11, | ||
| 362 | &sa1100_high_gpio_irqdomain_ops, NULL); | ||
| 363 | 328 | ||
| 364 | /* | 329 | /* |
| 365 | * Install handlers for GPIO 0-10 edge detect interrupts | 330 | * Install handlers for GPIO 0-10 edge detect interrupts |
