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 4334AC433F5 for ; Mon, 21 Mar 2022 14:18:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2F26383A9F; Mon, 21 Mar 2022 15:18:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="key not found in DNS" (0-bit key; secure) header.d=true.cz header.i=@true.cz header.b="S0Q6v9WL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8E0B83ADC; Mon, 21 Mar 2022 15:18:05 +0100 (CET) Received: from smtp-out.xnet.cz (smtp-out.xnet.cz [178.217.244.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44CA4839B2 for ; Mon, 21 Mar 2022 15:18:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ynezz@true.cz Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 5CFEA1830F; Mon, 21 Mar 2022 15:18:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1647872280; bh=0Ila/uacEB8bYNhn82C0QLJLLKWmN7S8a7v6c0VOXpg=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=S0Q6v9WLkdzgP1WyAZ6y5iSYoqf0KhAq2jZqh6slyObQqueB6SFwy4GCJ9ATtkFdh i3TwhiZxR2yW/IF0780UR6scE8lgim2+lyhEB7hZKElKZqX8sTc1ZizYgrwRIiaZrq 5nREL/OlFcQRVzzwOHAggwEYbJIGsD/j0ZsYY91s= Received: by meh.true.cz (OpenSMTPD) with ESMTP id 750de866; Mon, 21 Mar 2022 15:17:35 +0100 (CET) Date: Mon, 21 Mar 2022 15:17:57 +0100 From: Petr =?utf-8?Q?=C5=A0tetiar?= To: Andre Przywara Cc: Jagan Teki , u-boot@lists.denx.de, Simon Glass , Tom Rini , Samuel Holland , Jernej Skrabec Subject: Re: [PATCH 1/2] sunxi: Fix old GMAC pinmux setup Message-ID: <20220321141757.GA2191@meh.true.cz> References: <20220316005443.16260-1-andre.przywara@arm.com> <20220316005443.16260-2-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220316005443.16260-2-andre.przywara@arm.com> X-PGP-Key: https://gist.githubusercontent.com/ynezz/477f6d7a1623a591b0806699f9fc8a27/raw/a0878b8ed17e56f36ebf9e06a6b888a2cd66281b/pgp-key.pub 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: , Reply-To: Petr =?utf-8?Q?=C5=A0tetiar?= 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 Andre Przywara [2022-03-16 00:54:42]: > 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. > > 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. > > This fixes Ethernet operation for the A20 SoCs, which broke in > v2022.04-rc1, with the above mentioned commit. Tested-by: Petr Štetiar [a20-olinuxino-lime2] > Signed-off-by: Andre Przywara > --- > arch/arm/mach-sunxi/board.c | 1 - > board/sunxi/board.c | 3 +++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > 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(); > > 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 */ > > + eth_init_board(); > + > return 0; > } > > -- > 2.35.1