]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-omap1/board-fsample.c
omap: Fix gpio_request calls to happen as arch_initcall
[mv-sheeva.git] / arch / arm / mach-omap1 / board-fsample.c
index 149fdd32e127338caf6d6ab6898a3b78289ec712..295ab67136707d7107e398d1be408cf0a14d4835 100644 (file)
@@ -120,6 +120,15 @@ static struct resource smc91x_resources[] = {
        },
 };
 
+static void __init fsample_init_smc91x(void)
+{
+       fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
+       mdelay(50);
+       fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
+                  H2P2_DBG_FPGA_LAN_RESET);
+       mdelay(50);
+}
+
 static struct mtd_partition nor_partitions[] = {
        /* bootloader (U-Boot, etc) in first sector */
        {
@@ -285,6 +294,8 @@ static struct omap_board_config_kernel fsample_config[] = {
 
 static void __init omap_fsample_init(void)
 {
+       fsample_init_smc91x();
+
        if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
                BUG();
        gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
@@ -312,21 +323,11 @@ static void __init omap_fsample_init(void)
        omap_register_i2c_bus(1, 100, NULL, 0);
 }
 
-static void __init fsample_init_smc91x(void)
-{
-       fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
-       mdelay(50);
-       fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
-                  H2P2_DBG_FPGA_LAN_RESET);
-       mdelay(50);
-}
-
 static void __init omap_fsample_init_irq(void)
 {
        omap1_init_common_hw();
        omap_init_irq();
        omap_gpio_init();
-       fsample_init_smc91x();
 }
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */