ramips: add preliminary Archer C20i support
[openwrt/openwrt.git] / package / boot / uboot-sunxi / patches / 003-uboot-fix-gmac-not-working-reliable-on-bananapi.patch
1 diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
2 index e7ff952..f58c963 100644
3 --- a/board/sunxi/gmac.c
4 +++ b/board/sunxi/gmac.c
5 @@ -24,6 +24,15 @@ int sunxi_gmac_initialize(bd_t *bis)
6 CCM_GMAC_CTRL_GPIT_MII);
7 #endif
8
9 + /*
10 + * HdG: this is necessary to get GMAC to work reliable on the
11 + * Bananapi. We don't know what these undocumented bits do, so this
12 + * is a Bananapi specific hack for now.
13 + */
14 +#ifdef CONFIG_BANANAPI
15 + setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
16 +#endif
17 +
18 /* Configure pin mux settings for GMAC */
19 for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
20 #ifdef CONFIG_RGMII