diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-08 00:26:55 (GMT) |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-08 00:26:55 (GMT) |
commit | c2cdaffe0bb32015e84af8e31f73e620ba271165 (patch) | |
tree | 420ae7c0acec63eda182c7b4ceea1e39406bc41b /arch/arm/mach-omap1/board-h3.c | |
parent | 7b045c96cd1405597a6a2e98bc53a4ac01d835b1 (diff) | |
download | linux-c2cdaffe0bb32015e84af8e31f73e620ba271165.tar.xz |
omap: Fix gpio_request calls to happen as arch_initcall
Looks like some boards are calling gpio_request from init_irq.
This will make the request_irq fail, as GPIO will be initialized
as postcore_initcall.
Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h3.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 9126e3e..7871919 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -264,6 +264,15 @@ static struct platform_device smc91x_device = { .resource = smc91x_resources, }; +static void __init h3_init_smc91x(void) +{ + omap_cfg_reg(W15_1710_GPIO40); + if (gpio_request(40, "SMC91x irq") < 0) { + printk("Error requesting gpio 40 for smc91x irq\n"); + return; + } +} + #define GPTIMER_BASE 0xFFFB1400 #define GPTIMER_REGS(x) (0xFFFB1400 + (x * 0x800)) #define GPTIMER_REGS_SIZE 0x46 @@ -376,6 +385,8 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = { static void __init h3_init(void) { + h3_init_smc91x(); + /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped * to address 0 by a dip switch), NAND on CS2B. The NAND driver will * notice whether a NAND chip is enabled at probe time. @@ -422,21 +433,11 @@ static void __init h3_init(void) h3_mmc_init(); } -static void __init h3_init_smc91x(void) -{ - omap_cfg_reg(W15_1710_GPIO40); - if (gpio_request(40, "SMC91x irq") < 0) { - printk("Error requesting gpio 40 for smc91x irq\n"); - return; - } -} - static void __init h3_init_irq(void) { omap1_init_common_hw(); omap_init_irq(); omap_gpio_init(); - h3_init_smc91x(); } static void __init h3_map_io(void) |