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 2697CC433EF for ; Thu, 4 Nov 2021 23:13:19 +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 E320661213 for ; Thu, 4 Nov 2021 23:13:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E320661213 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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 10E09836B6; Fri, 5 Nov 2021 00:13:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7DCED836DA; Fri, 5 Nov 2021 00:13:13 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E8ED9836B6 for ; Fri, 5 Nov 2021 00:13:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 146872B; Thu, 4 Nov 2021 16:13:09 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CAA943F7D7; Thu, 4 Nov 2021 16:13:07 -0700 (PDT) Date: Thu, 4 Nov 2021 23:11:40 +0000 From: Andre Przywara To: Stefan Roese Cc: Samuel Holland , u-boot@lists.denx.de, Jagan Teki , Bin Meng , Heinrich Schuchardt , Sean Anderson , Simon Glass Subject: Re: [PATCH v3 0/6] Improved sysreset/watchdog uclass integration Message-ID: <20211104231140.4e2ad7f5@slackpad.fritz.box> In-Reply-To: <70136684-120e-925c-3709-576885d4bd17@denx.de> References: <20211104035516.28268-1-samuel@sholland.org> <70136684-120e-925c-3709-576885d4bd17@denx.de> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 4 Nov 2021 11:37:57 +0100 Stefan Roese wrote: Hi Stefan, > On 04.11.21 04:55, Samuel Holland wrote: > > This series hooks up the watchdog uclass to automatically register > > watchdog devices for use with sysreset, doing a bit of minor cleanup > > along the way. > > > > The goal is for this to replace the sunxi board-level non-DM reset_cpu() > > function. I was surprised to find that the wdt_reboot driver requires > > its own undocumented device tree node, which references the watchdog > > device by phandle. This is problematic for us, because sunxi-u-boot.dtsi > > file covers 20 different SoCs with varying watchdog node phandle names. > > So it would have required adding a -u-boot.dtsi file for each board. > > > > Hooking things up automatically makes sense to me; this is what Linux > > does. However, I put the code behind a new option to avoid surprises for > > other platforms. > > > > Changes in v3: > > - Move condition to wdt-uclass.c to fix build errors. > > - Include watchdog name in error message. > > > > Changes in v2: > > - Extend the "if SYSRESET" block to the end of the file. > > - Also make gpio_reboot_probe function static. > > - Rebase on top of 492ee6b8d0e7 (now handle all watchdogs). > > - Added patches 5-6 as an example of how the new option will be used. > > > > Samuel Holland (6): > > sysreset: Add uclass Kconfig dependency to drivers > > sysreset: Mark driver probe functions as static > > sysreset: watchdog: Move watchdog reference to plat data > > watchdog: Automatically register device with sysreset > > sunxi: Avoid duplicate reset_cpu with SYSRESET enabled > > sunxi: Use sysreset framework for poweroff/reset > > > > arch/arm/Kconfig | 3 +++ > > arch/arm/mach-sunxi/board.c | 2 ++ > > drivers/sysreset/Kconfig | 11 ++++++-- > > drivers/sysreset/sysreset_gpio.c | 2 +- > > drivers/sysreset/sysreset_resetctl.c | 2 +- > > drivers/sysreset/sysreset_syscon.c | 2 +- > > drivers/sysreset/sysreset_watchdog.c | 40 ++++++++++++++++++++++------ > > drivers/watchdog/wdt-uclass.c | 8 ++++++ > > include/sysreset.h | 10 +++++++ > > 9 files changed, 67 insertions(+), 13 deletions(-) > > > > Applied to u-boot-marvell Mmmh, why u-boot-marvell, and why did this end up already in master? Isn't that material for the next merge window? After all this changes quite a bit, for a lot of boards, and I did not have a closer look at the sunxi parts yet. Cheers, Andre