aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-sunxi
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2014-09-28 20:39:04 +0000
committerZoltan HERPAI <wigyori@uid0.hu>2014-09-28 20:39:04 +0000
commitff9bc2fc42c048a21e8cd93d7c258f612f24ec28 (patch)
tree0c8d446b2e2552a8560c13874769f9f7e8280db5 /package/boot/uboot-sunxi
parentd2a3013f0b1b4cc44597b4b86ba27496a0c07f39 (diff)
downloadmaster-187ad058-ff9bc2fc42c048a21e8cd93d7c258f612f24ec28.tar.gz
master-187ad058-ff9bc2fc42c048a21e8cd93d7c258f612f24ec28.tar.bz2
master-187ad058-ff9bc2fc42c048a21e8cd93d7c258f612f24ec28.zip
uboot-sunxi: add patch to fix gmac reliability issue on bananapi
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42691 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/boot/uboot-sunxi')
-rw-r--r--package/boot/uboot-sunxi/patches/003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/boot/uboot-sunxi/patches/003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch b/package/boot/uboot-sunxi/patches/003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch
new file mode 100644
index 0000000000..6bc8c93902
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch
@@ -0,0 +1,20 @@
+diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
+index e7ff952..f58c963 100644
+--- a/board/sunxi/gmac.c
++++ b/board/sunxi/gmac.c
+@@ -24,6 +24,15 @@ int sunxi_gmac_initialize(bd_t *bis)
+ CCM_GMAC_CTRL_GPIT_MII);
+ #endif
+
++ /*
++ * HdG: this is necessary to get GMAC to work reliable on the
++ * Bananapi. We don't know what these undocumented bits do, so this
++ * is a Bananapi specific hack for now.
++ */
++#ifdef CONFIG_BANANAPI
++ setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
++#endif
++
+ /* Configure pin mux settings for GMAC */
+ for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
+ #ifdef CONFIG_RGMII