sunxi: Fix gmac not working due to cpu_eth_init no longer being called
authorHans de Goede <hdegoede@redhat.com>
Thu, 17 Mar 2016 12:53:03 +0000 (13:53 +0100)
committerVagrant Cascadian <vagrant@debian.org>
Tue, 28 Jun 2016 07:38:27 +0000 (07:38 +0000)
commite816be17e990043e4f3b58afccb0a3e45ea7504c
tree40f55bf82c2d6064a92898cc5bb0ed1012eb8ef0
parent5bf7b7ae068bbb7534613cd1fba64b682990d8b4
sunxi: Fix gmac not working due to cpu_eth_init no longer being called

cpu_eth_init is no longer called for dm enabled eth drivers, this
was causing the sunxi gmac eth controller to no longer work in u-boot.

This commit fixes this by calling the clock, reset and pinmux setup
function from s_init() and enabling the phy power pin (if any) from
board_init().

The enabling of phy power cannot be done from s_init because it uses dm
and dm is not ready yet at this point.

Note that the mdelay is dropped as the phy gets enabled much earlier
now, so it is no longer needed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Tested-by: Karsten Merker <merker@debian.org>
Tested-by: Michael Haas <haas@computerlinguist.org>
Gbp-Pq: Topic upstream/sunxi
Gbp-Pq: Name 0001-sunxi-Fix-gmac-not-working-due-to-cpu_eth_init-no-lo.patch
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/include/asm/arch-sunxi/sys_proto.h
board/sunxi/board.c
board/sunxi/gmac.c