From patchwork Tue Sep 27 10:19:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1683140 X-Patchwork-Delegate: sr@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=A89ZYSPQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4McFxg2P6wz1ypH for ; Tue, 27 Sep 2022 20:20:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C40E84A93; Tue, 27 Sep 2022 12:20:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="A89ZYSPQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C54D84BEF; Tue, 27 Sep 2022 12:20:14 +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.2 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 dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 1A8B284A93 for ; Tue, 27 Sep 2022 12:20:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5363961790; Tue, 27 Sep 2022 10:20:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 851F4C433C1; Tue, 27 Sep 2022 10:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664274009; bh=VYAO5wUHHqXDvdM0n/QSbBE09XVWyabC3bECN87gc/s=; h=From:To:Cc:Subject:Date:From; b=A89ZYSPQgt2cTKyZ1LylB1ilml0z0PXTNGBLNZY535JXq13Twrn06rmwp5XA8FMsY wikLqflsGlo92QT+ehqP73lrfvmaaZBW14OsH8L7K6KfDsIidESZiLrZ0LPlaOmZ3E LAc8VDtFMHJYFzV8pf1+qon0CMPJSG41ZHt6zC8/aVSPZSZjSd4P+jzVnVVF7AL60O 8bqMpnjr+ln2JsOREzayT/IXlQJQgIdxe9sA/q9Q7YXnUaoFTwKJAPC91XlPd530Sd WhWAhbD/qOzV7xtU8RFFyEi2u7go2X5ZhArYhXhYOu5nhRkA7+sLdoYzkmFSTGzAQs M/xTwp2USFN+A== Received: by pali.im (Postfix) id B5D01795; Tue, 27 Sep 2022 12:20:06 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Stefan Roese Cc: u-boot@lists.denx.de, =?utf-8?q?Marek_Beh=C3=BAn?= , Josef Schlehofer Subject: [PATCH] watchdog: max6370: use __udelay() to avoid recursion Date: Tue, 27 Sep 2022 12:19:19 +0200 Message-Id: <20220927101919.6999-1-pali@kernel.org> X-Mailer: git-send-email 2.20.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 The udelay() function in lib/time.c contains a WATCHDOG_RESET() call. So use __udelay() in max6370_wdt.c to prevent recursion. Fixes: 0a095fc53b15 ("watchdog: Add MAX6370 watchdog timer driver") Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- drivers/watchdog/max6370_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/max6370_wdt.c b/drivers/watchdog/max6370_wdt.c index 556c6a4b6d6b..44872e23c586 100644 --- a/drivers/watchdog/max6370_wdt.c +++ b/drivers/watchdog/max6370_wdt.c @@ -73,7 +73,7 @@ static int max6370_wdt_reset(struct udevice *dev) if (dm_gpio_is_valid(&wdt->gpio_wdi)) { dm_gpio_set_value(&wdt->gpio_wdi, 1); - udelay(1); + __udelay(1); dm_gpio_set_value(&wdt->gpio_wdi, 0); } else { val = readb(wdt->reg);