From nobody Mon Feb 9 17:24:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612877001; cv=none; d=zohomail.com; s=zohoarc; b=bQByAVob3lwk+eQs6yyz7v2jWIsm5m2w/g2oFcr65rEw/yM3BJ4dCxnI+mUGarLtKEMbCGlWsCi9SQ/2L7Q9JMspiiiFHAtaegz4U+ELm9B0SWOmzvHvaB22vs2gwyBLnFHCHsnRib42Jndc40oaNP3bjYPmMaPVcStcGG7tB34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612877001; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RQnHSU5URki5Eoi1GvfEMafAg4qrSv6IwWbelkI4His=; b=RY2cM2YyXmyzsleMSUZ3/BZ9z7jZxaVH/nlX2xEUSpvmCuIfc/srfL7gR6aV6BW0yQLKyJw+yAKAz0WMPPEfhUYU5rrsSi/H149whkkVvN0lSKX5wvTgGSgW6yb1YIxqWs7jlmSVAlz4kbUFHSyUvjFEOuKpPLa9FfvPwlQT4Fc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612877001063379.7676642187081; Tue, 9 Feb 2021 05:23:21 -0800 (PST) Received: from localhost ([::1]:51440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Sz9-0004UU-Qa for importer@patchew.org; Tue, 09 Feb 2021 08:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9Swp-0002mJ-U6 for qemu-devel@nongnu.org; Tue, 09 Feb 2021 08:20:55 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:55070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9Swj-0000lw-Bz for qemu-devel@nongnu.org; Tue, 09 Feb 2021 08:20:55 -0500 Received: by mail-wm1-x32f.google.com with SMTP id w4so3097428wmi.4 for ; Tue, 09 Feb 2021 05:20:48 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y11sm34752472wrh.16.2021.02.09.05.20.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 05:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RQnHSU5URki5Eoi1GvfEMafAg4qrSv6IwWbelkI4His=; b=eekVPp/C9p6r8Vv1bvidh5JjtT5UYSt+vsgApr3nfh84RAaSvnD/6OKfx3K+tcCuCR riuYCYES6FN+KlUeWd83JvS/tlphQg1PkS38P3epX/v/0GBcxhHKxwfMtsiigjF6aq2+ lbSRL4Pe8v+tiAopoakCQKbNveVHmaSx6Uj5rUXIcxIucOJyBzbFWh3adDJnHWRXHqNM 1Up7NyRhMsMXmPewbucxS7K0Uuac2p5i1ttMOFqpqBWPTlHKI0SAvEq8iF/97cHi+h+c WTwWof2XitOZhCetL6ccuau3YcbooBsqPDMTmD/f6T/sbHbs+OwmNnNCHxSeXchVcOJq G2Yw== 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=RQnHSU5URki5Eoi1GvfEMafAg4qrSv6IwWbelkI4His=; b=DYQFcntspE307xO2YsLeSmvqmOa+hvcXqvbiUCSsIsORjY7oRC8F9tLihTjGFqz31E eh571K1GUP7dg1PT/uDVRozVPn81AG6rbzYGyv0mDLQLPaNouCno8pPAnjpjGmceLpkg LUaYyNXR/iw25yijJ6D9iuaiFeukk7OV1Q3Doq+Dl9n4TdN9dw5QMl76nN7QARchGSmT a+41uXHyFniQ7yEQWYR4mxNysA2tGYmypSGeX0BWyRSclKNMYDMJbBbSC/4689GHST/4 Ikpu4XdZdvupzHBrRt8p4GcLbPzDyreNc2L1AVoNwNDZsaBwnuVwqZoZB7ljBCNwxq20 tNyQ== X-Gm-Message-State: AOAM533WGRfxJ+2+606B6/BIezvXbbXa4omVouqcfU0Nm0Gozj12s9AE tQMJzGlgWcPoAZioW3n01Zhd+w== X-Google-Smtp-Source: ABdhPJytVUwz6gtklifhSQuu0z5ZSOjp5w5MFnrIR3N+idNQhCEHAeCMVr+g/HRyzzwNkyWswYk8iw== X-Received: by 2002:a1c:1d8b:: with SMTP id d133mr3431989wmd.172.1612876847751; Tue, 09 Feb 2021 05:20:47 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v2 4/4] hw/timer/npcm7xx_timer: Use new clock_ns_to_ticks() Date: Tue, 9 Feb 2021 13:20:40 +0000 Message-Id: <20210209132040.5091-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210209132040.5091-1-peter.maydell@linaro.org> References: <20210209132040.5091-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E. Iglesias" , Tyrone Ting , Luc Michel , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Havard Skinnemoen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Use the new clock_ns_to_ticks() function in npcm7xx_timer where appropriate. Signed-off-by: Peter Maydell Reviewed-by: Hao Wu Reviewed-by: Luc Michel Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/timer/npcm7xx_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/timer/npcm7xx_timer.c b/hw/timer/npcm7xx_timer.c index 4efdf135b82..32f5e021f85 100644 --- a/hw/timer/npcm7xx_timer.c +++ b/hw/timer/npcm7xx_timer.c @@ -138,8 +138,8 @@ static int64_t npcm7xx_timer_count_to_ns(NPCM7xxTimer *= t, uint32_t count) /* Convert a time interval in nanoseconds to a timer cycle count. */ static uint32_t npcm7xx_timer_ns_to_count(NPCM7xxTimer *t, int64_t ns) { - return ns / clock_ticks_to_ns(t->ctrl->clock, - npcm7xx_tcsr_prescaler(t->tcsr)); + return clock_ns_to_ticks(t->ctrl->clock, ns) / + npcm7xx_tcsr_prescaler(t->tcsr); } =20 static uint32_t npcm7xx_watchdog_timer_prescaler(const NPCM7xxWatchdogTime= r *t) --=20 2.20.1