diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index 0f6af41ebb44..4a25c26f0bf4 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c | |||
@@ -214,15 +214,27 @@ static struct platform_device * __init mv64x60_eth_register_shared_pdev( | |||
214 | struct device_node *np, int id) | 214 | struct device_node *np, int id) |
215 | { | 215 | { |
216 | struct platform_device *pdev; | 216 | struct platform_device *pdev; |
217 | struct resource r[1]; | 217 | struct resource r[2]; |
218 | int err; | 218 | int err; |
219 | 219 | ||
220 | err = of_address_to_resource(np, 0, &r[0]); | 220 | err = of_address_to_resource(np, 0, &r[0]); |
221 | if (err) | 221 | if (err) |
222 | return ERR_PTR(err); | 222 | return ERR_PTR(err); |
223 | 223 | ||
224 | /* register an orion mdio bus driver */ | ||
225 | r[1].start = r[0].start + 0x4; | ||
226 | r[1].end = r[0].start + 0x84 - 1; | ||
227 | r[1].flags = IORESOURCE_MEM; | ||
228 | |||
229 | if (id == 0) { | ||
230 | pdev = platform_device_register_simple("orion-mdio", -1, &r[1], 1); | ||
231 | if (!pdev) | ||
232 | return pdev; | ||
233 | } | ||
234 | |||
224 | pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, id, | 235 | pdev = platform_device_register_simple(MV643XX_ETH_SHARED_NAME, id, |
225 | r, 1); | 236 | &r[0], 1); |
237 | |||
226 | return pdev; | 238 | return pdev; |
227 | } | 239 | } |
228 | 240 | ||