aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/locomo.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/common/locomo.c')
-rw-r--r--arch/arm/common/locomo.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 283051eaf931..7c6b4b99a2df 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -24,9 +24,9 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27#include <linux/io.h>
27 28
28#include <mach/hardware.h> 29#include <mach/hardware.h>
29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
32 32
@@ -169,7 +169,6 @@ static struct locomo_dev_info locomo_devices[] = {
169static void locomo_handler(unsigned int irq, struct irq_desc *desc) 169static void locomo_handler(unsigned int irq, struct irq_desc *desc)
170{ 170{
171 int req, i; 171 int req, i;
172 struct irq_desc *d;
173 void __iomem *mapbase = get_irq_chip_data(irq); 172 void __iomem *mapbase = get_irq_chip_data(irq);
174 173
175 /* Acknowledge the parent IRQ */ 174 /* Acknowledge the parent IRQ */
@@ -181,10 +180,9 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
181 if (req) { 180 if (req) {
182 /* generate the next interrupt(s) */ 181 /* generate the next interrupt(s) */
183 irq = LOCOMO_IRQ_START; 182 irq = LOCOMO_IRQ_START;
184 d = irq_desc + irq; 183 for (i = 0; i <= 3; i++, irq++) {
185 for (i = 0; i <= 3; i++, d++, irq++) {
186 if (req & (0x0100 << i)) { 184 if (req & (0x0100 << i)) {
187 desc_handle_irq(irq, d); 185 generic_handle_irq(irq);
188 } 186 }
189 187
190 } 188 }
@@ -222,12 +220,10 @@ static struct irq_chip locomo_chip = {
222 220
223static void locomo_key_handler(unsigned int irq, struct irq_desc *desc) 221static void locomo_key_handler(unsigned int irq, struct irq_desc *desc)
224{ 222{
225 struct irq_desc *d;
226 void __iomem *mapbase = get_irq_chip_data(irq); 223 void __iomem *mapbase = get_irq_chip_data(irq);
227 224
228 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { 225 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
229 d = irq_desc + LOCOMO_IRQ_KEY_START; 226 generic_handle_irq(LOCOMO_IRQ_KEY_START);
230 desc_handle_irq(LOCOMO_IRQ_KEY_START, d);
231 } 227 }
232} 228}
233 229
@@ -268,7 +264,6 @@ static struct irq_chip locomo_key_chip = {
268static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc) 264static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
269{ 265{
270 int req, i; 266 int req, i;
271 struct irq_desc *d;
272 void __iomem *mapbase = get_irq_chip_data(irq); 267 void __iomem *mapbase = get_irq_chip_data(irq);
273 268
274 req = locomo_readl(mapbase + LOCOMO_GIR) & 269 req = locomo_readl(mapbase + LOCOMO_GIR) &
@@ -277,10 +272,9 @@ static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
277 272
278 if (req) { 273 if (req) {
279 irq = LOCOMO_IRQ_GPIO_START; 274 irq = LOCOMO_IRQ_GPIO_START;
280 d = irq_desc + LOCOMO_IRQ_GPIO_START; 275 for (i = 0; i <= 15; i++, irq++) {
281 for (i = 0; i <= 15; i++, irq++, d++) {
282 if (req & (0x0001 << i)) { 276 if (req & (0x0001 << i)) {
283 desc_handle_irq(irq, d); 277 generic_handle_irq(irq);
284 } 278 }
285 } 279 }
286 } 280 }
@@ -361,12 +355,10 @@ static struct irq_chip locomo_gpio_chip = {
361 355
362static void locomo_lt_handler(unsigned int irq, struct irq_desc *desc) 356static void locomo_lt_handler(unsigned int irq, struct irq_desc *desc)
363{ 357{
364 struct irq_desc *d;
365 void __iomem *mapbase = get_irq_chip_data(irq); 358 void __iomem *mapbase = get_irq_chip_data(irq);
366 359
367 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { 360 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
368 d = irq_desc + LOCOMO_IRQ_LT_START; 361 generic_handle_irq(LOCOMO_IRQ_LT_START);
369 desc_handle_irq(LOCOMO_IRQ_LT_START, d);
370 } 362 }
371} 363}
372 364
@@ -407,17 +399,15 @@ static struct irq_chip locomo_lt_chip = {
407static void locomo_spi_handler(unsigned int irq, struct irq_desc *desc) 399static void locomo_spi_handler(unsigned int irq, struct irq_desc *desc)
408{ 400{
409 int req, i; 401 int req, i;
410 struct irq_desc *d;
411 void __iomem *mapbase = get_irq_chip_data(irq); 402 void __iomem *mapbase = get_irq_chip_data(irq);
412 403
413 req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F; 404 req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F;
414 if (req) { 405 if (req) {
415 irq = LOCOMO_IRQ_SPI_START; 406 irq = LOCOMO_IRQ_SPI_START;
416 d = irq_desc + irq;
417 407
418 for (i = 0; i <= 3; i++, irq++, d++) { 408 for (i = 0; i <= 3; i++, irq++) {
419 if (req & (0x0001 << i)) { 409 if (req & (0x0001 << i)) {
420 desc_handle_irq(irq, d); 410 generic_handle_irq(irq);
421 } 411 }
422 } 412 }
423 } 413 }