diff options
-rw-r--r-- | arch/mips/ar7/platform.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 542244961780..c4737ce6d29c 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/leds.h> | 33 | #include <linux/leds.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <linux/phy.h> | ||
37 | #include <linux/phy_fixed.h> | ||
36 | 38 | ||
37 | #include <asm/addrspace.h> | 39 | #include <asm/addrspace.h> |
38 | #include <asm/mach-ar7/ar7.h> | 40 | #include <asm/mach-ar7/ar7.h> |
@@ -209,6 +211,12 @@ static struct physmap_flash_data physmap_flash_data = { | |||
209 | .width = 2, | 211 | .width = 2, |
210 | }; | 212 | }; |
211 | 213 | ||
214 | static struct fixed_phy_status fixed_phy_status __initdata = { | ||
215 | .link = 1, | ||
216 | .speed = 100, | ||
217 | .duplex = 1, | ||
218 | }; | ||
219 | |||
212 | static struct plat_cpmac_data cpmac_low_data = { | 220 | static struct plat_cpmac_data cpmac_low_data = { |
213 | .reset_bit = 17, | 221 | .reset_bit = 17, |
214 | .power_bit = 20, | 222 | .power_bit = 20, |
@@ -530,6 +538,9 @@ static int __init ar7_register_devices(void) | |||
530 | } | 538 | } |
531 | 539 | ||
532 | if (ar7_has_high_cpmac()) { | 540 | if (ar7_has_high_cpmac()) { |
541 | res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); | ||
542 | if (res && res != -ENODEV) | ||
543 | return res; | ||
533 | cpmac_get_mac(1, cpmac_high_data.dev_addr); | 544 | cpmac_get_mac(1, cpmac_high_data.dev_addr); |
534 | res = platform_device_register(&cpmac_high); | 545 | res = platform_device_register(&cpmac_high); |
535 | if (res) | 546 | if (res) |
@@ -538,6 +549,10 @@ static int __init ar7_register_devices(void) | |||
538 | cpmac_low_data.phy_mask = 0xffffffff; | 549 | cpmac_low_data.phy_mask = 0xffffffff; |
539 | } | 550 | } |
540 | 551 | ||
552 | res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status); | ||
553 | if (res && res != -ENODEV) | ||
554 | return res; | ||
555 | |||
541 | cpmac_get_mac(0, cpmac_low_data.dev_addr); | 556 | cpmac_get_mac(0, cpmac_low_data.dev_addr); |
542 | res = platform_device_register(&cpmac_low); | 557 | res = platform_device_register(&cpmac_low); |
543 | if (res) | 558 | if (res) |