From patchwork Thu Nov 4 03:55:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 1550756 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.a=rsa-sha256 header.s=fm1 header.b=NfSdlfjI; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=QJs1SIOp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hl8vS0HFxz9sCD for ; Thu, 4 Nov 2021 14:56:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A423D836BD; Thu, 4 Nov 2021 04:55:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="NfSdlfjI"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="QJs1SIOp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3122C83685; Thu, 4 Nov 2021 04:55:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 232E583654 for ; Thu, 4 Nov 2021 04:55:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 58F335C01BE; Wed, 3 Nov 2021 23:55:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 03 Nov 2021 23:55:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=ktdA91yHzPw3g hMGxaoWte4fIzcxa9UlxCDOQLBR0oc=; b=NfSdlfjI0XuS7grtezHHdKqoJO/Z6 pDwxNYUtz0hgB7pEqKoVnds7AAh8j5fqLFCNcUgZ/4sNpPVhIzti+8K/copxH7re AVZIiH2odpwgvPipzjCbLJmLQwNEJHDkEe20yx3P1cgOKVX7WG+qaAS42LkQvkT/ OtSRcCV0QkNOCLjTp9xK9z/TI03M6Hcu5KfziWoCMdP81CQ+4BhFNmqXmeKxD4AD ltiWIEbVFUrg7O2UYSurpDcasmSQ7Gckpl2ynjtPgc3572KKxBGPU9Hhv3TvKf8v gzk+EIVaKfjBF7Esp7LC88rOIq3LCLNYgRf80O+XfFrMibJnuQ4znO05g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=ktdA91yHzPw3ghMGxaoWte4fIzcxa9UlxCDOQLBR0oc=; b=QJs1SIOp ivMT0S+QDvnIBVd12sHP3t/Tmvav5Ax8urqgnYa6sa8OlZWwCTrE3/TSEDJxpU7o LqYr6ysRUBRt898dETnL/udQJbqx5WkfTpwR6WtAnRNhU9WR+CPhNSU2LpNmYoAi dLTa0q209or1q/lPGoljRXqJISp3co24Ys3KQ9H5h9g1KIbXi4n6Wwd6JMVAVLHY EgaC+xC1b06f09yoghXBHBKRAWOwJpLlu4hC4LiicwRURuaCnJw3fXTi2AbDD/w0 LdDOWn89qou5JjApxsmO180Gwzx9vttcpwN1xOm40A5RWsrleAtmVOLcYwwMMEKp tQIAK3p24dy0HA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtdefgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Nov 2021 23:55:26 -0400 (EDT) From: Samuel Holland To: Stefan Roese , u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Bin Meng , Heinrich Schuchardt , Sean Anderson , Simon Glass , Samuel Holland Subject: [PATCH v3 5/6] sunxi: Avoid duplicate reset_cpu with SYSRESET enabled Date: Wed, 3 Nov 2021 22:55:15 -0500 Message-Id: <20211104035516.28268-6-samuel@sholland.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211104035516.28268-1-samuel@sholland.org> References: <20211104035516.28268-1-samuel@sholland.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean The sysreset uclass unconditionally provides a definition of the reset_cpu() function. So does the sunxi board code. Fix the build with SYSRESET enabled by omitting the function from the board code in that case. The code still needs to be kept around for use in SPL. Reviewed-by: Heinrich Schuchardt Signed-off-by: Samuel Holland Reviewed-by: Stefan Roese --- (no changes since v2) Changes in v2: - New patch arch/arm/mach-sunxi/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index b4ba2a72c4..3ef179742c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -346,6 +346,7 @@ void board_init_f(ulong dummy) } #endif +#if !CONFIG_IS_ENABLED(SYSRESET) void reset_cpu(void) { #if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40) @@ -376,6 +377,7 @@ void reset_cpu(void) while (1) { } #endif } +#endif #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) void enable_caches(void)