From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Thu, 17 Mar 2016 15:38:30 +0100 Subject: [U-Boot] [PATCH] sunxi: Fix gmac not working due to cpu_eth_init no longer being called In-Reply-To: <1458220895.30744.31.camel@hellion.org.uk> References: <1458219728-13910-1-git-send-email-hdegoede@redhat.com> <1458220895.30744.31.camel@hellion.org.uk> Message-ID: <56EAC166.10602@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 17-03-16 14:21, Ian Campbell wrote: > On Thu, 2016-03-17 at 14:02 +0100, Hans de Goede wrote: >> 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 moving the gpio setup to gpio_init() and by >> calling the clock, reset and pinmux setup function from s_init(). >> >> Note that the mdelay is dropped as the phy gets enabled much earlier >> now, so it is no longer needed. > > Everything is DM_ETH based now, right? Which is why this final hunk is > OK? Correct, we only do DM for eth in sunxi now, we try to do only DM everywhere. But we still have a bunch of things we need to convert, like i2c which has dm support in the core now I believe, patches welcome :) Regards, Hans > >> [...] >> @@ -79,16 +79,4 @@ int sunxi_gmac_initialize(bd_t *bis) >> for (pin = SUNXI_GPA(26); pin <= SUNXI_GPA(27); pin++) >> sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC); >> #endif >> - >> -#ifdef CONFIG_DM_ETH >> - return 0; >> -#else >> -# ifdef CONFIG_RGMII >> - return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII); >> -# elif defined CONFIG_GMII >> - return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII); >> -# else >> - return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII); >> -# endif >> -#endif >> }