diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2009-12-11 19:16:33 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:33 -0500 |
commit | 3bc48014782a89f7201734d3e23865cb283926a7 (patch) | |
tree | f02691c3a2b919d49ba253060f7ce4d2296f9923 /arch/arm/mach-omap1 | |
parent | 662c8b55d26abeabc0b125f922dfa66338a046ae (diff) |
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>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-fsample.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-innovator.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-perseus2.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/board-voiceblue.c | 10 |
7 files changed, 72 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index f4b72c1654f5..91e7b2f2bc05 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/nand.h> | 19 | #include <linux/mtd/nand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/smc91x.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -100,6 +101,12 @@ static int fsample_keymap[] = { | |||
100 | 0 | 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 | static struct resource smc91x_resources[] = { | 110 | static struct resource smc91x_resources[] = { |
104 | [0] = { | 111 | [0] = { |
105 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ | 112 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ |
@@ -190,6 +197,9 @@ static struct platform_device nand_device = { | |||
190 | static struct platform_device smc91x_device = { | 197 | static struct platform_device smc91x_device = { |
191 | .name = "smc91x", | 198 | .name = "smc91x", |
192 | .id = 0, | 199 | .id = 0, |
200 | .dev = { | ||
201 | .platform_data = &smc91x_info, | ||
202 | }, | ||
193 | .num_resources = ARRAY_SIZE(smc91x_resources), | 203 | .num_resources = ARRAY_SIZE(smc91x_resources), |
194 | .resource = smc91x_resources, | 204 | .resource = smc91x_resources, |
195 | }; | 205 | }; |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 89ba8ec4bbf4..eeafe6ed15cb 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/i2c/tps65010.h> | 30 | #include <linux/i2c/tps65010.h> |
31 | #include <linux/smc91x.h> | ||
31 | 32 | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <asm/gpio.h> | 34 | #include <asm/gpio.h> |
@@ -200,6 +201,12 @@ static struct platform_device h2_nand_device = { | |||
200 | .resource = &h2_nand_resource, | 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 | static struct resource h2_smc91x_resources[] = { | 210 | static struct resource h2_smc91x_resources[] = { |
204 | [0] = { | 211 | [0] = { |
205 | .start = OMAP1610_ETHR_START, /* Physical */ | 212 | .start = OMAP1610_ETHR_START, /* Physical */ |
@@ -216,6 +223,9 @@ static struct resource h2_smc91x_resources[] = { | |||
216 | static struct platform_device h2_smc91x_device = { | 223 | static struct platform_device h2_smc91x_device = { |
217 | .name = "smc91x", | 224 | .name = "smc91x", |
218 | .id = 0, | 225 | .id = 0, |
226 | .dev = { | ||
227 | .platform_data = &h2_smc91x_info, | ||
228 | }, | ||
219 | .num_resources = ARRAY_SIZE(h2_smc91x_resources), | 229 | .num_resources = ARRAY_SIZE(h2_smc91x_resources), |
220 | .resource = h2_smc91x_resources, | 230 | .resource = h2_smc91x_resources, |
221 | }; | 231 | }; |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index f5cc0a730524..e0aee66e43e6 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/i2c/tps65010.h> | 30 | #include <linux/i2c/tps65010.h> |
31 | #include <linux/smc91x.h> | ||
31 | 32 | ||
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
33 | #include <asm/page.h> | 34 | #include <asm/page.h> |
@@ -202,6 +203,12 @@ static struct platform_device nand_device = { | |||
202 | .resource = &nand_resource, | 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 | static struct resource smc91x_resources[] = { | 212 | static struct resource smc91x_resources[] = { |
206 | [0] = { | 213 | [0] = { |
207 | .start = OMAP1710_ETHR_START, /* Physical */ | 214 | .start = OMAP1710_ETHR_START, /* Physical */ |
@@ -218,6 +225,9 @@ static struct resource smc91x_resources[] = { | |||
218 | static struct platform_device smc91x_device = { | 225 | static struct platform_device smc91x_device = { |
219 | .name = "smc91x", | 226 | .name = "smc91x", |
220 | .id = 0, | 227 | .id = 0, |
228 | .dev = { | ||
229 | .platform_data = &smc91x_info, | ||
230 | }, | ||
221 | .num_resources = ARRAY_SIZE(smc91x_resources), | 231 | .num_resources = ARRAY_SIZE(smc91x_resources), |
222 | .resource = smc91x_resources, | 232 | .resource = smc91x_resources, |
223 | }; | 233 | }; |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cf0fdb9c182f..2133b006f6a3 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/smc91x.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
@@ -142,6 +143,11 @@ static struct platform_device innovator_kp_device = { | |||
142 | .resource = innovator_kp_resources, | 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 | #ifdef CONFIG_ARCH_OMAP15XX | 152 | #ifdef CONFIG_ARCH_OMAP15XX |
147 | 153 | ||
@@ -175,6 +181,9 @@ static struct resource innovator1510_smc91x_resources[] = { | |||
175 | static struct platform_device innovator1510_smc91x_device = { | 181 | static struct platform_device innovator1510_smc91x_device = { |
176 | .name = "smc91x", | 182 | .name = "smc91x", |
177 | .id = 0, | 183 | .id = 0, |
184 | .dev = { | ||
185 | .platform_data = &innovator_smc91x_info, | ||
186 | }, | ||
178 | .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources), | 187 | .num_resources = ARRAY_SIZE(innovator1510_smc91x_resources), |
179 | .resource = innovator1510_smc91x_resources, | 188 | .resource = innovator1510_smc91x_resources, |
180 | }; | 189 | }; |
@@ -241,6 +250,9 @@ static struct resource innovator1610_smc91x_resources[] = { | |||
241 | static struct platform_device innovator1610_smc91x_device = { | 250 | static struct platform_device innovator1610_smc91x_device = { |
242 | .name = "smc91x", | 251 | .name = "smc91x", |
243 | .id = 0, | 252 | .id = 0, |
253 | .dev = { | ||
254 | .platform_data = &innovator_smc91x_info, | ||
255 | }, | ||
244 | .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources), | 256 | .num_resources = ARRAY_SIZE(innovator1610_smc91x_resources), |
245 | .resource = innovator1610_smc91x_resources, | 257 | .resource = innovator1610_smc91x_resources, |
246 | }; | 258 | }; |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 50c92c13e48a..ccea4f448e9a 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/leds.h> | 35 | #include <linux/leds.h> |
36 | #include <linux/smc91x.h> | ||
36 | 37 | ||
37 | #include <linux/mtd/mtd.h> | 38 | #include <linux/mtd/mtd.h> |
38 | #include <linux/mtd/partitions.h> | 39 | #include <linux/mtd/partitions.h> |
@@ -115,6 +116,12 @@ static struct platform_device osk5912_flash_device = { | |||
115 | .resource = &osk_flash_resource, | 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 | static struct resource osk5912_smc91x_resources[] = { | 125 | static struct resource osk5912_smc91x_resources[] = { |
119 | [0] = { | 126 | [0] = { |
120 | .start = OMAP_OSK_ETHR_START, /* Physical */ | 127 | .start = OMAP_OSK_ETHR_START, /* Physical */ |
@@ -131,6 +138,9 @@ static struct resource osk5912_smc91x_resources[] = { | |||
131 | static struct platform_device osk5912_smc91x_device = { | 138 | static struct platform_device osk5912_smc91x_device = { |
132 | .name = "smc91x", | 139 | .name = "smc91x", |
133 | .id = -1, | 140 | .id = -1, |
141 | .dev = { | ||
142 | .platform_data = &osk5912_smc91x_info, | ||
143 | }, | ||
134 | .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), | 144 | .num_resources = ARRAY_SIZE(osk5912_smc91x_resources), |
135 | .resource = osk5912_smc91x_resources, | 145 | .resource = osk5912_smc91x_resources, |
136 | }; | 146 | }; |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index ca7df1e93efc..b9ea31289b50 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/nand.h> | 19 | #include <linux/mtd/nand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/smc91x.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
@@ -67,6 +68,12 @@ static int p2_keymap[] = { | |||
67 | 0 | 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 | static struct resource smc91x_resources[] = { | 77 | static struct resource smc91x_resources[] = { |
71 | [0] = { | 78 | [0] = { |
72 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ | 79 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ |
@@ -157,6 +164,9 @@ static struct platform_device nand_device = { | |||
157 | static struct platform_device smc91x_device = { | 164 | static struct platform_device smc91x_device = { |
158 | .name = "smc91x", | 165 | .name = "smc91x", |
159 | .id = 0, | 166 | .id = 0, |
167 | .dev = { | ||
168 | .platform_data = &smc91x_info, | ||
169 | }, | ||
160 | .num_resources = ARRAY_SIZE(smc91x_resources), | 170 | .num_resources = ARRAY_SIZE(smc91x_resources), |
161 | .resource = smc91x_resources, | 171 | .resource = smc91x_resources, |
162 | }; | 172 | }; |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 35c75c1bd0aa..169183537997 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/reboot.h> | 22 | #include <linux/reboot.h> |
23 | #include <linux/serial_8250.h> | 23 | #include <linux/serial_8250.h> |
24 | #include <linux/serial_reg.h> | 24 | #include <linux/serial_reg.h> |
25 | #include <linux/smc91x.h> | ||
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
@@ -106,6 +107,12 @@ static struct platform_device voiceblue_flash_device = { | |||
106 | .resource = &voiceblue_flash_resource, | 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 | static struct resource voiceblue_smc91x_resources[] = { | 116 | static struct resource voiceblue_smc91x_resources[] = { |
110 | [0] = { | 117 | [0] = { |
111 | .start = OMAP_CS2_PHYS + 0x300, | 118 | .start = OMAP_CS2_PHYS + 0x300, |
@@ -122,6 +129,9 @@ static struct resource voiceblue_smc91x_resources[] = { | |||
122 | static struct platform_device voiceblue_smc91x_device = { | 129 | static struct platform_device voiceblue_smc91x_device = { |
123 | .name = "smc91x", | 130 | .name = "smc91x", |
124 | .id = 0, | 131 | .id = 0, |
132 | .dev = { | ||
133 | .platform_data = &voiceblue_smc91x_info, | ||
134 | }, | ||
125 | .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), | 135 | .num_resources = ARRAY_SIZE(voiceblue_smc91x_resources), |
126 | .resource = voiceblue_smc91x_resources, | 136 | .resource = voiceblue_smc91x_resources, |
127 | }; | 137 | }; |