diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-01 01:49:29 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2011-12-01 03:15:15 -0500 |
commit | 04aafd713bae8a75933c7821dc012b0ec9046bca (patch) | |
tree | 5d0a8b41980b7e229e12510c9d24e27573cf6a8a /arch/arm/mach-mx5/imx53-dt.c | |
parent | 2a3267a489f1dc4284b64a4b88c62011946dc7ff (diff) |
arm/imx: fix irq_base for gpio
When gpio core dynamically allocate gpio number for a port, it starts
from the end of the total range, 0 ~ ARCH_NR_GPIOS. That said, the
earlier a port gets probed, the bigger gpio number it gets assigned.
To match this, the irq_base for gpio should be assigned from
'MXC_GPIO_IRQ_START + ARCH_NR_GPIOS' decreasingly.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mx5/imx53-dt.c')
-rw-r--r-- | arch/arm/mach-mx5/imx53-dt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/imx53-dt.c b/arch/arm/mach-mx5/imx53-dt.c index 022bc0364b5f..85bfd5ff21b0 100644 --- a/arch/arm/mach-mx5/imx53-dt.c +++ b/arch/arm/mach-mx5/imx53-dt.c | |||
@@ -58,11 +58,10 @@ static int __init imx53_tzic_add_irq_domain(struct device_node *np, | |||
58 | static int __init imx53_gpio_add_irq_domain(struct device_node *np, | 58 | static int __init imx53_gpio_add_irq_domain(struct device_node *np, |
59 | struct device_node *interrupt_parent) | 59 | struct device_node *interrupt_parent) |
60 | { | 60 | { |
61 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS - | 61 | static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS; |
62 | 32 * 7; /* imx53 gets 7 gpio ports */ | ||
63 | 62 | ||
63 | gpio_irq_base -= 32; | ||
64 | irq_domain_add_simple(np, gpio_irq_base); | 64 | irq_domain_add_simple(np, gpio_irq_base); |
65 | gpio_irq_base += 32; | ||
66 | 65 | ||
67 | return 0; | 66 | return 0; |
68 | } | 67 | } |