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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D272FC433EF for ; Thu, 4 Nov 2021 03:56:27 +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 348C461157 for ; Thu, 4 Nov 2021 03:56:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 348C461157 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 C88CC83692; Thu, 4 Nov 2021 04:55:48 +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="PERWfCX6"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="mEn1ATyW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E43E88369E; Thu, 4 Nov 2021 04:55:35 +0100 (CET) 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 87E7783692 for ; Thu, 4 Nov 2021 04:55:29 +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 compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BC6085C0199; Wed, 3 Nov 2021 23:55:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 03 Nov 2021 23:55:28 -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=Qf6PGWKjhgeRi EqcyIOkQQbSdbwyNuUVG3azKQrU/xM=; b=PERWfCX6EokNavmVjzrKfm0y2gEw9 s2SXZ0l0m2Tt/1XlGUjMEiJw4fHxA5FZJPmFI5dJGuF1zEDuOO5HLtP7pmGAgRo7 hVY6+zyeTcnmBV1KLBTGhgMgJwZ+pO0+JuKAJLjMybnL05yb/AuaC6NT5vMAx7gU gtl8W+P+tKz8BJudHGoozVs4AbNrlrHPlqjcFrWFsKDzd3CWrqQSWYdkIPfbDkyw eI8JU18g4jukcdXRXyq6iHDIFOmAyqwTd+CO6utd0ostjZR2QMrT1ZlcxKEZtFKo EW9sZH2PNg6aU3H/9qcyHQr1nT8S4BiqdH8cI+0rw7Mc+LlEZXn72jUSA== 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=Qf6PGWKjhgeRiEqcyIOkQQbSdbwyNuUVG3azKQrU/xM=; b=mEn1ATyW JCgRbD+YIMTLhgO/pm9RTQZ/sp3BquRxL7HluadTRna4GBv4WgUS0NHVwYI1P/55 inrgZl2kvmli91jg9K3FU9Qja4GcHJ9iEKeLVR6x6VEWck4n641aWEsgJpRyrxMV UTAcs3wJekp8QhYBP015Br1dCCFJ+MO51MYdcOfIx+/JviGbUkc6/8tl4uAfem4V F6S0eBnbvNeoOVi8YINAn/dpR4JJqZn6vaRjIWgDzQOxLfTC7KSkhQL8eJaCQU0G uYko18tKGbsD205CvkAFTWM8dTRpAmWeINiDqW+NLXV+cszXHcgSf1jtV3PiW8Jc apkhjOUcPGnb2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtdefgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Nov 2021 23:55:28 -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 6/6] sunxi: Use sysreset framework for poweroff/reset Date: Wed, 3 Nov 2021 22:55:16 -0500 Message-Id: <20211104035516.28268-7-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 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 Instead of hardcoding the watchdog for reset, and the PMIC for poweroff, use the sysreset framework to manage the available poweroff/reset backends. This allows (as examples) using the PMIC to do a cold reset, and using a GPIO to power off H3/H5 boards lacking a PMIC. Furthermore, it removes the need to hardcode watchdog MMIO addresses, since the sysreset backends can be discovered using the device tree. Reviewed-by: Heinrich Schuchardt Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - New patch arch/arm/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b4808d4c75..ae911d6e35 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1084,6 +1084,9 @@ config ARCH_SUNXI imply SPL_MMC if MMC imply SPL_POWER imply SPL_SERIAL + imply SYSRESET + imply SYSRESET_WATCHDOG + imply SYSRESET_WATCHDOG_AUTO imply USB_GADGET imply WDT -- 2.32.0