Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F6A9C4338F for ; Sun, 22 Aug 2021 20:49:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 79CE061284 for ; Sun, 22 Aug 2021 20:49:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 79CE061284 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D5FBA81D1F; Sun, 22 Aug 2021 22:49:54 +0200 (CEST) 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="DdP73oWO"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="a6DK2mNr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6462B81D1F; Sun, 22 Aug 2021 22:49:53 +0200 (CEST) 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 D9BE68020E for ; Sun, 22 Aug 2021 22:49:48 +0200 (CEST) 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 compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6F9A95C0094; Sun, 22 Aug 2021 16:49:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 22 Aug 2021 16:49:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=R5Ko+amqUr7pF3XcGVup9Yspbo qGHaDBwjusZFF1TE4=; b=DdP73oWOSB8pRWW9Dq7lKQdhV5srR97UCCvqgcH83P GwHySuqxkvYDzqfoi2twGfAqCJXno64/QK4Agyi7GMPhuV94coRK0XRdF3M+LZyL ZZXnM2nEgdKTuE6gsYbpQcg+PottpJWnPg3TpQ+9rNDPL5TQo07wvn+5JCiswjAE vYM9ZwibEn4079kjPdMEilB0x2IDZxiIOf55d7DoVqk0CamKsa2tSFnim1K8aW2S YWnNr1aPRWtR3g0H2iH8v03KNceDTem7g7+z2h1KA3k75Eu3NsNOSX+5UWmMAMcv UAFBNCVllWo+tJQtl7Yw9qtKF+bdND9kEqrbVmJZFK/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=R5Ko+amqUr7pF3XcG Vup9YspboqGHaDBwjusZFF1TE4=; b=a6DK2mNrH5p/UOfqondHDyRkJLEqVq030 kMxyLbfMV+NVgOGETyTI8b5/uo4c71xUaPcvoe2J3kAvGvWdhQiYBpxOulg0m6V9 PaK3f/dFbF3aitzSwNSBsidZtOkkb5YnNqlsov542x9RmFLoRtSxxMOS1XF8EiMP u1Q0S0SUFMoZWvGuCGfwIm1MHBcI0ueFt3p/eWZtruMgA1SrKxMH6LUaQtKgdLpS b3NTfwtnVgLGJZh2Tf+aT06hLOxVHpK4Oze2N9DqvSdEemGfdgbODn91stf09Jh4 x0DyxM9WT6byJaHX6hCaIgFWx/lQwTzNzWtF5o4r6rnx3OHRyvQ4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtfedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepieetkefhheduudfgledtudefjeejfeegveehkeeufffhhfejkeehieff tdevtdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Aug 2021 16:49:46 -0400 (EDT) From: Samuel Holland To: u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Samuel Holland Subject: [PATCH] sunxi: Avoid duplicate reset_cpu with SYSRESET enabled Date: Sun, 22 Aug 2021 15:49:44 -0500 Message-Id: <20210822204945.44394-1-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Omit our definition when SYSRESET is enabled. This allows the build to succeed, even though sysreset may not yet be functional due to a lack of back-end drivers. Signed-off-by: Samuel Holland --- 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 d9b04f75fc4..f867a28c30c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -347,6 +347,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) @@ -377,6 +378,7 @@ void reset_cpu(void) while (1) { } #endif } +#endif #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && !defined(CONFIG_ARM64) void enable_caches(void) -- 2.31.1