diff options
50 files changed, 87 insertions, 82 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index adad70db70eb..695aecab0a67 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -200,7 +200,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {} | |||
200 | 200 | ||
201 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | 201 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) |
202 | static u64 eth_dmamask = DMA_BIT_MASK(32); | 202 | static u64 eth_dmamask = DMA_BIT_MASK(32); |
203 | static struct at91_eth_data eth_data; | 203 | static struct macb_platform_data eth_data; |
204 | 204 | ||
205 | static struct resource eth_resources[] = { | 205 | static struct resource eth_resources[] = { |
206 | [0] = { | 206 | [0] = { |
@@ -227,7 +227,7 @@ static struct platform_device at91cap9_eth_device = { | |||
227 | .num_resources = ARRAY_SIZE(eth_resources), | 227 | .num_resources = ARRAY_SIZE(eth_resources), |
228 | }; | 228 | }; |
229 | 229 | ||
230 | void __init at91_add_device_eth(struct at91_eth_data *data) | 230 | void __init at91_add_device_eth(struct macb_platform_data *data) |
231 | { | 231 | { |
232 | if (!data) | 232 | if (!data) |
233 | return; | 233 | return; |
@@ -264,7 +264,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data) | |||
264 | platform_device_register(&at91cap9_eth_device); | 264 | platform_device_register(&at91cap9_eth_device); |
265 | } | 265 | } |
266 | #else | 266 | #else |
267 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | 267 | void __init at91_add_device_eth(struct macb_platform_data *data) {} |
268 | #endif | 268 | #endif |
269 | 269 | ||
270 | 270 | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 66591fa53e05..5610f14e342e 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -135,7 +135,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {} | |||
135 | 135 | ||
136 | #if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE) | 136 | #if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE) |
137 | static u64 eth_dmamask = DMA_BIT_MASK(32); | 137 | static u64 eth_dmamask = DMA_BIT_MASK(32); |
138 | static struct at91_eth_data eth_data; | 138 | static struct macb_platform_data eth_data; |
139 | 139 | ||
140 | static struct resource eth_resources[] = { | 140 | static struct resource eth_resources[] = { |
141 | [0] = { | 141 | [0] = { |
@@ -162,7 +162,7 @@ static struct platform_device at91rm9200_eth_device = { | |||
162 | .num_resources = ARRAY_SIZE(eth_resources), | 162 | .num_resources = ARRAY_SIZE(eth_resources), |
163 | }; | 163 | }; |
164 | 164 | ||
165 | void __init at91_add_device_eth(struct at91_eth_data *data) | 165 | void __init at91_add_device_eth(struct macb_platform_data *data) |
166 | { | 166 | { |
167 | if (!data) | 167 | if (!data) |
168 | return; | 168 | return; |
@@ -199,7 +199,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data) | |||
199 | platform_device_register(&at91rm9200_eth_device); | 199 | platform_device_register(&at91rm9200_eth_device); |
200 | } | 200 | } |
201 | #else | 201 | #else |
202 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | 202 | void __init at91_add_device_eth(struct macb_platform_data *data) {} |
203 | #endif | 203 | #endif |
204 | 204 | ||
205 | 205 | ||
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 25e3464fb07f..ff75f7d4091b 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -136,7 +136,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {} | |||
136 | 136 | ||
137 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | 137 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) |
138 | static u64 eth_dmamask = DMA_BIT_MASK(32); | 138 | static u64 eth_dmamask = DMA_BIT_MASK(32); |
139 | static struct at91_eth_data eth_data; | 139 | static struct macb_platform_data eth_data; |
140 | 140 | ||
141 | static struct resource eth_resources[] = { | 141 | static struct resource eth_resources[] = { |
142 | [0] = { | 142 | [0] = { |
@@ -163,7 +163,7 @@ static struct platform_device at91sam9260_eth_device = { | |||
163 | .num_resources = ARRAY_SIZE(eth_resources), | 163 | .num_resources = ARRAY_SIZE(eth_resources), |
164 | }; | 164 | }; |
165 | 165 | ||
166 | void __init at91_add_device_eth(struct at91_eth_data *data) | 166 | void __init at91_add_device_eth(struct macb_platform_data *data) |
167 | { | 167 | { |
168 | if (!data) | 168 | if (!data) |
169 | return; | 169 | return; |
@@ -200,7 +200,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data) | |||
200 | platform_device_register(&at91sam9260_eth_device); | 200 | platform_device_register(&at91sam9260_eth_device); |
201 | } | 201 | } |
202 | #else | 202 | #else |
203 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | 203 | void __init at91_add_device_eth(struct macb_platform_data *data) {} |
204 | #endif | 204 | #endif |
205 | 205 | ||
206 | 206 | ||
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index ad017eb1f8df..68562ce2af94 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -144,7 +144,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {} | |||
144 | 144 | ||
145 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | 145 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) |
146 | static u64 eth_dmamask = DMA_BIT_MASK(32); | 146 | static u64 eth_dmamask = DMA_BIT_MASK(32); |
147 | static struct at91_eth_data eth_data; | 147 | static struct macb_platform_data eth_data; |
148 | 148 | ||
149 | static struct resource eth_resources[] = { | 149 | static struct resource eth_resources[] = { |
150 | [0] = { | 150 | [0] = { |
@@ -171,7 +171,7 @@ static struct platform_device at91sam9263_eth_device = { | |||
171 | .num_resources = ARRAY_SIZE(eth_resources), | 171 | .num_resources = ARRAY_SIZE(eth_resources), |
172 | }; | 172 | }; |
173 | 173 | ||
174 | void __init at91_add_device_eth(struct at91_eth_data *data) | 174 | void __init at91_add_device_eth(struct macb_platform_data *data) |
175 | { | 175 | { |
176 | if (!data) | 176 | if (!data) |
177 | return; | 177 | return; |
@@ -208,7 +208,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data) | |||
208 | platform_device_register(&at91sam9263_eth_device); | 208 | platform_device_register(&at91sam9263_eth_device); |
209 | } | 209 | } |
210 | #else | 210 | #else |
211 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | 211 | void __init at91_add_device_eth(struct macb_platform_data *data) {} |
212 | #endif | 212 | #endif |
213 | 213 | ||
214 | 214 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 09a16d6bd5cd..e2cb835c4d7c 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -284,7 +284,7 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {} | |||
284 | 284 | ||
285 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | 285 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) |
286 | static u64 eth_dmamask = DMA_BIT_MASK(32); | 286 | static u64 eth_dmamask = DMA_BIT_MASK(32); |
287 | static struct at91_eth_data eth_data; | 287 | static struct macb_platform_data eth_data; |
288 | 288 | ||
289 | static struct resource eth_resources[] = { | 289 | static struct resource eth_resources[] = { |
290 | [0] = { | 290 | [0] = { |
@@ -311,7 +311,7 @@ static struct platform_device at91sam9g45_eth_device = { | |||
311 | .num_resources = ARRAY_SIZE(eth_resources), | 311 | .num_resources = ARRAY_SIZE(eth_resources), |
312 | }; | 312 | }; |
313 | 313 | ||
314 | void __init at91_add_device_eth(struct at91_eth_data *data) | 314 | void __init at91_add_device_eth(struct macb_platform_data *data) |
315 | { | 315 | { |
316 | if (!data) | 316 | if (!data) |
317 | return; | 317 | return; |
@@ -348,7 +348,7 @@ void __init at91_add_device_eth(struct at91_eth_data *data) | |||
348 | platform_device_register(&at91sam9g45_eth_device); | 348 | platform_device_register(&at91sam9g45_eth_device); |
349 | } | 349 | } |
350 | #else | 350 | #else |
351 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | 351 | void __init at91_add_device_eth(struct macb_platform_data *data) {} |
352 | #endif | 352 | #endif |
353 | 353 | ||
354 | 354 | ||
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 367d5cd5e362..a60d98d7c3e2 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -63,7 +63,7 @@ static void __init onearm_init_early(void) | |||
63 | at91_set_serial_console(0); | 63 | at91_set_serial_console(0); |
64 | } | 64 | } |
65 | 65 | ||
66 | static struct at91_eth_data __initdata onearm_eth_data = { | 66 | static struct macb_platform_data __initdata onearm_eth_data = { |
67 | .phy_irq_pin = AT91_PIN_PC4, | 67 | .phy_irq_pin = AT91_PIN_PC4, |
68 | .is_rmii = 1, | 68 | .is_rmii = 1, |
69 | }; | 69 | }; |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 4282d96dffa8..17fc77925707 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -103,7 +103,7 @@ static struct spi_board_info afeb9260_spi_devices[] = { | |||
103 | /* | 103 | /* |
104 | * MACB Ethernet device | 104 | * MACB Ethernet device |
105 | */ | 105 | */ |
106 | static struct at91_eth_data __initdata afeb9260_macb_data = { | 106 | static struct macb_platform_data __initdata afeb9260_macb_data = { |
107 | .phy_irq_pin = AT91_PIN_PA9, | 107 | .phy_irq_pin = AT91_PIN_PA9, |
108 | .is_rmii = 0, | 108 | .is_rmii = 0, |
109 | }; | 109 | }; |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index f90cfb32bad2..2037d2c40eb4 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -115,7 +115,7 @@ static struct spi_board_info cam60_spi_devices[] __initdata = { | |||
115 | /* | 115 | /* |
116 | * MACB Ethernet device | 116 | * MACB Ethernet device |
117 | */ | 117 | */ |
118 | static struct __initdata at91_eth_data cam60_macb_data = { | 118 | static struct __initdata macb_platform_data cam60_macb_data = { |
119 | .phy_irq_pin = AT91_PIN_PB5, | 119 | .phy_irq_pin = AT91_PIN_PB5, |
120 | .is_rmii = 0, | 120 | .is_rmii = 0, |
121 | }; | 121 | }; |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 5dffd3be62d2..af5520c366fe 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -153,7 +153,7 @@ static struct at91_mmc_data __initdata cap9adk_mmc_data = { | |||
153 | /* | 153 | /* |
154 | * MACB Ethernet device | 154 | * MACB Ethernet device |
155 | */ | 155 | */ |
156 | static struct at91_eth_data __initdata cap9adk_macb_data = { | 156 | static struct macb_platform_data __initdata cap9adk_macb_data = { |
157 | .is_rmii = 1, | 157 | .is_rmii = 1, |
158 | }; | 158 | }; |
159 | 159 | ||
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 774c87fcbd5b..529b356cdb7d 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -57,7 +57,7 @@ static void __init carmeva_init_early(void) | |||
57 | at91_set_serial_console(0); | 57 | at91_set_serial_console(0); |
58 | } | 58 | } |
59 | 59 | ||
60 | static struct at91_eth_data __initdata carmeva_eth_data = { | 60 | static struct macb_platform_data __initdata carmeva_eth_data = { |
61 | .phy_irq_pin = AT91_PIN_PC4, | 61 | .phy_irq_pin = AT91_PIN_PC4, |
62 | .is_rmii = 1, | 62 | .is_rmii = 1, |
63 | }; | 63 | }; |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index fc885a4ce243..04d2b9b50464 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -99,7 +99,7 @@ static struct at91_udc_data __initdata cpu9krea_udc_data = { | |||
99 | /* | 99 | /* |
100 | * MACB Ethernet device | 100 | * MACB Ethernet device |
101 | */ | 101 | */ |
102 | static struct at91_eth_data __initdata cpu9krea_macb_data = { | 102 | static struct macb_platform_data __initdata cpu9krea_macb_data = { |
103 | .is_rmii = 1, | 103 | .is_rmii = 1, |
104 | }; | 104 | }; |
105 | 105 | ||
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index d35e65b08ccd..7a4c82e8da51 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -82,7 +82,7 @@ static void __init cpuat91_init_early(void) | |||
82 | at91_set_serial_console(0); | 82 | at91_set_serial_console(0); |
83 | } | 83 | } |
84 | 84 | ||
85 | static struct at91_eth_data __initdata cpuat91_eth_data = { | 85 | static struct macb_platform_data __initdata cpuat91_eth_data = { |
86 | .is_rmii = 1, | 86 | .is_rmii = 1, |
87 | }; | 87 | }; |
88 | 88 | ||
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index c3936665e645..b004b20b8e42 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -58,7 +58,7 @@ static void __init csb337_init_early(void) | |||
58 | at91_set_serial_console(0); | 58 | at91_set_serial_console(0); |
59 | } | 59 | } |
60 | 60 | ||
61 | static struct at91_eth_data __initdata csb337_eth_data = { | 61 | static struct macb_platform_data __initdata csb337_eth_data = { |
62 | .phy_irq_pin = AT91_PIN_PC2, | 62 | .phy_irq_pin = AT91_PIN_PC2, |
63 | .is_rmii = 0, | 63 | .is_rmii = 0, |
64 | }; | 64 | }; |
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index 586100e2acbb..e966de5219c7 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -52,7 +52,7 @@ static void __init csb637_init_early(void) | |||
52 | at91_set_serial_console(0); | 52 | at91_set_serial_console(0); |
53 | } | 53 | } |
54 | 54 | ||
55 | static struct at91_eth_data __initdata csb637_eth_data = { | 55 | static struct macb_platform_data __initdata csb637_eth_data = { |
56 | .phy_irq_pin = AT91_PIN_PC0, | 56 | .phy_irq_pin = AT91_PIN_PC0, |
57 | .is_rmii = 0, | 57 | .is_rmii = 0, |
58 | }; | 58 | }; |
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index 45db7a3dbef0..3788fa527121 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -60,7 +60,7 @@ static void __init eb9200_init_early(void) | |||
60 | at91_set_serial_console(0); | 60 | at91_set_serial_console(0); |
61 | } | 61 | } |
62 | 62 | ||
63 | static struct at91_eth_data __initdata eb9200_eth_data = { | 63 | static struct macb_platform_data __initdata eb9200_eth_data = { |
64 | .phy_irq_pin = AT91_PIN_PC4, | 64 | .phy_irq_pin = AT91_PIN_PC4, |
65 | .is_rmii = 1, | 65 | .is_rmii = 1, |
66 | }; | 66 | }; |
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 2f9c16d29212..af7622eae1a9 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -64,7 +64,7 @@ static void __init ecb_at91init_early(void) | |||
64 | at91_set_serial_console(0); | 64 | at91_set_serial_console(0); |
65 | } | 65 | } |
66 | 66 | ||
67 | static struct at91_eth_data __initdata ecb_at91eth_data = { | 67 | static struct macb_platform_data __initdata ecb_at91eth_data = { |
68 | .phy_irq_pin = AT91_PIN_PC4, | 68 | .phy_irq_pin = AT91_PIN_PC4, |
69 | .is_rmii = 0, | 69 | .is_rmii = 0, |
70 | }; | 70 | }; |
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index 8252c722607b..8e75867d1d18 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -47,7 +47,7 @@ static void __init eco920_init_early(void) | |||
47 | at91_set_serial_console(0); | 47 | at91_set_serial_console(0); |
48 | } | 48 | } |
49 | 49 | ||
50 | static struct at91_eth_data __initdata eco920_eth_data = { | 50 | static struct macb_platform_data __initdata eco920_eth_data = { |
51 | .phy_irq_pin = AT91_PIN_PC2, | 51 | .phy_irq_pin = AT91_PIN_PC2, |
52 | .is_rmii = 1, | 52 | .is_rmii = 1, |
53 | }; | 53 | }; |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index f27d1a780cfa..de8e09642f4e 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -135,7 +135,7 @@ static struct spi_board_info foxg20_spi_devices[] = { | |||
135 | /* | 135 | /* |
136 | * MACB Ethernet device | 136 | * MACB Ethernet device |
137 | */ | 137 | */ |
138 | static struct at91_eth_data __initdata foxg20_macb_data = { | 138 | static struct macb_platform_data __initdata foxg20_macb_data = { |
139 | .phy_irq_pin = AT91_PIN_PA7, | 139 | .phy_irq_pin = AT91_PIN_PA7, |
140 | .is_rmii = 1, | 140 | .is_rmii = 1, |
141 | }; | 141 | }; |
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index 2e95949737e6..51c82f151119 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -93,7 +93,7 @@ static struct at91_udc_data __initdata udc_data = { | |||
93 | /* | 93 | /* |
94 | * MACB Ethernet device | 94 | * MACB Ethernet device |
95 | */ | 95 | */ |
96 | static struct at91_eth_data __initdata macb_data = { | 96 | static struct macb_platform_data __initdata macb_data = { |
97 | .phy_irq_pin = AT91_PIN_PA28, | 97 | .phy_irq_pin = AT91_PIN_PA28, |
98 | .is_rmii = 1, | 98 | .is_rmii = 1, |
99 | }; | 99 | }; |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index 3bae73e63633..9628a3defcf4 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -61,7 +61,7 @@ static void __init kafa_init_early(void) | |||
61 | at91_set_serial_console(0); | 61 | at91_set_serial_console(0); |
62 | } | 62 | } |
63 | 63 | ||
64 | static struct at91_eth_data __initdata kafa_eth_data = { | 64 | static struct macb_platform_data __initdata kafa_eth_data = { |
65 | .phy_irq_pin = AT91_PIN_PC4, | 65 | .phy_irq_pin = AT91_PIN_PC4, |
66 | .is_rmii = 0, | 66 | .is_rmii = 0, |
67 | }; | 67 | }; |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index e61351ffad50..5ba5244cb632 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -69,7 +69,7 @@ static void __init kb9202_init_early(void) | |||
69 | at91_set_serial_console(0); | 69 | at91_set_serial_console(0); |
70 | } | 70 | } |
71 | 71 | ||
72 | static struct at91_eth_data __initdata kb9202_eth_data = { | 72 | static struct macb_platform_data __initdata kb9202_eth_data = { |
73 | .phy_irq_pin = AT91_PIN_PB29, | 73 | .phy_irq_pin = AT91_PIN_PB29, |
74 | .is_rmii = 0, | 74 | .is_rmii = 0, |
75 | }; | 75 | }; |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index ef816c17dc61..56e7aee11b59 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -155,7 +155,7 @@ static struct at91_mmc_data __initdata neocore926_mmc_data = { | |||
155 | /* | 155 | /* |
156 | * MACB Ethernet device | 156 | * MACB Ethernet device |
157 | */ | 157 | */ |
158 | static struct at91_eth_data __initdata neocore926_macb_data = { | 158 | static struct macb_platform_data __initdata neocore926_macb_data = { |
159 | .phy_irq_pin = AT91_PIN_PE31, | 159 | .phy_irq_pin = AT91_PIN_PE31, |
160 | .is_rmii = 1, | 160 | .is_rmii = 1, |
161 | }; | 161 | }; |
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index 49e3f699b48e..c545a3e635a4 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -122,7 +122,7 @@ static struct at91_udc_data __initdata pcontrol_g20_udc_data = { | |||
122 | /* | 122 | /* |
123 | * MACB Ethernet device | 123 | * MACB Ethernet device |
124 | */ | 124 | */ |
125 | static struct at91_eth_data __initdata macb_data = { | 125 | static struct macb_platform_data __initdata macb_data = { |
126 | .phy_irq_pin = AT91_PIN_PA28, | 126 | .phy_irq_pin = AT91_PIN_PA28, |
127 | .is_rmii = 1, | 127 | .is_rmii = 1, |
128 | }; | 128 | }; |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index 0a8fe6a1b7c8..dc18759a24b4 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -60,7 +60,7 @@ static void __init picotux200_init_early(void) | |||
60 | at91_set_serial_console(0); | 60 | at91_set_serial_console(0); |
61 | } | 61 | } |
62 | 62 | ||
63 | static struct at91_eth_data __initdata picotux200_eth_data = { | 63 | static struct macb_platform_data __initdata picotux200_eth_data = { |
64 | .phy_irq_pin = AT91_PIN_PC4, | 64 | .phy_irq_pin = AT91_PIN_PC4, |
65 | .is_rmii = 1, | 65 | .is_rmii = 1, |
66 | }; | 66 | }; |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 07421bdb88ea..5444d6ac514a 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -104,7 +104,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
104 | /* | 104 | /* |
105 | * MACB Ethernet device | 105 | * MACB Ethernet device |
106 | */ | 106 | */ |
107 | static struct at91_eth_data __initdata ek_macb_data = { | 107 | static struct macb_platform_data __initdata ek_macb_data = { |
108 | .phy_irq_pin = AT91_PIN_PA31, | 108 | .phy_irq_pin = AT91_PIN_PA31, |
109 | .is_rmii = 1, | 109 | .is_rmii = 1, |
110 | }; | 110 | }; |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 80a8c9c6e922..022d0cebda9d 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -65,7 +65,7 @@ static void __init dk_init_early(void) | |||
65 | at91_set_serial_console(0); | 65 | at91_set_serial_console(0); |
66 | } | 66 | } |
67 | 67 | ||
68 | static struct at91_eth_data __initdata dk_eth_data = { | 68 | static struct macb_platform_data __initdata dk_eth_data = { |
69 | .phy_irq_pin = AT91_PIN_PC4, | 69 | .phy_irq_pin = AT91_PIN_PC4, |
70 | .is_rmii = 1, | 70 | .is_rmii = 1, |
71 | }; | 71 | }; |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index 99fd7f8aee0e..ed275861adef 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -65,7 +65,7 @@ static void __init ek_init_early(void) | |||
65 | at91_set_serial_console(0); | 65 | at91_set_serial_console(0); |
66 | } | 66 | } |
67 | 67 | ||
68 | static struct at91_eth_data __initdata ek_eth_data = { | 68 | static struct macb_platform_data __initdata ek_eth_data = { |
69 | .phy_irq_pin = AT91_PIN_PC4, | 69 | .phy_irq_pin = AT91_PIN_PC4, |
70 | .is_rmii = 1, | 70 | .is_rmii = 1, |
71 | }; | 71 | }; |
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c index e927df0175df..ed3b21f77674 100644 --- a/arch/arm/mach-at91/board-rsi-ews.c +++ b/arch/arm/mach-at91/board-rsi-ews.c | |||
@@ -60,7 +60,7 @@ static void __init rsi_ews_init_early(void) | |||
60 | /* | 60 | /* |
61 | * Ethernet | 61 | * Ethernet |
62 | */ | 62 | */ |
63 | static struct at91_eth_data rsi_ews_eth_data __initdata = { | 63 | static struct macb_platform_data rsi_ews_eth_data __initdata = { |
64 | .phy_irq_pin = AT91_PIN_PC4, | 64 | .phy_irq_pin = AT91_PIN_PC4, |
65 | .is_rmii = 1, | 65 | .is_rmii = 1, |
66 | }; | 66 | }; |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 072d53af98d9..3e4b50e6f6ab 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -109,7 +109,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
109 | /* | 109 | /* |
110 | * MACB Ethernet device | 110 | * MACB Ethernet device |
111 | */ | 111 | */ |
112 | static struct at91_eth_data __initdata ek_macb_data = { | 112 | static struct macb_platform_data __initdata ek_macb_data = { |
113 | .phy_irq_pin = AT91_PIN_PA7, | 113 | .phy_irq_pin = AT91_PIN_PA7, |
114 | .is_rmii = 0, | 114 | .is_rmii = 0, |
115 | }; | 115 | }; |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 4f10181a0782..13478e14a543 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -151,7 +151,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
151 | /* | 151 | /* |
152 | * MACB Ethernet device | 152 | * MACB Ethernet device |
153 | */ | 153 | */ |
154 | static struct at91_eth_data __initdata ek_macb_data = { | 154 | static struct macb_platform_data __initdata ek_macb_data = { |
155 | .phy_irq_pin = AT91_PIN_PA7, | 155 | .phy_irq_pin = AT91_PIN_PA7, |
156 | .is_rmii = 1, | 156 | .is_rmii = 1, |
157 | }; | 157 | }; |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index bccdcf23caa1..fcf194e6e4fe 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -158,7 +158,7 @@ static struct at91_mmc_data __initdata ek_mmc_data = { | |||
158 | /* | 158 | /* |
159 | * MACB Ethernet device | 159 | * MACB Ethernet device |
160 | */ | 160 | */ |
161 | static struct at91_eth_data __initdata ek_macb_data = { | 161 | static struct macb_platform_data __initdata ek_macb_data = { |
162 | .phy_irq_pin = AT91_PIN_PE31, | 162 | .phy_irq_pin = AT91_PIN_PE31, |
163 | .is_rmii = 1, | 163 | .is_rmii = 1, |
164 | }; | 164 | }; |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 64fc75c9d0ac..78d27cc3cc09 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -123,7 +123,7 @@ static struct spi_board_info ek_spi_devices[] = { | |||
123 | /* | 123 | /* |
124 | * MACB Ethernet device | 124 | * MACB Ethernet device |
125 | */ | 125 | */ |
126 | static struct at91_eth_data __initdata ek_macb_data = { | 126 | static struct macb_platform_data __initdata ek_macb_data = { |
127 | .phy_irq_pin = AT91_PIN_PA7, | 127 | .phy_irq_pin = AT91_PIN_PA7, |
128 | .is_rmii = 1, | 128 | .is_rmii = 1, |
129 | }; | 129 | }; |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 92de9127923a..4e1ee9d87096 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -115,7 +115,7 @@ static struct mci_platform_data __initdata mci1_data = { | |||
115 | /* | 115 | /* |
116 | * MACB Ethernet device | 116 | * MACB Ethernet device |
117 | */ | 117 | */ |
118 | static struct at91_eth_data __initdata ek_macb_data = { | 118 | static struct macb_platform_data __initdata ek_macb_data = { |
119 | .phy_irq_pin = AT91_PIN_PD5, | 119 | .phy_irq_pin = AT91_PIN_PD5, |
120 | .is_rmii = 1, | 120 | .is_rmii = 1, |
121 | }; | 121 | }; |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index 0df01c6e2d0c..fbec934a7ce9 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -65,7 +65,7 @@ static struct at91_udc_data __initdata snapper9260_udc_data = { | |||
65 | .vbus_polled = 1, | 65 | .vbus_polled = 1, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static struct at91_eth_data snapper9260_macb_data = { | 68 | static struct macb_platform_data snapper9260_macb_data = { |
69 | .is_rmii = 1, | 69 | .is_rmii = 1, |
70 | }; | 70 | }; |
71 | 71 | ||
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 936e5fd7f406..7c06c07d872b 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -157,7 +157,7 @@ static struct at91_udc_data __initdata stamp9g20evb_udc_data = { | |||
157 | /* | 157 | /* |
158 | * MACB Ethernet device | 158 | * MACB Ethernet device |
159 | */ | 159 | */ |
160 | static struct at91_eth_data __initdata macb_data = { | 160 | static struct macb_platform_data __initdata macb_data = { |
161 | .phy_irq_pin = AT91_PIN_PA28, | 161 | .phy_irq_pin = AT91_PIN_PA28, |
162 | .is_rmii = 1, | 162 | .is_rmii = 1, |
163 | }; | 163 | }; |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index 0a20bab21f99..3d84233f78eb 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -146,7 +146,7 @@ static void __init ek_add_device_spi(void) | |||
146 | /* | 146 | /* |
147 | * MACB Ethernet device | 147 | * MACB Ethernet device |
148 | */ | 148 | */ |
149 | static struct at91_eth_data __initdata ek_macb_data = { | 149 | static struct macb_platform_data __initdata ek_macb_data = { |
150 | .phy_irq_pin = AT91_PIN_PE31, | 150 | .phy_irq_pin = AT91_PIN_PE31, |
151 | .is_rmii = 1, | 151 | .is_rmii = 1, |
152 | }; | 152 | }; |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 12a3f955162b..2c40a21b2794 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -110,7 +110,7 @@ static struct gpio_led yl9200_leds[] = { | |||
110 | /* | 110 | /* |
111 | * Ethernet | 111 | * Ethernet |
112 | */ | 112 | */ |
113 | static struct at91_eth_data __initdata yl9200_eth_data = { | 113 | static struct macb_platform_data __initdata yl9200_eth_data = { |
114 | .phy_irq_pin = AT91_PIN_PB28, | 114 | .phy_irq_pin = AT91_PIN_PB28, |
115 | .is_rmii = 1, | 115 | .is_rmii = 1, |
116 | }; | 116 | }; |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index eac92e995bb5..e209a2992245 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/atmel-mci.h> | 40 | #include <linux/atmel-mci.h> |
41 | #include <sound/atmel-ac97c.h> | 41 | #include <sound/atmel-ac97c.h> |
42 | #include <linux/serial.h> | 42 | #include <linux/serial.h> |
43 | #include <linux/platform_data/macb.h> | ||
43 | 44 | ||
44 | /* USB Device */ | 45 | /* USB Device */ |
45 | struct at91_udc_data { | 46 | struct at91_udc_data { |
@@ -81,18 +82,7 @@ extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | |||
81 | /* atmel-mci platform config */ | 82 | /* atmel-mci platform config */ |
82 | extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data); | 83 | extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data); |
83 | 84 | ||
84 | /* Ethernet (EMAC & MACB) */ | 85 | extern void __init at91_add_device_eth(struct macb_platform_data *data); |
85 | struct at91_eth_data { | ||
86 | u32 phy_mask; | ||
87 | u8 phy_irq_pin; /* PHY IRQ */ | ||
88 | u8 is_rmii; /* using RMII interface? */ | ||
89 | }; | ||
90 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | ||
91 | |||
92 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \ | ||
93 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
94 | #define eth_platform_data at91_eth_data | ||
95 | #endif | ||
96 | 86 | ||
97 | /* USB Host */ | 87 | /* USB Host */ |
98 | struct at91_usbh_data { | 88 | struct at91_usbh_data { |
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index 1f17bde52cd4..7c756fb189f7 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c | |||
@@ -109,7 +109,7 @@ struct eth_addr { | |||
109 | u8 addr[6]; | 109 | u8 addr[6]; |
110 | }; | 110 | }; |
111 | static struct eth_addr __initdata hw_addr[2]; | 111 | static struct eth_addr __initdata hw_addr[2]; |
112 | static struct eth_platform_data __initdata eth_data[2]; | 112 | static struct macb_platform_data __initdata eth_data[2]; |
113 | 113 | ||
114 | static struct spi_board_info spi0_board_info[] __initdata = { | 114 | static struct spi_board_info spi0_board_info[] __initdata = { |
115 | { | 115 | { |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 4643ff5107c9..c56ddac85d61 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -105,7 +105,7 @@ struct eth_addr { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct eth_addr __initdata hw_addr[2]; | 107 | static struct eth_addr __initdata hw_addr[2]; |
108 | static struct eth_platform_data __initdata eth_data[2] = { | 108 | static struct macb_platform_data __initdata eth_data[2] = { |
109 | { | 109 | { |
110 | /* | 110 | /* |
111 | * The MDIO pullups on STK1000 are a bit too weak for | 111 | * The MDIO pullups on STK1000 are a bit too weak for |
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 86fab77a5a00..27bd6fbe21cb 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
@@ -50,7 +50,7 @@ struct eth_addr { | |||
50 | u8 addr[6]; | 50 | u8 addr[6]; |
51 | }; | 51 | }; |
52 | static struct eth_addr __initdata hw_addr[1]; | 52 | static struct eth_addr __initdata hw_addr[1]; |
53 | static struct eth_platform_data __initdata eth_data[1] = { | 53 | static struct macb_platform_data __initdata eth_data[1] = { |
54 | { | 54 | { |
55 | .phy_mask = ~(1U << 1), | 55 | .phy_mask = ~(1U << 1), |
56 | }, | 56 | }, |
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c index da14fbdd4e8e..9d1efd1cd425 100644 --- a/arch/avr32/boards/hammerhead/setup.c +++ b/arch/avr32/boards/hammerhead/setup.c | |||
@@ -102,7 +102,7 @@ struct eth_addr { | |||
102 | }; | 102 | }; |
103 | 103 | ||
104 | static struct eth_addr __initdata hw_addr[1]; | 104 | static struct eth_addr __initdata hw_addr[1]; |
105 | static struct eth_platform_data __initdata eth_data[1]; | 105 | static struct macb_platform_data __initdata eth_data[1]; |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * The next two functions should go away as the boot loader is | 108 | * The next two functions should go away as the boot loader is |
diff --git a/arch/avr32/boards/merisc/setup.c b/arch/avr32/boards/merisc/setup.c index e61bc948f959..ed137e335796 100644 --- a/arch/avr32/boards/merisc/setup.c +++ b/arch/avr32/boards/merisc/setup.c | |||
@@ -52,7 +52,7 @@ struct eth_addr { | |||
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct eth_addr __initdata hw_addr[2]; | 54 | static struct eth_addr __initdata hw_addr[2]; |
55 | static struct eth_platform_data __initdata eth_data[2]; | 55 | static struct macb_platform_data __initdata eth_data[2]; |
56 | 56 | ||
57 | static int ads7846_get_pendown_state_PB26(void) | 57 | static int ads7846_get_pendown_state_PB26(void) |
58 | { | 58 | { |
diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c index c4da5cba2dbf..05358aa5ef7d 100644 --- a/arch/avr32/boards/mimc200/setup.c +++ b/arch/avr32/boards/mimc200/setup.c | |||
@@ -86,7 +86,7 @@ struct eth_addr { | |||
86 | u8 addr[6]; | 86 | u8 addr[6]; |
87 | }; | 87 | }; |
88 | static struct eth_addr __initdata hw_addr[2]; | 88 | static struct eth_addr __initdata hw_addr[2]; |
89 | static struct eth_platform_data __initdata eth_data[2]; | 89 | static struct macb_platform_data __initdata eth_data[2]; |
90 | 90 | ||
91 | static struct spi_eeprom eeprom_25lc010 = { | 91 | static struct spi_eeprom eeprom_25lc010 = { |
92 | .name = "25lc010", | 92 | .name = "25lc010", |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 7fbf0dcb9afe..402a7bb72669 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1067,7 +1067,7 @@ void __init at32_setup_serial_console(unsigned int usart_id) | |||
1067 | * -------------------------------------------------------------------- */ | 1067 | * -------------------------------------------------------------------- */ |
1068 | 1068 | ||
1069 | #ifdef CONFIG_CPU_AT32AP7000 | 1069 | #ifdef CONFIG_CPU_AT32AP7000 |
1070 | static struct eth_platform_data macb0_data; | 1070 | static struct macb_platform_data macb0_data; |
1071 | static struct resource macb0_resource[] = { | 1071 | static struct resource macb0_resource[] = { |
1072 | PBMEM(0xfff01800), | 1072 | PBMEM(0xfff01800), |
1073 | IRQ(25), | 1073 | IRQ(25), |
@@ -1076,7 +1076,7 @@ DEFINE_DEV_DATA(macb, 0); | |||
1076 | DEV_CLK(hclk, macb0, hsb, 8); | 1076 | DEV_CLK(hclk, macb0, hsb, 8); |
1077 | DEV_CLK(pclk, macb0, pbb, 6); | 1077 | DEV_CLK(pclk, macb0, pbb, 6); |
1078 | 1078 | ||
1079 | static struct eth_platform_data macb1_data; | 1079 | static struct macb_platform_data macb1_data; |
1080 | static struct resource macb1_resource[] = { | 1080 | static struct resource macb1_resource[] = { |
1081 | PBMEM(0xfff01c00), | 1081 | PBMEM(0xfff01c00), |
1082 | IRQ(26), | 1082 | IRQ(26), |
@@ -1086,7 +1086,7 @@ DEV_CLK(hclk, macb1, hsb, 9); | |||
1086 | DEV_CLK(pclk, macb1, pbb, 7); | 1086 | DEV_CLK(pclk, macb1, pbb, 7); |
1087 | 1087 | ||
1088 | struct platform_device *__init | 1088 | struct platform_device *__init |
1089 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | 1089 | at32_add_device_eth(unsigned int id, struct macb_platform_data *data) |
1090 | { | 1090 | { |
1091 | struct platform_device *pdev; | 1091 | struct platform_device *pdev; |
1092 | u32 pin_mask; | 1092 | u32 pin_mask; |
@@ -1163,7 +1163,7 @@ at32_add_device_eth(unsigned int id, struct eth_platform_data *data) | |||
1163 | return NULL; | 1163 | return NULL; |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | memcpy(pdev->dev.platform_data, data, sizeof(struct eth_platform_data)); | 1166 | memcpy(pdev->dev.platform_data, data, sizeof(struct macb_platform_data)); |
1167 | platform_device_register(pdev); | 1167 | platform_device_register(pdev); |
1168 | 1168 | ||
1169 | return pdev; | 1169 | return pdev; |
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index 5d7ffca7d69f..67b111ce332d 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/serial.h> | 8 | #include <linux/serial.h> |
9 | #include <linux/platform_data/macb.h> | ||
9 | 10 | ||
10 | #define GPIO_PIN_NONE (-1) | 11 | #define GPIO_PIN_NONE (-1) |
11 | 12 | ||
@@ -42,12 +43,8 @@ struct atmel_uart_data { | |||
42 | void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); | 43 | void at32_map_usart(unsigned int hw_id, unsigned int line, int flags); |
43 | struct platform_device *at32_add_device_usart(unsigned int id); | 44 | struct platform_device *at32_add_device_usart(unsigned int id); |
44 | 45 | ||
45 | struct eth_platform_data { | ||
46 | u32 phy_mask; | ||
47 | u8 is_rmii; | ||
48 | }; | ||
49 | struct platform_device * | 46 | struct platform_device * |
50 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | 47 | at32_add_device_eth(unsigned int id, struct macb_platform_data *data); |
51 | 48 | ||
52 | struct spi_board_info; | 49 | struct spi_board_info; |
53 | struct platform_device * | 50 | struct platform_device * |
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 56624d303487..dfeb46cb3f74 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/ethtool.h> | 28 | #include <linux/ethtool.h> |
29 | #include <linux/platform_data/macb.h> | ||
29 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
30 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
31 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
@@ -984,7 +985,7 @@ static const struct net_device_ops at91ether_netdev_ops = { | |||
984 | static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_address, | 985 | static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_address, |
985 | struct platform_device *pdev, struct clk *ether_clk) | 986 | struct platform_device *pdev, struct clk *ether_clk) |
986 | { | 987 | { |
987 | struct at91_eth_data *board_data = pdev->dev.platform_data; | 988 | struct macb_platform_data *board_data = pdev->dev.platform_data; |
988 | struct net_device *dev; | 989 | struct net_device *dev; |
989 | struct at91_private *lp; | 990 | struct at91_private *lp; |
990 | unsigned int val; | 991 | unsigned int val; |
diff --git a/drivers/net/ethernet/cadence/at91_ether.h b/drivers/net/ethernet/cadence/at91_ether.h index 353f4dab62be..3725fbb0defe 100644 --- a/drivers/net/ethernet/cadence/at91_ether.h +++ b/drivers/net/ethernet/cadence/at91_ether.h | |||
@@ -85,7 +85,9 @@ struct recv_desc_bufs | |||
85 | struct at91_private | 85 | struct at91_private |
86 | { | 86 | { |
87 | struct mii_if_info mii; /* ethtool support */ | 87 | struct mii_if_info mii; /* ethtool support */ |
88 | struct at91_eth_data board_data; /* board-specific configuration */ | 88 | struct macb_platform_data board_data; /* board-specific |
89 | * configuration (shared with | ||
90 | * macb for common data */ | ||
89 | struct clk *ether_clk; /* clock */ | 91 | struct clk *ether_clk; /* clock */ |
90 | 92 | ||
91 | /* PHY */ | 93 | /* PHY */ |
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index b0fa47870add..d97d9ce986f8 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c | |||
@@ -19,12 +19,10 @@ | |||
19 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
20 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/platform_data/macb.h> | ||
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | #include <linux/phy.h> | 24 | #include <linux/phy.h> |
24 | 25 | ||
25 | #include <mach/board.h> | ||
26 | #include <mach/cpu.h> | ||
27 | |||
28 | #include "macb.h" | 26 | #include "macb.h" |
29 | 27 | ||
30 | #define RX_BUFFER_SIZE 128 | 28 | #define RX_BUFFER_SIZE 128 |
@@ -191,7 +189,7 @@ static int macb_mii_probe(struct net_device *dev) | |||
191 | { | 189 | { |
192 | struct macb *bp = netdev_priv(dev); | 190 | struct macb *bp = netdev_priv(dev); |
193 | struct phy_device *phydev; | 191 | struct phy_device *phydev; |
194 | struct eth_platform_data *pdata; | 192 | struct macb_platform_data *pdata; |
195 | int ret; | 193 | int ret; |
196 | 194 | ||
197 | phydev = phy_find_first(bp->mii_bus); | 195 | phydev = phy_find_first(bp->mii_bus); |
@@ -228,7 +226,7 @@ static int macb_mii_probe(struct net_device *dev) | |||
228 | 226 | ||
229 | static int macb_mii_init(struct macb *bp) | 227 | static int macb_mii_init(struct macb *bp) |
230 | { | 228 | { |
231 | struct eth_platform_data *pdata; | 229 | struct macb_platform_data *pdata; |
232 | int err = -ENXIO, i; | 230 | int err = -ENXIO, i; |
233 | 231 | ||
234 | /* Enable management port */ | 232 | /* Enable management port */ |
@@ -1119,7 +1117,7 @@ static const struct net_device_ops macb_netdev_ops = { | |||
1119 | 1117 | ||
1120 | static int __init macb_probe(struct platform_device *pdev) | 1118 | static int __init macb_probe(struct platform_device *pdev) |
1121 | { | 1119 | { |
1122 | struct eth_platform_data *pdata; | 1120 | struct macb_platform_data *pdata; |
1123 | struct resource *regs; | 1121 | struct resource *regs; |
1124 | struct net_device *dev; | 1122 | struct net_device *dev; |
1125 | struct macb *bp; | 1123 | struct macb *bp; |
diff --git a/include/linux/platform_data/macb.h b/include/linux/platform_data/macb.h new file mode 100644 index 000000000000..e7c748fb6053 --- /dev/null +++ b/include/linux/platform_data/macb.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __MACB_PDATA_H__ | ||
9 | #define __MACB_PDATA_H__ | ||
10 | |||
11 | struct macb_platform_data { | ||
12 | u32 phy_mask; | ||
13 | u8 phy_irq_pin; /* PHY IRQ */ | ||
14 | u8 is_rmii; /* using RMII interface? */ | ||
15 | }; | ||
16 | |||
17 | #endif /* __MACB_PDATA_H__ */ | ||