From patchwork Mon Sep 19 01:17:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chong, Teik Heng" X-Patchwork-Id: 1679133 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Wyeyps4y; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MW6HS2DcBz1ynm for ; Mon, 19 Sep 2022 11:17:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1402484BB9; Mon, 19 Sep 2022 03:17:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.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=intel.com header.i=@intel.com header.b="Wyeyps4y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4DA9F83FE1; Mon, 19 Sep 2022 03:17:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A24C084BEA for ; Mon, 19 Sep 2022 03:17:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=teik.heng.chong@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663550266; x=1695086266; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hz1cz3OgvIZi69Z/ngIS2QbL8ToHFwcOWdVPaG1QKDE=; b=Wyeyps4yE/i8s5vGnb9zNWqRGMShh7CII1ovUKAQkBSvaQKEaa3Ik3rr 0JATQznJH4LpGNflIRSn3NQUk+bufVram/my8j/oueuZ+19Gf0iyg+NL5 5c8i3mUtTSNh/n6piqc4Qef0LoxDaCPa+3XAYNojn2POxWx+Eu7t0pMhG w8jtbVgTo0N4gaVZIYGgwuGbUJ2ZAD9hiuBBtaM3xCkDAtlCW9JqzED/T 2B4fYUfak0lynGWVrJQMhVq6O0ToZ1tHCNqzP+aK79SlNJT1i6pqUc/MS fwiizIneEltDn3OOWupPHNcqPvxRZwXarHP4vj+tHBMqmq0RaEE9ouaz9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10474"; a="385571663" X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="385571663" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2022 18:17:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="613823642" Received: from pgli4336.png.intel.com ([10.221.172.41]) by orsmga007.jf.intel.com with ESMTP; 18 Sep 2022 18:17:39 -0700 From: teik.heng.chong@intel.com To: u-boot@lists.denx.de Cc: Dinh Nguyen , Chin-Liang See , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang Subject: [PATCH] arm: socfpga: switching watchdog 0 to watchdog 1 Date: Mon, 19 Sep 2022 09:17:35 +0800 Message-Id: <20220919011735.15969-1-teik.heng.chong@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 From: Tien Fong Chee Switching to watchdog 1, because there is a hardware bug found in watchdog 0, it cannot reliable trigger a reset to the CPU. More details can be referred in : Linux commit "59d94d2ed45d598211feb52566e6a806d17f8a3f" Signed-off-by: Tien Fong Chee Signed-off-by: Teik Heng Chong --- arch/arm/mach-socfpga/spl_a10.c | 4 ++-- include/configs/socfpga_arria10_socdk.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c index 5d661fb995..f743c0624f 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -263,8 +263,8 @@ void board_init_f(ulong dummy) cm_basic_init(gd->fdt_blob); #ifdef CONFIG_HW_WATCHDOG - /* release watchdog 0 from reset */ - socfpga_reset_deassert_wd0(); + /* release watchdog 1 from reset */ + socfpga_reset_deassert_wd1(); /* reconfigure and enable the watchdog */ hw_watchdog_init(); diff --git a/include/configs/socfpga_arria10_socdk.h b/include/configs/socfpga_arria10_socdk.h index f712928d3c..cc2aeebe5b 100644 --- a/include/configs/socfpga_arria10_socdk.h +++ b/include/configs/socfpga_arria10_socdk.h @@ -36,4 +36,12 @@ /* The rest of the configuration is shared */ #include +/* + * L4 Watchdog + */ +#ifdef CONFIG_HW_WATCHDOG +#undef CONFIG_DW_WDT_BASE +#define CONFIG_DW_WDT_BASE SOCFPGA_L4WD1_ADDRESS +#endif + #endif /* __CONFIG_SOCFGPA_ARRIA10_H__ */