1 --- a/arch/mips/ar7/platform.c
2 +++ b/arch/mips/ar7/platform.c
4 #include <linux/string.h>
5 #include <linux/etherdevice.h>
7 -#include <linux/phy_fixed.h>
9 #include <asm/addrspace.h>
10 #include <asm/mach-ar7/ar7.h>
11 @@ -294,12 +293,6 @@ static struct physmap_flash_data physmap
15 -static struct fixed_phy_status fixed_phy_status __initdata = {
21 static struct plat_cpmac_data cpmac_low_data = {
24 @@ -716,11 +709,6 @@ static int __init ar7_register_devices(v
27 if (ar7_has_high_cpmac()) {
28 - res = fixed_phy_add(PHY_POLL, ar7_is_titan() ? cpmac_high_titan.id : cpmac_high.id,
30 - if (res && res != -ENODEV)
33 cpmac_get_mac(1, ar7_is_titan() ? cpmac_high_data_titan.dev_addr :
34 cpmac_high_data.dev_addr);
35 res = platform_device_register(ar7_is_titan() ? &cpmac_high_titan :
36 @@ -736,11 +724,6 @@ static int __init ar7_register_devices(v
40 - res = fixed_phy_add(PHY_POLL, ar7_is_titan() ? cpmac_low_titan.id :
41 - cpmac_low.id, &fixed_phy_status);
42 - if (res && res != -ENODEV)
45 cpmac_get_mac(0, ar7_is_titan() ? cpmac_low_data_titan.dev_addr :
46 cpmac_low_data.dev_addr);
47 res = platform_device_register(ar7_is_titan() ? &cpmac_low_titan :
48 --- a/drivers/net/cpmac.c
49 +++ b/drivers/net/cpmac.c
50 @@ -1117,21 +1117,17 @@ static int __devinit cpmac_probe(struct
52 pdata = pdev->dev.platform_data;
54 - if (external_switch || dumb_switch) {
55 - strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
58 - for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
59 - if (!(pdata->phy_mask & (1 << phy_id)))
61 - if (!cpmac_mii->phy_map[phy_id])
63 - strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
66 + for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
67 + if (!(pdata->phy_mask & (1 << phy_id)))
69 + if (!cpmac_mii->phy_map[phy_id])
71 + strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
76 if (phy_id == PHY_MAX_ADDR) {
77 + //This probably wont work as no fixed bus anymore.
78 dev_err(&pdev->dev, "no PHY present, falling back to switch mode\n");
79 strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
81 @@ -1269,7 +1265,7 @@ int __devinit cpmac_init(void)
84 cpmac_mii->phy_mask = ar7_is_titan()? ~(mask | 0x80000000 | 0x40000000):
85 - ~(mask | 0x80000000);
86 + ~(mask | 0x80000001);
87 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
89 res = mdiobus_register(cpmac_mii);