omap: use smc91x_platdata to setup smc91x
authorLadislav Michl <ladis@linux-mips.org>
Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)
committerTony Lindgren <tony@atomide.com>
Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)
Use smc91x_platdata to setup smc91x, so we can get rid of OMAP specific stuff
in smc91x driver

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/gpmc-smc91x.c
arch/arm/plat-omap/debug-devices.c

index f4b72c1654f5ee7fc114423333cff0ca0b544c1d..91e7b2f2bc05d35406e710cd7afeeea74234294d 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -100,6 +101,12 @@ static int fsample_keymap[] = {
        0
 };
 
+static struct smc91x_platdata smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .start  = H2P2_DBG_FPGA_ETHR_START,     /* Physical */
@@ -190,6 +197,9 @@ static struct platform_device nand_device = {
 static struct platform_device smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(smc91x_resources),
        .resource       = smc91x_resources,
 };
index 89ba8ec4bbf4679102e56971fa1069775f2bf632..eeafe6ed15cb49f05abc94a1b2d9c298b5d0dded 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
 #include <linux/i2c/tps65010.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/gpio.h>
@@ -200,6 +201,12 @@ static struct platform_device h2_nand_device = {
        .resource       = &h2_nand_resource,
 };
 
+static struct smc91x_platdata h2_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource h2_smc91x_resources[] = {
        [0] = {
                .start  = OMAP1610_ETHR_START,          /* Physical */
@@ -216,6 +223,9 @@ static struct resource h2_smc91x_resources[] = {
 static struct platform_device h2_smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &h2_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(h2_smc91x_resources),
        .resource       = h2_smc91x_resources,
 };
index f5cc0a7305245ebd5d31c412d2c63c9c0b630897..e0aee66e43e6ac419c9e4efb0162455686a1be58 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/input.h>
 #include <linux/spi/spi.h>
 #include <linux/i2c/tps65010.h>
+#include <linux/smc91x.h>
 
 #include <asm/setup.h>
 #include <asm/page.h>
@@ -202,6 +203,12 @@ static struct platform_device nand_device = {
        .resource       = &nand_resource,
 };
 
+static struct smc91x_platdata smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .start  = OMAP1710_ETHR_START,          /* Physical */
@@ -218,6 +225,9 @@ static struct resource smc91x_resources[] = {
 static struct platform_device smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(smc91x_resources),
        .resource       = smc91x_resources,
 };
index cf0fdb9c182f9a7b0903708b77eddc13a3793380..2133b006f6a3fe88fe1bd026439e53ea5a9d7179 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -142,6 +143,11 @@ static struct platform_device innovator_kp_device = {
        .resource       = innovator_kp_resources,
 };
 
+static struct smc91x_platdata innovator_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
 
 #ifdef CONFIG_ARCH_OMAP15XX
 
@@ -175,6 +181,9 @@ static struct resource innovator1510_smc91x_resources[] = {
 static struct platform_device innovator1510_smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &innovator_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(innovator1510_smc91x_resources),
        .resource       = innovator1510_smc91x_resources,
 };
@@ -241,6 +250,9 @@ static struct resource innovator1610_smc91x_resources[] = {
 static struct platform_device innovator1610_smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &innovator_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(innovator1610_smc91x_resources),
        .resource       = innovator1610_smc91x_resources,
 };
index 50c92c13e48aced34e8fea2e71ca66dc7ba6f7ae..ccea4f448e9a18e8d367c50153ef3871b083983e 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/irq.h>
 #include <linux/i2c.h>
 #include <linux/leds.h>
+#include <linux/smc91x.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
@@ -115,6 +116,12 @@ static struct platform_device osk5912_flash_device = {
        .resource       = &osk_flash_resource,
 };
 
+static struct smc91x_platdata osk5912_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource osk5912_smc91x_resources[] = {
        [0] = {
                .start  = OMAP_OSK_ETHR_START,          /* Physical */
@@ -131,6 +138,9 @@ static struct resource osk5912_smc91x_resources[] = {
 static struct platform_device osk5912_smc91x_device = {
        .name           = "smc91x",
        .id             = -1,
+       .dev    = {
+               .platform_data  = &osk5912_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(osk5912_smc91x_resources),
        .resource       = osk5912_smc91x_resources,
 };
index ca7df1e93efc7a245437bbfaa98ce0d9c5b37c5b..b9ea31289b50b289774ba6b5a193f60cbfdad16a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -67,6 +68,12 @@ static int p2_keymap[] = {
        0
 };
 
+static struct smc91x_platdata smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .start  = H2P2_DBG_FPGA_ETHR_START,     /* Physical */
@@ -157,6 +164,9 @@ static struct platform_device nand_device = {
 static struct platform_device smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(smc91x_resources),
        .resource       = smc91x_resources,
 };
index 35c75c1bd0aaaacf03eb3006fb6e504e5496e909..169183537997a70153edf212c2f08216631eea4d 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/reboot.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -106,6 +107,12 @@ static struct platform_device voiceblue_flash_device = {
        .resource       = &voiceblue_flash_resource,
 };
 
+static struct smc91x_platdata voiceblue_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource voiceblue_smc91x_resources[] = {
        [0] = {
                .start  = OMAP_CS2_PHYS + 0x300,
@@ -122,6 +129,9 @@ static struct resource voiceblue_smc91x_resources[] = {
 static struct platform_device voiceblue_smc91x_device = {
        .name           = "smc91x",
        .id             = 0,
+       .dev    = {
+               .platform_data  = &voiceblue_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(voiceblue_smc91x_resources),
        .resource       = voiceblue_smc91x_resources,
 };
index 8a2ce77a02ecbe8f65398e6021a7f74f8229bc10..fbbd68d69cc8cc50d0f426bcc67db622f1bf5c16 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/leds.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -120,6 +121,12 @@ static void __init apollon_flash_init(void)
        apollon_flash_resource[0].end   = base + SZ_128K - 1;
 }
 
+static struct smc91x_platdata appolon_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource apollon_smc91x_resources[] = {
        [0] = {
                .flags  = IORESOURCE_MEM,
@@ -134,6 +141,9 @@ static struct resource apollon_smc91x_resources[] = {
 static struct platform_device apollon_smc91x_device = {
        .name           = "smc91x",
        .id             = -1,
+       .dev    = {
+               .platform_data  = &appolon_smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(apollon_smc91x_resources),
        .resource       = apollon_smc91x_resources,
 };
index 6083e21b3be650347a6b4cc14c68509833c5d3e6..877c6f5807b7b1d5e68a623715bfa78711286dfd 100644 (file)
@@ -33,17 +33,19 @@ static struct resource gpmc_smc91x_resources[] = {
 };
 
 static struct smc91x_platdata gpmc_smc91x_info = {
-       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0,
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
 };
 
 static struct platform_device gpmc_smc91x_device = {
        .name           = "smc91x",
        .id             = -1,
-       .num_resources  = ARRAY_SIZE(gpmc_smc91x_resources),
-       .resource       = gpmc_smc91x_resources,
        .dev            = {
                .platform_data = &gpmc_smc91x_info,
        },
+       .num_resources  = ARRAY_SIZE(gpmc_smc91x_resources),
+       .resource       = gpmc_smc91x_resources,
 };
 
 /*
index 09c1107637f613d641ae42724c613f37d80ac5fa..923c9621096b85f63e6e8c6ba2fa9909b3c06311 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <linux/smc91x.h>
 
 #include <mach/hardware.h>
 
  * platforms include H2, H3, H4, and Perseus2.
  */
 
+static struct smc91x_platdata smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .flags  = IORESOURCE_MEM,
@@ -36,6 +43,9 @@ static struct resource smc91x_resources[] = {
 static struct platform_device smc91x_device = {
        .name           = "smc91x",
        .id             = -1,
+       .dev            = {
+               .platform_data = &smc91x_info,
+       },
        .num_resources  = ARRAY_SIZE(smc91x_resources),
        .resource       = smc91x_resources,
 };