[U-Boot] [linux-sunxi] Re: [PATCH] sunxi: Fix gmac not working reliable on the Bananapi

Zoltan HERPAI wigyori at uid0.hu
Sun Sep 28 22:54:10 CEST 2014


On Sun, 28 Sep 2014, Karsten Merker wrote:

> On Sun, Sep 28, 2014 at 08:13:21PM +0200, Hans de Goede wrote:
>> In order for the gmac nic to work reliable on the Bananapi, we need to poke
>> these 2 undocumented bits in the gmac clk register. Since these are
>> undocumented, this commit only sets these bits on the Bananapi for now.
>>
>> I'll contact Allwinner to try and get these bits documented, once they
>> are documented we can hopefully replace this hack with a better patch.
>>
>> Reported-by: Karsten Merker <merker at debian.org>
>> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
>
> Tested-by: Karsten Merker <merker at debian.org>

Tested-by: Zoltan HERPAI <wigyori at openwrt.org>

>> ---
>>  board/sunxi/gmac.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> 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
>> --
>> 2.1.0
>
> Regards,
> Karsten
> -- 
> Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
> sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
> Werbung sowie der Markt- oder Meinungsforschung.
>


More information about the U-Boot mailing list