1 --- a/arch/mips/ar7/platform.c
2 +++ b/arch/mips/ar7/platform.c
3 @@ -716,23 +716,35 @@ static int __init ar7_register_devices(v
6 if (ar7_has_high_cpmac()) {
7 - res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
8 + res = fixed_phy_add(PHY_POLL, ar7_is_titan() ? cpmac_high_titan.id : cpmac_high.id,
10 if (res && res != -ENODEV)
12 - cpmac_get_mac(1, cpmac_high_data.dev_addr);
13 - res = platform_device_register(&cpmac_high);
15 + cpmac_get_mac(1, ar7_is_titan() ? cpmac_high_data_titan.dev_addr :
16 + cpmac_high_data.dev_addr);
17 + res = platform_device_register(ar7_is_titan() ? &cpmac_high_titan :
23 - cpmac_low_data.phy_mask = 0xffffffff;
25 + cpmac_low_data_titan.phy_mask = 0xffffffff;
27 + cpmac_low_data.phy_mask = 0xffffffff;
31 - res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
32 + res = fixed_phy_add(PHY_POLL, ar7_is_titan() ? cpmac_low_titan.id :
33 + cpmac_low.id, &fixed_phy_status);
34 if (res && res != -ENODEV)
37 - cpmac_get_mac(0, cpmac_low_data.dev_addr);
38 - res = platform_device_register(&cpmac_low);
39 + cpmac_get_mac(0, ar7_is_titan() ? cpmac_low_data_titan.dev_addr :
40 + cpmac_low_data.dev_addr);
41 + res = platform_device_register(ar7_is_titan() ? &cpmac_low_titan :
46 --- a/drivers/net/cpmac.c
47 +++ b/drivers/net/cpmac.c
48 @@ -1243,6 +1243,10 @@ int __devinit cpmac_init(void)
49 ar7_device_reset(AR7_RESET_BIT_CPMAC_HI);
50 ar7_device_reset(AR7_RESET_BIT_EPHY);
52 + if (ar7_is_titan()) {
53 + ar7_device_reset(TITAN_RESET_BIT_EPHY1);
56 cpmac_mii->reset(cpmac_mii);
58 for (i = 0; i < 300; i++)
59 @@ -1257,7 +1261,8 @@ int __devinit cpmac_init(void)
63 - cpmac_mii->phy_mask = ~(mask | 0x80000000);
64 + cpmac_mii->phy_mask = ar7_is_titan()? ~(mask | 0x80000000 | 0x40000000):
65 + ~(mask | 0x80000000);
66 snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
68 res = mdiobus_register(cpmac_mii);