Message ID | 20200906121200.1599-17-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=X7/rTGpv; 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 4Bkr1d1V4jz9sTS for <incoming@patchwork.ozlabs.org>; Sun, 6 Sep 2020 22:14:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A9D8882396; Sun, 6 Sep 2020 14:13:13 +0200 (CEST) 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="X7/rTGpv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98F05823A2; Sun, 6 Sep 2020 14:13:12 +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=-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 3B3EF8237F for <u-boot@lists.denx.de>; Sun, 6 Sep 2020 14:13:10 +0200 (CEST) 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 EtX2k0r75m3ibEtXhkIkRD; Sun, 06 Sep 2020 14:13:10 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2014; t=1599394390; bh=dKsYiJr37Bbjuu1fJMaRIsS5BXlBSaU32CfWRv7WW84=; h=From; b=X7/rTGpvX6TWtGiCvkU5PZxIcvX6FjsfviteCDNxK7Ix00STBilICt3if4sXkqG6w oitjnsk8l9pZFInEsHuowY8vk7bParujKnQD6u1H/ydrnLeO0Rg9f6Ho0plqSQwL4D WW6AYKvDWaDRjepgKuUmOku9++Sx+4XA9RElBZD9vRpnW0lxvjrKcvJ7qGpRLkcspo XX92sbq6cZDe/xVs35eqXwmxvQVHFw/m6R7tATLghFaw8y44ebkvhag4BJv8YoWy9S dUQWZGAmmFCPeDPeF1Nr+yrYvoTatlz71wY6QiVVsVajsiLKo9FB0Z5aqgUXdLaJmO dWtpWNoozvV9Q== X-CNFS-Analysis: v=2.4 cv=Xas3cK15 c=1 sm=1 tr=0 ts=5f54d256 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 v2 16/30] omap: timer: fix the rate setting Date: Sun, 6 Sep 2020 14:11:46 +0200 Message-Id: <20200906121200.1599-17-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200906121200.1599-9-dariobin@libero.it> References: <20200906121200.1599-9-dariobin@libero.it> X-CMAE-Envelope: MS4xfHOnQIsiVblk+HRKMyZXX2XfKC7nNsPAwCuDYjq51sv4Raiw1a9Ry2TYIOZSkcaKD7DO2yBm5YExqngenxcgY8Ewe41M9wQC9x/kspq4vpQOdOUCFDVG a5UshMvJvBnRXH2BAm+ULrdaAPDQYTMUSuZgLf+JpkUV11KgsCnCneWIs7m7AQAyjQ73h51CWSEfwRgilN8yvhJr99pGCqCatVH1/kop2wmTqKssRs5sLC0h 8TZB9aIcM3lxSWCsL+9aweQEjAjo8rv23bH5E4ddf//DdK7HMr2vLyFr1P6qt8/+ 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 cf3d27b96b..60af68e677 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]; @@ -63,7 +61,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(-)