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 X-Spam-Level: X-Spam-Status: No, score=-18.2 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 4F7ABC432BE for ; Tue, 31 Aug 2021 09:17:09 +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 1A9F660698 for ; Tue, 31 Aug 2021 09:17:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1A9F660698 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 D9475833A9; Tue, 31 Aug 2021 11:17:05 +0200 (CEST) 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=1630401426; bh=xOiG0bM4fZ4MNmOunWRNAr+oZbPO0+0qTtnTpwg4EIs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oeYQI0EnJFABS/q4nnzTT88FS5zOKWgUANsoigwY6Y2GYviCinrYIHzPBm2HJvJXu 3dP0R897cXW8KmArK4z0BrVlvDk5n4PloO0Jp0XdDCE4YDAh6D3/5MKMFtan9+B3cD /X/Zg+/DHy4FgrBWvdRE79VKHbPrN4OvuS0TNvjo+QCWhO1INv1RzdKRHd9P8OrTVV 2vI9aYmBoix6GXKl0CONZaORjQMXtujSpMt4PNVSTQ1qi9AtVExJekld6rJlol4idg +LTHnY3h6KNYd5NkiJoKI6MYe2pXxuFEpUc0YFPH5N+lAPO8eSsAMisqpGntCHtSYh 4AEthh6Nxq6aQ== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 8933D8338B; Tue, 31 Aug 2021 11:17:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1630401423; bh=xOiG0bM4fZ4MNmOunWRNAr+oZbPO0+0qTtnTpwg4EIs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QfXLiqZP6KO3kGaLOLfzhSY6RFex2wwA3v/EMX47l4PCgMY5N+YrOZXlvwfxCrqW7 fbpEsqis6oVZFEMcIrUHtthnqBgYhiP5A/pyjUMMuPCggMon+pO+ZxWaD4sbLVWNNR DvUiom3E8kO5HdimION3rVTaeMEHmnO5IBD4VSW/J5GC/jlfVAcZygK9n2gHljsoNO d9eYmUCab9fbKfxcktH1TJ+MQhqVQKb6EGpY1Rhz0LX4AFKvE+72mSYkYjXBNf99wc 133ofAOgR46Auhl9EBZm+/ICyOe6jNqpbJ0mUf69THeQLbGTfhvmeurp3dO5OAlqKo TzKQ4qqGBcBEQ== Subject: Re: [PATCH] watchdog: Fix watchdog enablement in SPL and TPL To: Marcel Ziswiler , "u-boot@lists.denx.de" Cc: "sr@denx.de" , "pali@kernel.org" References: <20210830220305.92512-1-marex@denx.de> <1f24c99c2c7584abf5d5375c63a53e9489abbdeb.camel@toradex.com> From: Marek Vasut Message-ID: <2ad1733a-d0fc-e503-10ff-a3cd74978f5a@denx.de> Date: Tue, 31 Aug 2021 11:17:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1f24c99c2c7584abf5d5375c63a53e9489abbdeb.camel@toradex.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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 On 8/31/21 8:49 AM, Marcel Ziswiler wrote: > Hi Marek > > On Tue, 2021-08-31 at 00:03 +0200, Marek Vasut wrote: >> Commit 830d29ac372 ("watchdog: Allow to use CONFIG_WDT without starting watchdog") >> completely broke WDT operation in both SPL and TPL, in either case those >> WDTs are never enabled. Fix it by filling in the missing Kconfig options >> for SPL and TPL. >> >> Fixes: 830d29ac372 ("watchdog: Allow to use CONFIG_WDT without starting watchdog") >> Signed-off-by: Marek Vasut >> Cc: Pali Rohar >> Cc: Stefan Roese >> --- >>  drivers/watchdog/Kconfig | 20 ++++++++++++++++++++ >>  1 file changed, 20 insertions(+) >> >> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig >> index f0ff2612a6b..65d974c4dd5 100644 >> --- a/drivers/watchdog/Kconfig >> +++ b/drivers/watchdog/Kconfig >> @@ -273,4 +273,24 @@ config SPL_WDT >>           Enable driver model for watchdog timer in SPL. >>           This is similar to CONFIG_WDT in U-Boot. >> >> +config SPL_WATCHDOG_AUTOSTART >> +       bool "Automatically start watchdog timer in SPL" >> +       depends on SPL && WDT >> +       default y >> +       help >> +         Automatically start watchdog timer and start servicing it during >> +         SPL phase. Enabled by default. Disable this option if you want >> +         to compile U-Boot with CONFIG_WDT support but do not want to >> +         activate watchdog, like when CONFIG_WDT option is disabled. >> + >> +config TPL_WATCHDOG_AUTOSTART >> +       bool "Automatically start watchdog timer in TPL" >> +       depends on TPL && WDT >> +       default y >> +       help >> +         Automatically start watchdog timer and start servicing it during >> +         TPL phase. Enabled by default. Disable this option if you want >> +         to compile U-Boot with CONFIG_WDT support but do not want to >> +         activate watchdog, like when CONFIG_WDT option is disabled. >> + >>  endmenu > > Those Kconfig entries look fine. However, I am wondering where exactly they get used. Am I missing anything? Have a look at the patch this Fixes:, if those Kconfig entries are not present, the WDT is disabled in SPL and TPL unconditionally. It could be that if you're using some non-free or proprietary preloader instead of SPL, you won't run into this problem.