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 33A6BC433F5 for ; Fri, 29 Oct 2021 03:18:39 +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 8544860524 for ; Fri, 29 Oct 2021 03:18:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8544860524 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 10B1F835DA; Fri, 29 Oct 2021 05:18:33 +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="drLpHG0k"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="YG+bOae7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A3248358E; Fri, 29 Oct 2021 05:17:28 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 BD2DF8358C for ; Fri, 29 Oct 2021 05:17:15 +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 compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C9FC15C0117; Thu, 28 Oct 2021 23:17:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 28 Oct 2021 23:17:14 -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=n60ODcpfQEncw c1ApAQIyjE6Qahw1bjRMpF7+AjgmhQ=; b=drLpHG0kkdhqW41xFD6HQPmOzS28K u9IyX0SICz1wwLx/KsKMKNsn9zu45Lhycaee0WrQSVwhNpM7muqdr5VCsE8bvfNP CUPOV9UNjZweszqPR3LHlMpA+i35m2NJ5WoIB/YBfPdZkbPf2CCpPWXXG22t9TkL E/Tks8LvvzMDqFD/3pBFAmROQxbJBvFvv7vZoljjH9mabovfB8pp+BFwvMGy1PZd +VXIWkK3MA809LmKqbsQkOF83S419dXtxkS82DfvCT1LS4qFlqsi8iCO2yUoPPOc HnL6f8TSFLkxD5NdsufAuY4U0nNfCXb/KSMNbgsRBZLt+4E3aBzQnVAng== 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=n60ODcpfQEncwc1ApAQIyjE6Qahw1bjRMpF7+AjgmhQ=; b=YG+bOae7 uXoYHFHd2u1qJ9ZRyxO5OnImfUX1H5a/Sx35cTPR/rqPwxWjYhRXk7i9voEN3gLV /YyJOHhMEgeJXMF8SXsspwky3NUz+mXpSQFUicd3cmj8FWG0B7qctA9F6Ib1GabP RkYwmTTvLC6XAFCzojM7RyVPF00+mLl29YpxJxDhVkD/hwVbFu8HRoLD8GHyv5cj KBG+PjX+WUcsA0vAbdNOYJ7en8/pVaGfRKi3Ks7fbSSPlLRbmfXVIGxjK7CvPusq SymycrHc3imTojm4NQ79XO1vZmq4hGtn3PailRAoGWNqlXnlL5RefNsaCdQG9lvU I3PtJJl3GGSbNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdeggedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 Oct 2021 23:17:13 -0400 (EDT) From: Samuel Holland To: Stefan Roese , u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Bin Meng , Sean Anderson , Heinrich Schuchardt , Simon Glass , Samuel Holland Subject: [PATCH v2 6/6] sunxi: Use sysreset framework for poweroff/reset Date: Thu, 28 Oct 2021 22:16:56 -0500 Message-Id: <20211029031656.24167-7-samuel@sholland.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211029031656.24167-1-samuel@sholland.org> References: <20211029031656.24167-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 --- 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 02f8306f15..88a435796f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1065,6 +1065,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