1 --- a/arch/mips/ar7/platform.c 2010-01-25 16:11:24.000000000 +0800
2 +++ b/arch/mips/ar7/platform.c 2010-01-13 14:46:16.000000000 +0800
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, &fixed_phy_status);
9 if (res && res != -ENODEV)
12 - cpmac_get_mac(1, cpmac_high_data.dev_addr);
13 - res = platform_device_register(&cpmac_high);
14 + cpmac_get_mac(1, ar7_is_titan() ? cpmac_high_data_titan.dev_addr:
15 + cpmac_high_data.dev_addr);
16 + res = platform_device_register(ar7_is_titan() ? &cpmac_high_titan :
21 - cpmac_low_data.phy_mask = 0xffffffff;
24 + cpmac_low_data_titan.phy_mask = 0xffffffff;
26 + cpmac_low_data.phy_mask = 0xffffffff;
29 - res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
30 + res = fixed_phy_add(PHY_POLL, ar7_is_titan()?cpmac_low_titan.id:
31 + cpmac_low.id, &fixed_phy_status);
32 if (res && res != -ENODEV)
35 - cpmac_get_mac(0, cpmac_low_data.dev_addr);
36 - res = platform_device_register(&cpmac_low);
37 + cpmac_get_mac(0, ar7_is_titan() ? cpmac_low_data_titan.dev_addr :
38 + cpmac_low_data.dev_addr);
39 + res = platform_device_register(ar7_is_titan() ? &cpmac_low_titan :
44 --- a/drivers/net/cpmac.c 2010-01-25 16:11:24.000000000 +0800
45 +++ b/drivers/net/cpmac.c 2010-01-25 16:48:02.000000000 +0800
50 + ar7_device_reset(pdata->reset_bit);
52 dev->irq = platform_get_irq_byname(pdev, "irq");
54 dev->open = cpmac_open;
56 cpmac_mii->reset = cpmac_mdio_reset;
57 cpmac_mii->irq = mii_irqs;
59 - cpmac_mii->priv = ioremap(AR7_REGS_MDIO, 256);
60 + cpmac_mii->priv = ioremap(ar7_is_titan()?TITAN_REGS_MDIO:AR7_REGS_MDIO, 256);
62 if (!cpmac_mii->priv) {
63 printk(KERN_ERR "Can't ioremap mdio registers\n");
64 @@ -1232,9 +1234,10 @@
65 #warning FIXME: unhardcode gpio&reset bits
68 - ar7_device_reset(AR7_RESET_BIT_CPMAC_LO);
69 - ar7_device_reset(AR7_RESET_BIT_CPMAC_HI);
70 ar7_device_reset(AR7_RESET_BIT_EPHY);
71 + if (ar7_is_titan()) {
72 + ar7_device_reset(TITAN_RESET_BIT_EPHY1);
75 cpmac_mii->reset(cpmac_mii);