Message ID | 20201025124010.18215-18-dariobin@libero.it |
---|---|
State | Changes Requested |
Delegated to: | Lokesh Vutla |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=libero.it Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=libero.it header.i=@libero.it header.a=rsa-sha256 header.s=s2014 header.b=pOJr6JMF; 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 4CJyJB3Bz4z9sV1 for <incoming@patchwork.ozlabs.org>; Sun, 25 Oct 2020 23:41:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA159824B5; Sun, 25 Oct 2020 13:40:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=libero.it 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=libero.it header.i=@libero.it header.b="pOJr6JMF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C103824AE; Sun, 25 Oct 2020 13:40:53 +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=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,FREEMAIL_FROM,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from libero.it (smtp-34.italiaonline.it [213.209.10.34]) (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 024AE82465 for <u-boot@lists.denx.de>; Sun, 25 Oct 2020 13:40:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=libero.it Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dariobin@libero.it Received: from passgat-Modern-14-A10M.homenet.telecomitalia.it ([79.31.32.113]) by smtp-34.iol.local with ESMTPA id WfKFkQlTYmMFTWfKKkuILM; Sun, 25 Oct 2020 13:40:48 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2014; t=1603629648; bh=za2EbU86VCFE/qbbLdlpqTQ1PLdQ9iAHbP1Df+z7Feo=; h=From; b=pOJr6JMFN2fQMXlpbU4EwKIgH0Kh0ROWDSD0f282BhaopC9KUUHN6PWgWnL+AoBqY GwGKbW/Wed1tCoD8E1/hYmxPJniRPpjR66KGwrmn1Qk575GPOGE3Ksv2wEurH5Yz8V R0aLEsf2nj53qXGwuz9/V0zDwcQVd/Z/6gb8lk1cv12yEsjiH3hZg7WMKUeRka4lsm db6OMduYYnmw0ZADOrt4H5gMOaGoLo+MtUpstHlRjBYqb/s/bqc0Wf9PIqemdQd/LT QZHTKVZECzWmWCIhT/e+ggLIHMRj/5/Z7y06mStJU8YYFD0q5xqGnB1JIrFok4Q80i CNVZ9xHngFWWg== X-CNFS-Analysis: v=2.4 cv=KetsDSUD c=1 sm=1 tr=0 ts=5f957250 a=9myQFBeCGQ66/mXSe6vdPA==:117 a=9myQFBeCGQ66/mXSe6vdPA==:17 a=Oj4l5q2oWNqs8PrQqXwA:9 From: Dario Binacchi <dariobin@libero.it> To: u-boot@lists.denx.de Cc: Dario Binacchi <dariobin@libero.it>, Lokesh Vutla <lokeshvutla@ti.com> Subject: [PATCH v5 17/27] omap: timer: fix the rate setting Date: Sun, 25 Oct 2020 13:40:00 +0100 Message-Id: <20201025124010.18215-18-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201025124010.18215-16-dariobin@libero.it> References: <20201025124010.18215-16-dariobin@libero.it> X-CMAE-Envelope: MS4xfG7MAWspG1gqQdExPmiAYbcrxPgp1cP0UFG1o+aS5HANwO0xr5TMkhUdefOfl8D9uccz3DYV7CRcjKhij+1uRqUQuzVXBR4EjW9jR29/O7PkZ9n0cTbT Mwqp8cIn+V5IbwNgd0JItUteliUn+sJ5JVjdzUc7oTihQhwbFSd85oMNuI5OySgW48g5WkRgdhQiKF710FAkFu1gZ8GgpMOusEhRdDkMfSfL+LdS8GKwy7mz +MnAD8/DXoaKLSIpDzSf5qe2Wyvhxvbsr9rT+8M7h1sAV0+RxWP4M9hOK66MathB X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Add DM support for omap PWM backlight
|
expand
|
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c index 4eecb3e64d..c08cb5ad2e 100644 --- a/drivers/timer/omap-timer.c +++ b/drivers/timer/omap-timer.c @@ -19,8 +19,6 @@ #define TCLR_PRE_EN BIT(5) /* Pre-scaler enable */ #define TCLR_PTV_SHIFT (2) /* Pre-scaler shift value */ -#define TIMER_CLOCK (V_SCLK / (2 << CONFIG_SYS_PTV)) - struct omap_gptimer_regs { unsigned int tidr; /* offset 0x00 */ unsigned char res1[12]; @@ -61,7 +59,9 @@ static int omap_timer_probe(struct udevice *dev) struct omap_timer_priv *priv = dev_get_priv(dev); if (!uc_priv->clock_rate) - uc_priv->clock_rate = TIMER_CLOCK; + uc_priv->clock_rate = V_SCLK; + + uc_priv->clock_rate /= (2 << CONFIG_SYS_PTV); /* start the counter ticking up, reload value on overflow */ writel(0, &priv->regs->tldr);
The prescaler (PTV) setting must be taken into account even when the timer input clock frequency has been set. Signed-off-by: Dario Binacchi <dariobin@libero.it> --- (no changes since v1) drivers/timer/omap-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)