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 E753DC54EE9 for ; Tue, 27 Sep 2022 10:20:19 +0000 (UTC) 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) 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=20Roh=C3=A1r?= To: Stefan Roese Cc: u-boot@lists.denx.de, =?UTF-8?q?Marek=20Beh=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 Content-Type: text/plain; charset=UTF-8 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.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 --- 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); -- 2.20.1