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 7BED2C001B0 for ; Tue, 8 Aug 2023 21:41:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EAB0286689; Tue, 8 Aug 2023 23:40:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="AVlhPf7P"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 396CD86722; Tue, 8 Aug 2023 23:40:58 +0200 (CEST) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 2EFE486354 for ; Tue, 8 Aug 2023 23:40:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6bcca6485f6so520001a34.1 for ; Tue, 08 Aug 2023 14:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691530855; x=1692135655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XdhotWPypgk22mU103j8uSZJYZ3DbNrltR7k79pPB9Q=; b=AVlhPf7PRZGS8d8iROONT/eNu6bPlxJPJ8HsK8Q9BypT+VGabQLnOolslhOUk94Rmp 6aFInAnXUupIsUk/nhxkpsBSruC8gSX+vFeHHELuguIE0q0+DLNC7n712wbLW6Rr3tcv XHhUSs5hjkPPdeK8ETuA2XCgvbQG3DCK5bqEXMfO98+6VmrNxdoxkTHdDf/COdMvxJCf I9Jgl+9pC4ZHbK9e48AQpY59Cyv5hzJIY2dTcC+N/6T4kKtvm8hdcRH4/1WbXFrlkR1W M09ep+3mXWRVuRkkKz3yuwechnWzGZVOCB7EXRL7nQvzBKrIuDJxTfWJL/UZsSf8mflm SZdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691530855; x=1692135655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XdhotWPypgk22mU103j8uSZJYZ3DbNrltR7k79pPB9Q=; b=luIQlzw/bNe4z5uP69t9JZ6SvMmUHpAIm5RQ26m+PoS9+UuL6FjEoJULo90IFT/RGJ L8g6IN6InqNrM2+TTdgF0cmsMXQxEhydNt1l3hdvgtcSjYcFsgCE0jVzrYfTZ/NtOwPT Hq5q8HisRGDi/KEzNn19+V23rMyQx6a7F3EwpunrPq3hxkFaYnAvbc68/kYYD9AX72u/ 7kX9r9X2oflhINmmbcTKP5WuWqVX7D3KjgZ8wIXt5AtGzQXyNHpULAK6bguQc7eLqlvb dZF9EeYpIAgHau8twNwN07JUobS2URUwAaeqENckhQyxlVkexQLXdL7iySMNp0mzyj+O yG7g== X-Gm-Message-State: AOJu0Yw2HA/6Flw1b6jN2IHb6Gf0R34vWeyzvRWub07t5XCXcKFCaIzn Z4/jPuK5vGpLm0xU6F+DMB0= X-Google-Smtp-Source: AGHT+IEws0SgJIGngr6DkNUCBce4rLFkQQEt1HrAnkp5+jJ4+T4wPIqxBdKmplZf3/w5OZzffNsZjQ== X-Received: by 2002:a9d:70d5:0:b0:6bc:a824:2750 with SMTP id w21-20020a9d70d5000000b006bca8242750mr788505otj.2.1691530854769; Tue, 08 Aug 2023 14:40:54 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:1504:23be:30de:31a3]) by smtp.gmail.com with ESMTPSA id e19-20020a9d6e13000000b006b9b2678639sm6305421otr.75.2023.08.08.14.40.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 14:40:54 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, marex@denx.de, Fabio Estevam Subject: [PATCH 2/3] mx7dsabresd: Convert to watchdog driver model Date: Tue, 8 Aug 2023 18:40:39 -0300 Message-Id: <20230808214040.1382330-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808214040.1382330-1-festevam@gmail.com> References: <20230808214040.1382330-1-festevam@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.8 at phobos.denx.de X-Virus-Status: Clean From: Fabio Estevam Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset. Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset. Signed-off-by: Fabio Estevam --- arch/arm/dts/imx7d-sdb-u-boot.dtsi | 12 ++++++++++++ configs/mx7dsabresd_defconfig | 3 +++ 2 files changed, 15 insertions(+) diff --git a/arch/arm/dts/imx7d-sdb-u-boot.dtsi b/arch/arm/dts/imx7d-sdb-u-boot.dtsi index 818528c418f5..2e234b6b5828 100644 --- a/arch/arm/dts/imx7d-sdb-u-boot.dtsi +++ b/arch/arm/dts/imx7d-sdb-u-boot.dtsi @@ -1,5 +1,13 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT +/ { + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + bootph-pre-ram; + }; +}; + &fec2 { status = "disable"; }; @@ -58,3 +66,7 @@ >; }; }; + +&wdog1 { + bootph-pre-ram; +}; diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig index 26e68d30d267..1c8105f44f28 100644 --- a/configs/mx7dsabresd_defconfig +++ b/configs/mx7dsabresd_defconfig @@ -73,6 +73,8 @@ CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_SOFT_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_IMX_THERMAL=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y @@ -85,4 +87,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_IMX_WATCHDOG=y CONFIG_ERRNO_STR=y -- 2.34.1