X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fsunxi%2Fgmac.c;h=6348d27282748d66cf6d55f484fdefa69d4a0af6;hb=115200ceb0faad679bcc7d7dba4b63ff065606c5;hp=e7ff95285c97be8e816e2c31a8e739dd91c861db;hpb=dcdb61a084bd3840d0987a5d01ae506c11efca1b;p=u-boot diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c index e7ff95285c..6348d27282 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 + /* + * In order for the gmac nic to work reliable on the Bananapi, we + * need to set bits 10-12 GTXDC "GMAC Transmit Clock Delay Chain" + * of the GMAC clk register to 3. + */ +#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