From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B02E3C433F5 for ; Wed, 16 Mar 2022 17:05:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 82A9F83CB4; Wed, 16 Mar 2022 18:05:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id DA55583A3A; Wed, 16 Mar 2022 18:05:18 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 51EB983CB6 for ; Wed, 16 Mar 2022 18:05:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 806E11476; Wed, 16 Mar 2022 10:05:13 -0700 (PDT) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 96D1E3F7D7; Wed, 16 Mar 2022 10:05:12 -0700 (PDT) Date: Wed, 16 Mar 2022 17:04:31 +0000 From: Andre Przywara To: Jernej =?UTF-8?B?xaBrcmFiZWM=?= Cc: Jagan Teki , u-boot@lists.denx.de, Simon Glass , Tom Rini , Samuel Holland Subject: Re: [PATCH 1/2] sunxi: Fix old GMAC pinmux setup Message-ID: <20220316170353.141b7fd0@slackpad.lan> In-Reply-To: <2575255.X9hSmTKtgW@kista> References: <20220316005443.16260-1-andre.przywara@arm.com> <20220316005443.16260-2-andre.przywara@arm.com> <2575255.X9hSmTKtgW@kista> Organization: Arm Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Wed, 16 Mar 2022 17:55:16 +0100 Jernej =C5=A0krabec wrote: > Dne sreda, 16. marec 2022 ob 01:54:42 CET je Andre Przywara napisal(a): > > Commit 5bc4cd05d7d4 ("sunxi: move non-essential code out of s_init()") > > moved the call to eth_init_board() from s_init() into board_init_f(). > > This means it's now only called from the SPL, which makes sense for > > most of the other moved low-level functions. However the GMAC pinmux and > > clock setup in eth_init_board() was not happy about that, so it broke > > the sun7i GMAC. > >=20 > > Since Ethernet is of no use in the SPL anyway, just move the call into > > board_init(), which is only run in U-Boot proper. > >=20 > > This fixes Ethernet operation for the A20 SoCs, which broke in > > v2022.04-rc1, with the above mentioned commit. > >=20 > > Signed-off-by: Andre Przywara =20 >=20 > Reviewed-by: Jernej Skrabec Thanks! > I guess this function will soon go away with introduction of clock and pi= nctrl=20 > driver. Yes, indeed, forgot to mention this. This is just a stop-gap measure to fix Ethernet before the 2022.04 release. Cheers, Andre >=20 > Best regards, > Jernej >=20 > > --- > > arch/arm/mach-sunxi/board.c | 1 - > > board/sunxi/board.c | 3 +++ > > 2 files changed, 3 insertions(+), 1 deletion(-) > >=20 > > diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c > > index 0071de19ffd..9a7673d82dc 100644 > > --- a/arch/arm/mach-sunxi/board.c > > +++ b/arch/arm/mach-sunxi/board.c > > @@ -333,7 +333,6 @@ void board_init_f(ulong dummy) > > clock_init(); > > timer_init(); > > gpio_init(); > > - eth_init_board(); > > =20 > > spl_init(); > > preloader_console_init(); > > diff --git a/board/sunxi/board.c b/board/sunxi/board.c > > index a0961590479..28f702bc296 100644 > > --- a/board/sunxi/board.c > > +++ b/board/sunxi/board.c > > @@ -30,6 +30,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -308,6 +309,8 @@ int board_init(void) > > #endif > > #endif /* CONFIG_DM_MMC */ > > =20 > > + eth_init_board(); > > + > > return 0; > > } > > =20 > > --=20 > > 2.35.1 > >=20 > > =20 >=20 >=20