* [PATCH 0/2] OMAP: convert boards to use platform data with smc91x @ 2009-12-08 17:00 Ladislav Michl 2009-12-08 17:05 ` [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x Ladislav Michl 2009-12-08 17:08 ` [PATCH 2/2] smc91x: remove OMAP specific bits Ladislav Michl 0 siblings, 2 replies; 8+ messages in thread From: Ladislav Michl @ 2009-12-08 17:00 UTC (permalink / raw) To: linux-omap; +Cc: linux-netdev As smc91x driver allows specifying settings in board resources, use that rather than needing CONFIG_ARCH_OMAP in the drivers/net/smc91x.h header. arch/arm/mach-omap1/board-fsample.c | 10 ++++++++++ arch/arm/mach-omap1/board-h2.c | 10 ++++++++++ arch/arm/mach-omap1/board-h3.c | 10 ++++++++++ arch/arm/mach-omap1/board-innovator.c | 13 +++++++++++++ arch/arm/mach-omap1/board-osk.c | 10 ++++++++++ arch/arm/mach-omap1/board-perseus2.c | 10 ++++++++++ arch/arm/mach-omap1/board-voiceblue.c | 10 ++++++++++ arch/arm/mach-omap2/board-apollon.c | 10 ++++++++++ arch/arm/mach-omap2/gpmc-smc91x.c | 8 +++++--- arch/arm/plat-omap/debug-devices.c | 10 ++++++++++ drivers/net/smc91x.h | 15 --------------- 11 files changed, 98 insertions(+), 18 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x 2009-12-08 17:00 [PATCH 0/2] OMAP: convert boards to use platform data with smc91x Ladislav Michl @ 2009-12-08 17:05 ` Ladislav Michl 2009-12-08 23:58 ` Tony Lindgren 2009-12-09 0:05 ` [APPLIED] " Tony Lindgren 2009-12-08 17:08 ` [PATCH 2/2] smc91x: remove OMAP specific bits Ladislav Michl 1 sibling, 2 replies; 8+ messages in thread From: Ladislav Michl @ 2009-12-08 17:05 UTC (permalink / raw) To: linux-omap; +Cc: linux-netdev 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> diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index f4b72c1..91e7b2f 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -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, }; diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 89ba8ec..eeafe6e 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -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, }; diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index f5cc0a7..e0aee66 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -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, }; diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cf0fdb9..91b3b8e 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -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> @@ -159,6 +160,12 @@ static struct map_desc innovator1510_io_desc[] __initdata = { } }; +static struct smc91x_platdata innovator_smc91x_info = { + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, + .leda = RPC_LED_100_10, + .ledb = RPC_LED_TX_RX, +}; + static struct resource innovator1510_smc91x_resources[] = { [0] = { .start = OMAP1510_FPGA_ETHR_START, /* Physical */ @@ -175,6 +182,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 +251,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, }; diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 50c92c1..ccea4f4 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -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, }; diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index ca7df1e..b9ea312 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -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, }; diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 35c75c1..1691835 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c @@ -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, }; diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 8a2ce77..fbbd68d 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -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, }; diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c index 6083e21..877c6f5 100644 --- a/arch/arm/mach-omap2/gpmc-smc91x.c +++ b/arch/arm/mach-omap2/gpmc-smc91x.c @@ -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, }; /* diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c index 09c1107..923c962 100644 --- a/arch/arm/plat-omap/debug-devices.c +++ b/arch/arm/plat-omap/debug-devices.c @@ -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> @@ -24,6 +25,12 @@ * 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, }; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x 2009-12-08 17:05 ` [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x Ladislav Michl @ 2009-12-08 23:58 ` Tony Lindgren 2009-12-09 0:05 ` [APPLIED] " Tony Lindgren 1 sibling, 0 replies; 8+ messages in thread From: Tony Lindgren @ 2009-12-08 23:58 UTC (permalink / raw) To: Ladislav Michl; +Cc: linux-omap, linux-netdev * Ladislav Michl <Ladislav.Michl@seznam.cz> [091208 08:04]: > Use smc91x_platdata to setup smc91x, so we can get rid of OMAP specific stuff > in smc91x driver Thanks, will merge both via linux-omap tree. Regards, Tony > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > > diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c > index f4b72c1..91e7b2f 100644 > --- a/arch/arm/mach-omap1/board-fsample.c > +++ b/arch/arm/mach-omap1/board-fsample.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c > index 89ba8ec..eeafe6e 100644 > --- a/arch/arm/mach-omap1/board-h2.c > +++ b/arch/arm/mach-omap1/board-h2.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c > index f5cc0a7..e0aee66 100644 > --- a/arch/arm/mach-omap1/board-h3.c > +++ b/arch/arm/mach-omap1/board-h3.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c > index cf0fdb9..91b3b8e 100644 > --- a/arch/arm/mach-omap1/board-innovator.c > +++ b/arch/arm/mach-omap1/board-innovator.c > @@ -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> > @@ -159,6 +160,12 @@ static struct map_desc innovator1510_io_desc[] __initdata = { > } > }; > > +static struct smc91x_platdata innovator_smc91x_info = { > + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, > + .leda = RPC_LED_100_10, > + .ledb = RPC_LED_TX_RX, > +}; > + > static struct resource innovator1510_smc91x_resources[] = { > [0] = { > .start = OMAP1510_FPGA_ETHR_START, /* Physical */ > @@ -175,6 +182,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 +251,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, > }; > diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c > index 50c92c1..ccea4f4 100644 > --- a/arch/arm/mach-omap1/board-osk.c > +++ b/arch/arm/mach-omap1/board-osk.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c > index ca7df1e..b9ea312 100644 > --- a/arch/arm/mach-omap1/board-perseus2.c > +++ b/arch/arm/mach-omap1/board-perseus2.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c > index 35c75c1..1691835 100644 > --- a/arch/arm/mach-omap1/board-voiceblue.c > +++ b/arch/arm/mach-omap1/board-voiceblue.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c > index 8a2ce77..fbbd68d 100644 > --- a/arch/arm/mach-omap2/board-apollon.c > +++ b/arch/arm/mach-omap2/board-apollon.c > @@ -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, > }; > diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c > index 6083e21..877c6f5 100644 > --- a/arch/arm/mach-omap2/gpmc-smc91x.c > +++ b/arch/arm/mach-omap2/gpmc-smc91x.c > @@ -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, > }; > > /* > diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c > index 09c1107..923c962 100644 > --- a/arch/arm/plat-omap/debug-devices.c > +++ b/arch/arm/plat-omap/debug-devices.c > @@ -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> > > @@ -24,6 +25,12 @@ > * 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, > }; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* [APPLIED] [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x 2009-12-08 17:05 ` [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x Ladislav Michl 2009-12-08 23:58 ` Tony Lindgren @ 2009-12-09 0:05 ` Tony Lindgren 1 sibling, 0 replies; 8+ messages in thread From: Tony Lindgren @ 2009-12-09 0:05 UTC (permalink / raw) To: linux-omap This patch has been applied to the linux-omap by youw fwiendly patch wobot. Branch in linux-omap: for-next Initial commit ID (Likely to change): 3bbdd7f9bb4ec490324f9dcc790c2e006b23965e PatchWorks http://patchwork.kernel.org/patch/65709/ Git (Likely to change, and takes a while to get mirrored) http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=3bbdd7f9bb4ec490324f9dcc790c2e006b23965e ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] smc91x: remove OMAP specific bits 2009-12-08 17:00 [PATCH 0/2] OMAP: convert boards to use platform data with smc91x Ladislav Michl 2009-12-08 17:05 ` [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x Ladislav Michl @ 2009-12-08 17:08 ` Ladislav Michl 2009-12-09 0:00 ` Tony Lindgren 2009-12-09 0:06 ` [APPLIED] " Tony Lindgren 1 sibling, 2 replies; 8+ messages in thread From: Ladislav Michl @ 2009-12-08 17:08 UTC (permalink / raw) To: linux-omap; +Cc: linux-netdev Now that all OMAP boards are using the board resources, we don't need to keep the arch/board specific crap in the driver header. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 3911be7..bfc53eb 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -206,21 +206,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) } } -#elif defined(CONFIG_ARCH_OMAP) - -/* We can only do 16-bit reads and writes in the static memory space. */ -#define SMC_CAN_USE_8BIT 0 -#define SMC_CAN_USE_16BIT 1 -#define SMC_CAN_USE_32BIT 0 -#define SMC_IO_SHIFT 0 -#define SMC_NOWAIT 1 - -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_outw(v, a, r) writew(v, (a) + (r)) -#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) -#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) -#define SMC_IRQ_FLAGS (-1) /* from resource */ - #elif defined(CONFIG_SH_SH4202_MICRODEV) #define SMC_CAN_USE_8BIT 0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] smc91x: remove OMAP specific bits 2009-12-08 17:08 ` [PATCH 2/2] smc91x: remove OMAP specific bits Ladislav Michl @ 2009-12-09 0:00 ` Tony Lindgren 2009-12-09 1:19 ` Nicolas Pitre 2009-12-09 0:06 ` [APPLIED] " Tony Lindgren 1 sibling, 1 reply; 8+ messages in thread From: Tony Lindgren @ 2009-12-09 0:00 UTC (permalink / raw) To: Ladislav Michl, Nicolas Pitre; +Cc: linux-omap, linux-netdev * Ladislav Michl <Ladislav.Michl@seznam.cz> [091208 08:07]: > Now that all OMAP boards are using the board resources, we don't need > to keep the arch/board specific crap in the driver header. Planning to merge this via linux-omap list too with the platform data patch unless somebody at netdev has objections. Nico, care to ack this? Regards, Tony > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > > diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h > index 3911be7..bfc53eb 100644 > --- a/drivers/net/smc91x.h > +++ b/drivers/net/smc91x.h > @@ -206,21 +206,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) > } > } > > -#elif defined(CONFIG_ARCH_OMAP) > - > -/* We can only do 16-bit reads and writes in the static memory space. */ > -#define SMC_CAN_USE_8BIT 0 > -#define SMC_CAN_USE_16BIT 1 > -#define SMC_CAN_USE_32BIT 0 > -#define SMC_IO_SHIFT 0 > -#define SMC_NOWAIT 1 > - > -#define SMC_inw(a, r) readw((a) + (r)) > -#define SMC_outw(v, a, r) writew(v, (a) + (r)) > -#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) > -#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) > -#define SMC_IRQ_FLAGS (-1) /* from resource */ > - > #elif defined(CONFIG_SH_SH4202_MICRODEV) > > #define SMC_CAN_USE_8BIT 0 > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] smc91x: remove OMAP specific bits 2009-12-09 0:00 ` Tony Lindgren @ 2009-12-09 1:19 ` Nicolas Pitre 0 siblings, 0 replies; 8+ messages in thread From: Nicolas Pitre @ 2009-12-09 1:19 UTC (permalink / raw) To: Tony Lindgren; +Cc: Ladislav Michl, linux-omap, linux-netdev On Tue, 8 Dec 2009, Tony Lindgren wrote: > * Ladislav Michl <Ladislav.Michl@seznam.cz> [091208 08:07]: > > Now that all OMAP boards are using the board resources, we don't need > > to keep the arch/board specific crap in the driver header. > > Planning to merge this via linux-omap list too with the platform > data patch unless somebody at netdev has objections. > > Nico, care to ack this? ACK. > > Regards, > > Tony > > > > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > > > > diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h > > index 3911be7..bfc53eb 100644 > > --- a/drivers/net/smc91x.h > > +++ b/drivers/net/smc91x.h > > @@ -206,21 +206,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) > > } > > } > > > > -#elif defined(CONFIG_ARCH_OMAP) > > - > > -/* We can only do 16-bit reads and writes in the static memory space. */ > > -#define SMC_CAN_USE_8BIT 0 > > -#define SMC_CAN_USE_16BIT 1 > > -#define SMC_CAN_USE_32BIT 0 > > -#define SMC_IO_SHIFT 0 > > -#define SMC_NOWAIT 1 > > - > > -#define SMC_inw(a, r) readw((a) + (r)) > > -#define SMC_outw(v, a, r) writew(v, (a) + (r)) > > -#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) > > -#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) > > -#define SMC_IRQ_FLAGS (-1) /* from resource */ > > - > > #elif defined(CONFIG_SH_SH4202_MICRODEV) > > > > #define SMC_CAN_USE_8BIT 0 > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [APPLIED] [PATCH 2/2] smc91x: remove OMAP specific bits 2009-12-08 17:08 ` [PATCH 2/2] smc91x: remove OMAP specific bits Ladislav Michl 2009-12-09 0:00 ` Tony Lindgren @ 2009-12-09 0:06 ` Tony Lindgren 1 sibling, 0 replies; 8+ messages in thread From: Tony Lindgren @ 2009-12-09 0:06 UTC (permalink / raw) To: linux-omap This patch has been applied to the linux-omap by youw fwiendly patch wobot. Branch in linux-omap: for-next Initial commit ID (Likely to change): a08742729a07c11a746c9fb81c34fccf3d6a57f2 PatchWorks http://patchwork.kernel.org/patch/65711/ Git (Likely to change, and takes a while to get mirrored) http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=a08742729a07c11a746c9fb81c34fccf3d6a57f2 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-09 1:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-08 17:00 [PATCH 0/2] OMAP: convert boards to use platform data with smc91x Ladislav Michl 2009-12-08 17:05 ` [PATCH 1/2] OMAP: use smc91x_platdata to setup smc91x Ladislav Michl 2009-12-08 23:58 ` Tony Lindgren 2009-12-09 0:05 ` [APPLIED] " Tony Lindgren 2009-12-08 17:08 ` [PATCH 2/2] smc91x: remove OMAP specific bits Ladislav Michl 2009-12-09 0:00 ` Tony Lindgren 2009-12-09 1:19 ` Nicolas Pitre 2009-12-09 0:06 ` [APPLIED] " Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox