From: florian Date: Sat, 26 Feb 2011 15:18:02 +0000 (+0000) Subject: [ar7] fix MII register ioremap on when high cpmac is available, patch from Wipster X-Git-Url: https://git.archive.openwrt.org/?a=commitdiff_plain;h=79e11738c897e34b9c6c2bd961b1464d9a057776;hp=a754c302a8a3533f692258c831dec7e48105aa01;p=openwrt.git [ar7] fix MII register ioremap on when high cpmac is available, patch from Wipster git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25730 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/target/linux/ar7/patches-2.6.37/972-cpmac_fixup.patch b/target/linux/ar7/patches-2.6.37/972-cpmac_fixup.patch index 2f56615343..d21ceb93f7 100644 --- a/target/linux/ar7/patches-2.6.37/972-cpmac_fixup.patch +++ b/target/linux/ar7/patches-2.6.37/972-cpmac_fixup.patch @@ -190,7 +190,7 @@ cpmac_mii->reset(cpmac_mii); -@@ -1269,10 +1256,20 @@ int __devinit cpmac_init(void) +@@ -1269,10 +1256,22 @@ int __devinit cpmac_init(void) msleep(10); } @@ -199,17 +199,19 @@ if (mask & (mask - 1)) { - external_switch = 1; - mask = 0; -+ if (ar7_is_titan()) { -+ ar7_device_disable(AR7_RESET_BIT_EPHY); -+ ar7_device_disable(TITAN_RESET_BIT_EPHY1); -+ } else -+ ar7_device_disable(AR7_RESET_BIT_EPHY); ++ if (!ar7_has_high_cpmac()) { ++ if (ar7_is_titan()) { ++ ar7_device_disable(AR7_RESET_BIT_EPHY); ++ ar7_device_disable(TITAN_RESET_BIT_EPHY1); ++ } else ++ ar7_device_disable(AR7_RESET_BIT_EPHY); + -+ //Titan remap might be different -+ mii_reg = ioremap(AR7_REGS_MII, 4); -+ if (mii_reg) { -+ writel(readl(mii_reg) | 1, mii_reg); -+ iounmap(mii_reg); ++ //Titan remap might be different ++ mii_reg = ioremap(AR7_REGS_MII, 4); ++ if (mii_reg) { ++ writel(readl(mii_reg) | 1, mii_reg); ++ iounmap(mii_reg); ++ } + } }