From patchwork Fri Jan 24 04:44:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1228675 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=XJ6mjQXy; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 483mlS0bD8z9sRY for ; Fri, 24 Jan 2020 15:44:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2711981749; Fri, 24 Jan 2020 05:44:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1579841086; bh=noTsqcJOLuOZcsYfne7iYjOhgHqFAgZjhmCj3N9iQLA=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=XJ6mjQXyrRMpOgig4sh2NGHgHoRMSbpGXe9ZPys+YOygWjxrHl4bQBwDOzUJ8aH6R KUtnJjiEciVvc9BBwp58BAu78DoScl8f9Ty6m1f2Zp0vni2doFyuiMdpLXQqKNv49c ePYFi9Hd+boISY6PcyVOl+bZNMDhTM9At/NtrPhXDXwr3evm7cGojQE0kt/MQm/Em1 tGiZ+2wn44Y8AmQdGEb9/d+YuR12nbXkNzXiC0gUGO8Xd37Gp4ltE2E9djpUU7aomn bZZeBlOqwa38670V+RzfKYWumspELlVdzXSp6JMgecPRXxMxfE7Zcght4D2rQL+az6 O3hhYPM0FbX/w== Received: by phobos.denx.de (Postfix, from userid 109) id D0CCB817B0; Fri, 24 Jan 2020 05:44:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (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 4B81A81744 for ; Fri, 24 Jan 2020 05:44:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 483mlF4wRyz1qqkj; Fri, 24 Jan 2020 05:44:41 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 483mlF4WQ7z1qsnS; Fri, 24 Jan 2020 05:44:41 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 086gm3qn9u_i; Fri, 24 Jan 2020 05:44:40 +0100 (CET) X-Auth-Info: 49iRMkyeA2crJD72JVCf5h5WR7kXJt61IIdzpX7x/Xc= Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz [86.49.35.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 24 Jan 2020 05:44:40 +0100 (CET) From: Marek Vasut To: u-boot@lists.denx.de Subject: [PATCH 1/3] watchdog: omap_wdt: Fix WDT timeout configuration Date: Fri, 24 Jan 2020 05:44:23 +0100 Message-Id: <20200124044425.469550-1-marex@denx.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Suniel Mahesh , Sam Protsenko Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean The timeout parameter of omap3_wdt_start() is in miliseconds, while GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT driver is actually usable. Signed-off-by: Marek Vasut Cc: Grygorii Strashko Cc: Sam Protsenko Cc: Suniel Mahesh Reviewed-by: Lokesh Vutla --- drivers/watchdog/omap_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 284cfbb2a8..b9cdf70036 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -188,7 +188,7 @@ static int omap3_wdt_stop(struct udevice *dev) static int omap3_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags) { struct omap3_wdt_priv *priv = dev_get_priv(dev); - u32 pre_margin = GET_WLDR_VAL(timeout_ms); + u32 pre_margin = GET_WLDR_VAL(timeout_ms / 1000); /* * Make sure the watchdog is disabled. This is unfortunately required * because writing to various registers with the watchdog running has no