diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-07 19:26:56 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-07 19:26:56 -0500 |
commit | 9a748053f5f58a77cd71864f1d7b804175b0e47d (patch) | |
tree | aaffba02f6a87a85af45b21e090c333630ba382e /arch/arm/plat-omap/gpio.c | |
parent | 2fae7fbed072705d91e09ed393b2e580b2d895fc (diff) |
OMAP: GPIO: Make omap_gpio_show_rev bank specific
Otherwise GPIO init on 16xx may try to access uninitialized GPIO
bank as the MPUIO bank does not have a revision register.
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 48bccf2001eb..e4741905285b 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -1694,16 +1694,16 @@ static struct clk * gpio5_fck; | |||
1694 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; | 1694 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; |
1695 | #endif | 1695 | #endif |
1696 | 1696 | ||
1697 | static void __init omap_gpio_show_rev(void) | 1697 | static void __init omap_gpio_show_rev(struct gpio_bank *bank) |
1698 | { | 1698 | { |
1699 | u32 rev; | 1699 | u32 rev; |
1700 | 1700 | ||
1701 | if (cpu_is_omap16xx()) | 1701 | if (cpu_is_omap16xx() && !(bank->method != METHOD_MPUIO)) |
1702 | rev = __raw_readw(gpio_bank[1].base + OMAP1610_GPIO_REVISION); | 1702 | rev = __raw_readw(bank->base + OMAP1610_GPIO_REVISION); |
1703 | else if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 1703 | else if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
1704 | rev = __raw_readl(gpio_bank[0].base + OMAP24XX_GPIO_REVISION); | 1704 | rev = __raw_readl(bank->base + OMAP24XX_GPIO_REVISION); |
1705 | else if (cpu_is_omap44xx()) | 1705 | else if (cpu_is_omap44xx()) |
1706 | rev = __raw_readl(gpio_bank[0].base + OMAP4_GPIO_REVISION); | 1706 | rev = __raw_readl(bank->base + OMAP4_GPIO_REVISION); |
1707 | else | 1707 | else |
1708 | return; | 1708 | return; |
1709 | 1709 | ||
@@ -1963,7 +1963,7 @@ static int __init _omap_gpio_init(void) | |||
1963 | } | 1963 | } |
1964 | } | 1964 | } |
1965 | 1965 | ||
1966 | omap_gpio_show_rev(); | 1966 | omap_gpio_show_rev(bank); |
1967 | 1967 | ||
1968 | return 0; | 1968 | return 0; |
1969 | } | 1969 | } |