Skip to content
Snippets Groups Projects
Commit f885b849 authored by Hans de Goede's avatar Hans de Goede Committed by Tom Rini
Browse files

sunxi: Fix gmac not working reliable on the Bananapi


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
(0x01c20164) to 3.

Without this about 9 out of 10 ethernet packets get lost, with this setting
there is no packet loss.

So far setting these bits is only necessary on the Bananapi, so this commit
solves this with a bit of #ifdef CONFIG_BANANAPI code. If in the future we
need to do something similar for other boards, we can create a specific
CONFIG_FOO option for this then.

Reported-by: default avatarKarsten Merker <merker@debian.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Tested-by: default avatarKarsten Merker <merker@debian.org>
Tested-by: default avatarZoltan HERPAI <wigyori@openwrt.org>
Tested-by: default avatarTony Zhang <tony.zhang@lemaker.org>
Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
parent dd0204e4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment