aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-perseus2.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-07 19:26:55 -0500
committerTony Lindgren <tony@atomide.com>2010-12-07 19:26:55 -0500
commitc2cdaffe0bb32015e84af8e31f73e620ba271165 (patch)
tree420ae7c0acec63eda182c7b4ceea1e39406bc41b /arch/arm/mach-omap1/board-perseus2.c
parent7b045c96cd1405597a6a2e98bc53a4ac01d835b1 (diff)
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-perseus2.c')
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index a8d16a255c18..07660be4f228 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -251,8 +251,19 @@ static struct omap_board_config_kernel perseus2_config[] __initdata = {
251 { OMAP_TAG_LCD, &perseus2_lcd_config }, 251 { OMAP_TAG_LCD, &perseus2_lcd_config },
252}; 252};
253 253
254static void __init perseus2_init_smc91x(void)
255{
256 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
257 mdelay(50);
258 fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
259 H2P2_DBG_FPGA_LAN_RESET);
260 mdelay(50);
261}
262
254static void __init omap_perseus2_init(void) 263static void __init omap_perseus2_init(void)
255{ 264{
265 perseus2_init_smc91x();
266
256 if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) 267 if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
257 BUG(); 268 BUG();
258 gpio_direction_input(P2_NAND_RB_GPIO_PIN); 269 gpio_direction_input(P2_NAND_RB_GPIO_PIN);
@@ -280,21 +291,11 @@ static void __init omap_perseus2_init(void)
280 omap_register_i2c_bus(1, 100, NULL, 0); 291 omap_register_i2c_bus(1, 100, NULL, 0);
281} 292}
282 293
283static void __init perseus2_init_smc91x(void)
284{
285 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
286 mdelay(50);
287 fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
288 H2P2_DBG_FPGA_LAN_RESET);
289 mdelay(50);
290}
291
292static void __init omap_perseus2_init_irq(void) 294static void __init omap_perseus2_init_irq(void)
293{ 295{
294 omap1_init_common_hw(); 296 omap1_init_common_hw();
295 omap_init_irq(); 297 omap_init_irq();
296 omap_gpio_init(); 298 omap_gpio_init();
297 perseus2_init_smc91x();
298} 299}
299/* Only FPGA needs to be mapped here. All others are done with ioremap */ 300/* Only FPGA needs to be mapped here. All others are done with ioremap */
300static struct map_desc omap_perseus2_io_desc[] __initdata = { 301static struct map_desc omap_perseus2_io_desc[] __initdata = {