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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A14E2C05027 for ; Fri, 3 Feb 2023 18:51:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A3A285F14; Fri, 3 Feb 2023 19:51:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="bRJ2pYYd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94F4285EF9; Fri, 3 Feb 2023 19:51:31 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A0C7F85EF9 for ; Fri, 3 Feb 2023 19:51:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x835.google.com with SMTP id g7so6530372qto.11 for ; Fri, 03 Feb 2023 10:51:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aTKMeWUHO3yfcIrVnpfH7LYQKOZgf+fKaBYXxfL9erY=; b=bRJ2pYYd+Vj70Bf7hkVOLzeSaJis/IYgmZb8iZddOVGY+GudxGae7YcY1rzp2sOPI8 JU61d77EeylRDuDT6Dc+UsC5/J3mtwOd2axB0mE8f9f/AoNgP6ZjwG6EwjT3Jej8V0N4 7Nau+sNlgF6yO46W3sQY6A3C/Vo/ojCiYkBLA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aTKMeWUHO3yfcIrVnpfH7LYQKOZgf+fKaBYXxfL9erY=; b=OBYWYnA6wnLSatbtpbcqR3nC+gUak3yT3EAOpY45HJD04UXK6SPjsP44mG5QexmDlZ /KQ5JcwltVFHu6ZFsNgGgSRokgUQZNknksprcjSdjMTLpQ8y7OjotxWCh38WBdyI1YBt 4TvhUZk+mpQXSgP2QC9Prv4h/NWEaY5gtm8jq2dzMCYP9aH0Axd1ahY0diWAN6vZC6M0 1hNVwskP9+2zvnn3iZL6kWZusKCbeIBwCGoiuYJNiX2iQzql+Hgkj/HcqMI6j+PDPX+b 6BhMlPl96g1sim1lILwTAT4wHvkhetj7lkFZt4LJtILGiu0Iv5LkJPVKm5x7e5XV4e87 Mshg== X-Gm-Message-State: AO0yUKVCDGDUCCOa/nP2nmqFT5Ryk5LfJPLwx6yejmAhaFS/6zb6XDKV jQoH5/OQF6FXCpzEIXOc05yplg== X-Google-Smtp-Source: AK7set8gWuIXk0u4LwfpLKxZT9j4JDArVTAEFfzo+z1O4tqNoaTP3G6AwjVg1CyP5xJAXCD311ZveQ== X-Received: by 2002:a05:622a:54c:b0:3b8:3629:7cb7 with SMTP id m12-20020a05622a054c00b003b836297cb7mr19607487qtx.64.1675450287220; Fri, 03 Feb 2023 10:51:27 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-d049-1ce1-b939-5115.res6.spectrum.com. [2603:6081:7b00:6400:d049:1ce1:b939:5115]) by smtp.gmail.com with ESMTPSA id j17-20020a05620a001100b0071a5dbcafbfsm2320591qki.29.2023.02.03.10.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 10:51:26 -0800 (PST) Date: Fri, 3 Feb 2023 13:51:25 -0500 From: Tom Rini To: Jan Kiszka Cc: U-Boot Mailing List Subject: Re: [PATCH V5 04/12] iot2050: Add watchdog start to bootcmd Message-ID: References: <62e2c566f6f79950b8081f5d565d954e126ba13e.1675427201.git.jan.kiszka@siemens.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nDzB5oj/RPiCx1V0" Content-Disposition: inline In-Reply-To: <62e2c566f6f79950b8081f5d565d954e126ba13e.1675427201.git.jan.kiszka@siemens.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean --nDzB5oj/RPiCx1V0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 03, 2023 at 01:26:33PM +0100, Jan Kiszka wrote: > From: Jan Kiszka >=20 > Allows run-time control over watchdog auto-start and the timeout via > setting the environment variable watchdog_timeout_ms. A value of zero > means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial value > and this to zero by default. Users can then enable the watchdog once the > use and OS which picks it up during boot. >=20 > Signed-off-by: Jan Kiszka [snip] > diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h > index 7d087413362..5186dfd8ff8 100644 > --- a/include/configs/iot2050.h > +++ b/include/configs/iot2050.h > @@ -15,6 +15,14 @@ > =20 > /* SPL Loader Configuration */ > =20 > +#define WATCHDOG_ENV \ > + "watchdog_timeout_ms=3D" __stringify(CONFIG_WATCHDOG_TIMEOUT_MSECS) "\0= " \ > + "start_watchdog=3Dif test ${watchdog_timeout_ms} -gt 0; then " \ > + "wdt dev watchdog@40610000; " \ > + "wdt start ${watchdog_timeout_ms}; " \ > + "echo Watchdog started, timeout ${watchdog_timeout_ms} ms; " \ > + "fi\0" > + > /* U-Boot general configuration */ > #define EXTRA_ENV_IOT2050_BOARD_SETTINGS \ > "usb_pgood_delay=3D900\0" > @@ -43,6 +51,7 @@ > #define CFG_EXTRA_ENV_SETTINGS \ > DEFAULT_LINUX_BOOT_ENV \ > BOOTENV \ > + WATCHDOG_ENV \ > EXTRA_ENV_IOT2050_BOARD_SETTINGS As a follow-up I would like to see all of this migrated to the plain text environment, see board/*/*/*.env for various more and less complex examples of this kind of conversion. --=20 Tom --nDzB5oj/RPiCx1V0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPdV6kACgkQFHw5/5Y0 tywHewv+IFRjxxPqNLpccLv18lAafyC6X5OOUh9LDqmPToXV7sIznEnM5Na2fSZY t8HzGkZQTEP1Ep9AyjzNiiY+62BjgDQnaxPcS78LTorFLcbK+tO48oSHDlUQRnYu lEvEySY//VvfN4Yr1NvWnWbdQdc0iMdVfruAJXpWVUXSOBt9vyd4kyYSNwyGcE57 qWEg5fNp45/TsodVpS+wuGVpkpR6db/iQBg1v7rdhL3c1PKu4sdmT01HOb9s16Li mZiEkDa5gHXoX9oPMQ7R1q2BIDAFMl26HxVwUa+LG18b/Dj5gPC2uxrUYT6WeKNK HBRQ2xnckzPd9hNQbsZnnxM6kOAa4prxEWH20/8/Raln/rXitct+3U9iR/w01QgC 7Re1hrWhK/bFZwBmbU9t1q1pPpUo4n7opgefEps5LErbUQ6MAayeuuDCLJxRK8+P zZ9SewkUVUyUBFSsnJnm4MHwYOLertWeCo5rr1Ze0GdjWJz8eiYLEogARm2Xh83n 9TnKREb6 =xFFt -----END PGP SIGNATURE----- --nDzB5oj/RPiCx1V0--