Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 160860
b: refs/heads/master
c: 8afaada
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer committed Aug 7, 2009
1 parent 93bcdee commit 2f9c928
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61b032ef263c17bb733cfb3f87a811be52adbe22
refs/heads/master: 8afaada2dc9247ffcd2982be824cd290ace18f55
25 changes: 11 additions & 14 deletions trunk/arch/arm/plat-mxc/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)
}
}

#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1)
/* MX1 and MX3 has one interrupt *per* gpio port */
static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
{
Expand All @@ -174,9 +173,7 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)

mxc_gpio_irq_handler(port, irq_stat);
}
#endif

#ifdef CONFIG_ARCH_MX2
/* MX2 has one interrupt *for all* gpio ports */
static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
{
Expand All @@ -195,7 +192,6 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
mxc_gpio_irq_handler(&port[i], irq_stat);
}
}
#endif

static struct irq_chip gpio_irq_chip = {
.ack = gpio_ack_irq,
Expand Down Expand Up @@ -284,17 +280,18 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
/* its a serious configuration bug when it fails */
BUG_ON( gpiochip_add(&port[i].chip) < 0 );

#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1)
/* setup one handler for each entry */
set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler);
set_irq_data(port[i].irq, &port[i]);
#endif
if (cpu_is_mx1() || cpu_is_mx3()) {
/* setup one handler for each entry */
set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler);
set_irq_data(port[i].irq, &port[i]);
}
}

if (cpu_is_mx2()) {
/* setup one handler for all GPIO interrupts */
set_irq_chained_handler(port[0].irq, mx2_gpio_irq_handler);
set_irq_data(port[0].irq, port);
}

#ifdef CONFIG_ARCH_MX2
/* setup one handler for all GPIO interrupts */
set_irq_chained_handler(port[0].irq, mx2_gpio_irq_handler);
set_irq_data(port[0].irq, port);
#endif
return 0;
}

0 comments on commit 2f9c928

Please sign in to comment.