From mboxrd@z Thu Jan 1 00:00:00 1970 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 CC4D5C433EF for ; Tue, 2 Nov 2021 10:21:43 +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 2939F60EBC for ; Tue, 2 Nov 2021 10:21:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2939F60EBC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 BB9018203C; Tue, 2 Nov 2021 11:21:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635848501; bh=j63UQRuV5cGvu3t3jhMeoP0j2IsD1DQdfHzkxfZ/rQw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EGx9WtuLNy7aRDG2C/jGW4c7RdlJAvl+oobaLp8GDnwyiLCgbWTH79ZNQEoVcDAlE QRaN8BYnYYbc63/6R/88T0BYq2UW/0NNvpv7a8R0nugej7zot9QNneSKv0eMMC/Lan nPzQf9NPvXEeTPj0E1WRKZjAwYHT/ExXgjk5fD8l5SsOPsnvZ28ROcoZCpihExOgA2 IXscZ4oHiDqh85YWmQzRFmfOvbMw0lqitUAkUkV6P6uCwVKFWkmMuti+qT628cwV/N CXYdU+hxjN2ebeMtETVHm/zY9M90WtjKlEQ+qxa55l63xwbMeb6ooggfleuoaOgxgE 2E3vbcV3Pp1+w== Received: by phobos.denx.de (Postfix, from userid 109) id 81DDA82051; Tue, 2 Nov 2021 11:21:38 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (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 DA90B8032F for ; Tue, 2 Nov 2021 11:21:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (unknown [91.198.250.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4Hk5Xt2pwxzQjPn; Tue, 2 Nov 2021 11:21:34 +0100 (CET) Subject: Re: [PATCH v2 0/6] Improved sysreset/watchdog uclass integration To: Samuel Holland , u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Bin Meng , Sean Anderson , Heinrich Schuchardt , Simon Glass References: <20211029031656.24167-1-samuel@sholland.org> From: Stefan Roese Message-ID: <2dfd11c8-7eaf-0dee-3ce2-4df979ac16ea@denx.de> Date: Tue, 2 Nov 2021 11:21:29 +0100 MIME-Version: 1.0 In-Reply-To: <20211029031656.24167-1-samuel@sholland.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6EAEE1839 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 Hi Samuel, On 29.10.21 05:16, 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 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 | 5 ++++ > include/sysreset.h | 14 ++++++++++ > 9 files changed, 68 insertions(+), 13 deletions(-) This patchset (applied to current master) generates multiple issues when building "world" via CI (Azure in my case). Here one of those problems: $ make sandbox_config $ make -s -j20 In file included from ./arch/sandbox/include/asm/state.h:10, from include/test/test.h:130, from include/test/env.h:10, from test/env/cmd_ut_env.c:9: include/sysreset.h: In function ‘arch_reset_for_test’: include/sysreset.h:147:19: error: invalid storage class for function ‘sysreset_register_wdt’ 147 | static inline int sysreset_register_wdt(struct udevice *dev) { return 0; } | ^~~~~~~~~~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:253: test/env/cmd_ut_env.o] Error 1 make: *** [Makefile:1804: test/env] Error 2 make: *** Waiting for unfinished jobs.... In file included from ./arch/sandbox/include/asm/state.h:10, from include/test/test.h:130, from include/test/lib.h:9, from test/cmd/test_echo.c:12: include/sysreset.h: In function ‘arch_reset_for_test’: include/sysreset.h:147:19: error: invalid storage class for function ‘sysreset_register_wdt’ 147 | static inline int sysreset_register_wdt(struct udevice *dev) { return 0; } | ^~~~~~~~~~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:253: test/cmd/test_echo.o] Error 1 make[1]: *** [scripts/Makefile.build:394: test/cmd] Error 2 make: *** [Makefile:1804: test] Error 2 Could you please take a look here? Thanks, Stefan