aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2011-02-26 15:18:02 +0000
committerFlorian Fainelli <florian@openwrt.org>2011-02-26 15:18:02 +0000
commitf198979add12c92dca9c54e275b57c9811cfba32 (patch)
tree8fd0e25ca2939acec6bb91db9482aab172207e04 /target/linux/ar7
parentc3f3c60730962183f4e6c1d51385f4cab31ae667 (diff)
downloadupstream-f198979add12c92dca9c54e275b57c9811cfba32.tar.gz
upstream-f198979add12c92dca9c54e275b57c9811cfba32.tar.bz2
upstream-f198979add12c92dca9c54e275b57c9811cfba32.zip
fix MII register ioremap on when high cpmac is available, patch from Wipster
SVN-Revision: 25730
Diffstat (limited to 'target/linux/ar7')
-rw-r--r--target/linux/ar7/patches-2.6.37/972-cpmac_fixup.patch24
1 files changed, 13 insertions, 11 deletions
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);
++ }
+ }
}