From b595d02fa7a78400afe5429667e3ca8ea1d15cbb Mon Sep 17 00:00:00 2001 From: Zoltan Herpai Date: Sun, 28 Sep 2014 20:39:04 +0000 Subject: uboot-sunxi: add patch to fix gmac reliability issue on bananapi Signed-off-by: Zoltan HERPAI SVN-Revision: 42691 --- ...t-fix-gmac-not-working-reliable-on-bananapi.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 package/boot/uboot-sunxi/patches/003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch (limited to 'package/boot/uboot-sunxi') 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 -- cgit v1.2.3