From patchwork Wed Sep 9 21:04:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 1361065 X-Patchwork-Delegate: uboot@andestech.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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=uul26Jci; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bmvfr53BFz9sTH for ; Thu, 10 Sep 2020 07:05:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFAD9822F5; Wed, 9 Sep 2020 23:04:37 +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="uul26Jci"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB96B822C7; Wed, 9 Sep 2020 23:04:33 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (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 129A981B79 for ; Wed, 9 Sep 2020 23:04:31 +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=seanga2@gmail.com Received: by mail-qk1-x743.google.com with SMTP id q63so3118629qkf.3 for ; Wed, 09 Sep 2020 14:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p5671etH4GHnPYP+3/WpVmT7Y9OzWOeUzc5sYYJxzIQ=; b=uul26Jci/2SurrotstSabwjUoZd8X95+w2vraNi/SQzYyUIKYpUWCKCZ30eXzXwFmK 6o9QZb/W6mAchhTmpF2cg1B+NLdmuAh6fbKYUdYkx/Yl0sBDvixb0fD6OXVkFnUbSPVk 2ktnyZsv3YIlPMSKYFhi+Y9OaVmtzMyFXKQbt2jaJquqboGvhRMsECljr6l9tP8+0B2L n0sBrt8E+AtJ608VjiFKJMWq3Isxw2lYhTYAZ3TNJ4fUpqgQ7bo+MH+dFpjlWnxmsXu4 i73qetiCxWOPRrs+Se+EgTIc7Gr3vWtvSpnIAox72XIq1AnaFLVE0XIdSxx0u5J75zOg b2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p5671etH4GHnPYP+3/WpVmT7Y9OzWOeUzc5sYYJxzIQ=; b=TTrzkzAxO3jCU2+KnFtvSi/HBPr9ytmnl6v9Z8GoaI6zoYWZ62nSy4Y5oJhhdoxCrU FpMMaCtmfE0nhK0OpFg6oGilPMbb418EHn6/gMrMD4G96GCXrwbeFnKH6HU+sSEbgF76 +Wxd5iWPg2EG4YF79NkNINTYtvFsPVOgc/AidkZtapoYPqm5mOdGtB4PiRhYpKzsRxOz y2jSg4Bnv8+odME6b0Al6Q6GC8hv5F5wVFc8JeUNxZuQfxvIY85dsPDDwdhyQf7dxNHv +oXSP2CsKbWosx9dqNXsAC4i/wPKksMPv3G92jdZFbrg/xgsYYNPCV0ctcxqQ99kc6qL WLAA== X-Gm-Message-State: AOAM5300eQS7vBHM6GkXzu+97LuD3D6HCnpDFHFPzPIanQSTSCLwdkTu KivY6o7+tRLPeBFirGq0EPGW4RvvlEx/6O55 X-Google-Smtp-Source: ABdhPJz/Mlb7wPpbjtOnr11VRwGB5jz5tAG/OOWVG1kNnbqpuvYvQiOPb9FtdxFcrBZsNspto/toYA== X-Received: by 2002:a37:a83:: with SMTP id 125mr4819734qkk.360.1599685469799; Wed, 09 Sep 2020 14:04:29 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id c40sm4664096qtb.72.2020.09.09.14.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 14:04:29 -0700 (PDT) From: Sean Anderson To: u-boot@lists.denx.de Cc: Bin Meng , Marek Vasut , Jagan Teki , Simon Glass , Heinrich Schuchardt , Sean Anderson Subject: [PATCH v4 3/7] wdt: dw: Fix clock rate being off by 1000 Date: Wed, 9 Sep 2020 17:04:16 -0400 Message-Id: <20200909210420.243190-4-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909210420.243190-1-seanga2@gmail.com> References: <20200909210420.243190-1-seanga2@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean The clock subsystem returns clock rates in Hz. We need to divide by 1000 so the rate is in kHz. Fixes: cf89ef8d10f240554541c20b2e1bdcdd58d1d7e6 Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) drivers/watchdog/designware_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c index 49cf861d46..41866fa01b 100644 --- a/drivers/watchdog/designware_wdt.c +++ b/drivers/watchdog/designware_wdt.c @@ -129,7 +129,7 @@ static int designware_wdt_probe(struct udevice *dev) if (ret) return ret; - priv->clk_khz = clk_get_rate(&clk); + priv->clk_khz = clk_get_rate(&clk) / 1000; if (!priv->clk_khz) return -EINVAL; #else