Commit 3bc48014782a89f7201734d3e23865cb283926a7
Committed by
Tony Lindgren
1 parent
662c8b55d2
Exists in
master
and in
39 other branches
omap: use smc91x_platdata to setup smc91x
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>
Showing 10 changed files with 97 additions and 3 deletions Side-by-side Diff
- 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
arch/arm/mach-omap1/board-fsample.c
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | #include <linux/mtd/nand.h> |
20 | 20 | #include <linux/mtd/partitions.h> |
21 | 21 | #include <linux/input.h> |
22 | +#include <linux/smc91x.h> | |
22 | 23 | |
23 | 24 | #include <mach/hardware.h> |
24 | 25 | #include <asm/mach-types.h> |
... | ... | @@ -100,6 +101,12 @@ |
100 | 101 | 0 |
101 | 102 | }; |
102 | 103 | |
104 | +static struct smc91x_platdata smc91x_info = { | |
105 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
106 | + .leda = RPC_LED_100_10, | |
107 | + .ledb = RPC_LED_TX_RX, | |
108 | +}; | |
109 | + | |
103 | 110 | static struct resource smc91x_resources[] = { |
104 | 111 | [0] = { |
105 | 112 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ |
... | ... | @@ -190,6 +197,9 @@ |
190 | 197 | static struct platform_device smc91x_device = { |
191 | 198 | .name = "smc91x", |
192 | 199 | .id = 0, |
200 | + .dev = { | |
201 | + .platform_data = &smc91x_info, | |
202 | + }, | |
193 | 203 | .num_resources = ARRAY_SIZE(smc91x_resources), |
194 | 204 | .resource = smc91x_resources, |
195 | 205 | }; |
arch/arm/mach-omap1/board-h2.c
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | #include <linux/mtd/partitions.h> |
29 | 29 | #include <linux/input.h> |
30 | 30 | #include <linux/i2c/tps65010.h> |
31 | +#include <linux/smc91x.h> | |
31 | 32 | |
32 | 33 | #include <mach/hardware.h> |
33 | 34 | #include <asm/gpio.h> |
... | ... | @@ -200,6 +201,12 @@ |
200 | 201 | .resource = &h2_nand_resource, |
201 | 202 | }; |
202 | 203 | |
204 | +static struct smc91x_platdata h2_smc91x_info = { | |
205 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
206 | + .leda = RPC_LED_100_10, | |
207 | + .ledb = RPC_LED_TX_RX, | |
208 | +}; | |
209 | + | |
203 | 210 | static struct resource h2_smc91x_resources[] = { |
204 | 211 | [0] = { |
205 | 212 | .start = OMAP1610_ETHR_START, /* Physical */ |
... | ... | @@ -216,6 +223,9 @@ |
216 | 223 | static struct platform_device h2_smc91x_device = { |
217 | 224 | .name = "smc91x", |
218 | 225 | .id = 0, |
226 | + .dev = { | |
227 | + .platform_data = &h2_smc91x_info, | |
228 | + }, | |
219 | 229 | .num_resources = ARRAY_SIZE(h2_smc91x_resources), |
220 | 230 | .resource = h2_smc91x_resources, |
221 | 231 | }; |
arch/arm/mach-omap1/board-h3.c
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | #include <linux/input.h> |
29 | 29 | #include <linux/spi/spi.h> |
30 | 30 | #include <linux/i2c/tps65010.h> |
31 | +#include <linux/smc91x.h> | |
31 | 32 | |
32 | 33 | #include <asm/setup.h> |
33 | 34 | #include <asm/page.h> |
... | ... | @@ -202,6 +203,12 @@ |
202 | 203 | .resource = &nand_resource, |
203 | 204 | }; |
204 | 205 | |
206 | +static struct smc91x_platdata smc91x_info = { | |
207 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
208 | + .leda = RPC_LED_100_10, | |
209 | + .ledb = RPC_LED_TX_RX, | |
210 | +}; | |
211 | + | |
205 | 212 | static struct resource smc91x_resources[] = { |
206 | 213 | [0] = { |
207 | 214 | .start = OMAP1710_ETHR_START, /* Physical */ |
... | ... | @@ -218,6 +225,9 @@ |
218 | 225 | static struct platform_device smc91x_device = { |
219 | 226 | .name = "smc91x", |
220 | 227 | .id = 0, |
228 | + .dev = { | |
229 | + .platform_data = &smc91x_info, | |
230 | + }, | |
221 | 231 | .num_resources = ARRAY_SIZE(smc91x_resources), |
222 | 232 | .resource = smc91x_resources, |
223 | 233 | }; |
arch/arm/mach-omap1/board-innovator.c
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | #include <linux/mtd/mtd.h> |
24 | 24 | #include <linux/mtd/partitions.h> |
25 | 25 | #include <linux/input.h> |
26 | +#include <linux/smc91x.h> | |
26 | 27 | |
27 | 28 | #include <mach/hardware.h> |
28 | 29 | #include <asm/mach-types.h> |
... | ... | @@ -142,6 +143,11 @@ |
142 | 143 | .resource = innovator_kp_resources, |
143 | 144 | }; |
144 | 145 | |
146 | +static struct smc91x_platdata innovator_smc91x_info = { | |
147 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
148 | + .leda = RPC_LED_100_10, | |
149 | + .ledb = RPC_LED_TX_RX, | |
150 | +}; | |
145 | 151 | |
146 | 152 | #ifdef CONFIG_ARCH_OMAP15XX |
147 | 153 | |
... | ... | @@ -175,6 +181,9 @@ |
175 | 181 | static struct platform_device innovator1510_smc91x_device = { |
176 | 182 | .name = "smc91x", |
177 | 183 | .id = 0, |
184 | + .dev = { | |
185 | + .platform_data = &innovator_smc91x_info, | |
186 | + }, | |
178 | 187 | .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources), |
179 | 188 | .resource = innovator1510_smc91x_resources, |
180 | 189 | }; |
... | ... | @@ -241,6 +250,9 @@ |
241 | 250 | static struct platform_device innovator1610_smc91x_device = { |
242 | 251 | .name = "smc91x", |
243 | 252 | .id = 0, |
253 | + .dev = { | |
254 | + .platform_data = &innovator_smc91x_info, | |
255 | + }, | |
244 | 256 | .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources), |
245 | 257 | .resource = innovator1610_smc91x_resources, |
246 | 258 | }; |
arch/arm/mach-omap1/board-osk.c
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | #include <linux/irq.h> |
34 | 34 | #include <linux/i2c.h> |
35 | 35 | #include <linux/leds.h> |
36 | +#include <linux/smc91x.h> | |
36 | 37 | |
37 | 38 | #include <linux/mtd/mtd.h> |
38 | 39 | #include <linux/mtd/partitions.h> |
... | ... | @@ -115,6 +116,12 @@ |
115 | 116 | .resource = &osk_flash_resource, |
116 | 117 | }; |
117 | 118 | |
119 | +static struct smc91x_platdata osk5912_smc91x_info = { | |
120 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
121 | + .leda = RPC_LED_100_10, | |
122 | + .ledb = RPC_LED_TX_RX, | |
123 | +}; | |
124 | + | |
118 | 125 | static struct resource osk5912_smc91x_resources[] = { |
119 | 126 | [0] = { |
120 | 127 | .start = OMAP_OSK_ETHR_START, /* Physical */ |
... | ... | @@ -131,6 +138,9 @@ |
131 | 138 | static struct platform_device osk5912_smc91x_device = { |
132 | 139 | .name = "smc91x", |
133 | 140 | .id = -1, |
141 | + .dev = { | |
142 | + .platform_data = &osk5912_smc91x_info, | |
143 | + }, | |
134 | 144 | .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), |
135 | 145 | .resource = osk5912_smc91x_resources, |
136 | 146 | }; |
arch/arm/mach-omap1/board-perseus2.c
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | #include <linux/mtd/nand.h> |
20 | 20 | #include <linux/mtd/partitions.h> |
21 | 21 | #include <linux/input.h> |
22 | +#include <linux/smc91x.h> | |
22 | 23 | |
23 | 24 | #include <mach/hardware.h> |
24 | 25 | #include <asm/mach-types.h> |
... | ... | @@ -67,6 +68,12 @@ |
67 | 68 | 0 |
68 | 69 | }; |
69 | 70 | |
71 | +static struct smc91x_platdata smc91x_info = { | |
72 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
73 | + .leda = RPC_LED_100_10, | |
74 | + .ledb = RPC_LED_TX_RX, | |
75 | +}; | |
76 | + | |
70 | 77 | static struct resource smc91x_resources[] = { |
71 | 78 | [0] = { |
72 | 79 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ |
... | ... | @@ -157,6 +164,9 @@ |
157 | 164 | static struct platform_device smc91x_device = { |
158 | 165 | .name = "smc91x", |
159 | 166 | .id = 0, |
167 | + .dev = { | |
168 | + .platform_data = &smc91x_info, | |
169 | + }, | |
160 | 170 | .num_resources = ARRAY_SIZE(smc91x_resources), |
161 | 171 | .resource = smc91x_resources, |
162 | 172 | }; |
arch/arm/mach-omap1/board-voiceblue.c
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | #include <linux/reboot.h> |
23 | 23 | #include <linux/serial_8250.h> |
24 | 24 | #include <linux/serial_reg.h> |
25 | +#include <linux/smc91x.h> | |
25 | 26 | |
26 | 27 | #include <mach/hardware.h> |
27 | 28 | #include <asm/mach-types.h> |
... | ... | @@ -106,6 +107,12 @@ |
106 | 107 | .resource = &voiceblue_flash_resource, |
107 | 108 | }; |
108 | 109 | |
110 | +static struct smc91x_platdata voiceblue_smc91x_info = { | |
111 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
112 | + .leda = RPC_LED_100_10, | |
113 | + .ledb = RPC_LED_TX_RX, | |
114 | +}; | |
115 | + | |
109 | 116 | static struct resource voiceblue_smc91x_resources[] = { |
110 | 117 | [0] = { |
111 | 118 | .start = OMAP_CS2_PHYS + 0x300, |
... | ... | @@ -122,6 +129,9 @@ |
122 | 129 | static struct platform_device voiceblue_smc91x_device = { |
123 | 130 | .name = "smc91x", |
124 | 131 | .id = 0, |
132 | + .dev = { | |
133 | + .platform_data = &voiceblue_smc91x_info, | |
134 | + }, | |
125 | 135 | .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), |
126 | 136 | .resource = voiceblue_smc91x_resources, |
127 | 137 | }; |
arch/arm/mach-omap2/board-apollon.c
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | #include <linux/leds.h> |
27 | 27 | #include <linux/err.h> |
28 | 28 | #include <linux/clk.h> |
29 | +#include <linux/smc91x.h> | |
29 | 30 | |
30 | 31 | #include <mach/hardware.h> |
31 | 32 | #include <asm/mach-types.h> |
... | ... | @@ -120,6 +121,12 @@ |
120 | 121 | apollon_flash_resource[0].end = base + SZ_128K - 1; |
121 | 122 | } |
122 | 123 | |
124 | +static struct smc91x_platdata appolon_smc91x_info = { | |
125 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
126 | + .leda = RPC_LED_100_10, | |
127 | + .ledb = RPC_LED_TX_RX, | |
128 | +}; | |
129 | + | |
123 | 130 | static struct resource apollon_smc91x_resources[] = { |
124 | 131 | [0] = { |
125 | 132 | .flags = IORESOURCE_MEM, |
... | ... | @@ -134,6 +141,9 @@ |
134 | 141 | static struct platform_device apollon_smc91x_device = { |
135 | 142 | .name = "smc91x", |
136 | 143 | .id = -1, |
144 | + .dev = { | |
145 | + .platform_data = &appolon_smc91x_info, | |
146 | + }, | |
137 | 147 | .num_resources = ARRAY_SIZE(apollon_smc91x_resources), |
138 | 148 | .resource = apollon_smc91x_resources, |
139 | 149 | }; |
arch/arm/mach-omap2/gpmc-smc91x.c
... | ... | @@ -33,17 +33,19 @@ |
33 | 33 | }; |
34 | 34 | |
35 | 35 | static struct smc91x_platdata gpmc_smc91x_info = { |
36 | - .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0, | |
36 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_0, | |
37 | + .leda = RPC_LED_100_10, | |
38 | + .ledb = RPC_LED_TX_RX, | |
37 | 39 | }; |
38 | 40 | |
39 | 41 | static struct platform_device gpmc_smc91x_device = { |
40 | 42 | .name = "smc91x", |
41 | 43 | .id = -1, |
42 | - .num_resources = ARRAY_SIZE(gpmc_smc91x_resources), | |
43 | - .resource = gpmc_smc91x_resources, | |
44 | 44 | .dev = { |
45 | 45 | .platform_data = &gpmc_smc91x_info, |
46 | 46 | }, |
47 | + .num_resources = ARRAY_SIZE(gpmc_smc91x_resources), | |
48 | + .resource = gpmc_smc91x_resources, | |
47 | 49 | }; |
48 | 50 | |
49 | 51 | /* |
arch/arm/plat-omap/debug-devices.c
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | #include <linux/init.h> |
14 | 14 | #include <linux/platform_device.h> |
15 | 15 | #include <linux/io.h> |
16 | +#include <linux/smc91x.h> | |
16 | 17 | |
17 | 18 | #include <mach/hardware.h> |
18 | 19 | |
... | ... | @@ -24,6 +25,12 @@ |
24 | 25 | * platforms include H2, H3, H4, and Perseus2. |
25 | 26 | */ |
26 | 27 | |
28 | +static struct smc91x_platdata smc91x_info = { | |
29 | + .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | |
30 | + .leda = RPC_LED_100_10, | |
31 | + .ledb = RPC_LED_TX_RX, | |
32 | +}; | |
33 | + | |
27 | 34 | static struct resource smc91x_resources[] = { |
28 | 35 | [0] = { |
29 | 36 | .flags = IORESOURCE_MEM, |
... | ... | @@ -36,6 +43,9 @@ |
36 | 43 | static struct platform_device smc91x_device = { |
37 | 44 | .name = "smc91x", |
38 | 45 | .id = -1, |
46 | + .dev = { | |
47 | + .platform_data = &smc91x_info, | |
48 | + }, | |
39 | 49 | .num_resources = ARRAY_SIZE(smc91x_resources), |
40 | 50 | .resource = smc91x_resources, |
41 | 51 | }; |