Message ID | 20200825092124.4284-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=gkZlPD+Q; 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 4BbNvB02wSz9sTd for <incoming@patchwork.ozlabs.org>; Tue, 25 Aug 2020 19:27:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C3BE98227B; Tue, 25 Aug 2020 11:26:00 +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="gkZlPD+Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8D2F822C2; Tue, 25 Aug 2020 11:25:34 +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, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from libero.it (smtp-34-i2.italiaonline.it [213.209.12.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 E86CA822A7 for <u-boot@lists.denx.de>; Tue, 25 Aug 2020 11:25:31 +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 ([80.116.93.51]) by smtp-34.iol.local with ESMTPA id AVBLkT3VUm3ibAVCtksQqN; Tue, 25 Aug 2020 11:25:31 +0200 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2014; t=1598347531; bh=LsPk+BWgCeszpymoqPdCeNnW84MsVGgnR9nUB/z6/NY=; h=From; b=gkZlPD+Qw8eXFN6GPbzHF1+ZJ4DMmt75qnX1wQv/qWndoNuhEm3vvsWJR2O7ykc30 icMiuz21GKN7MXCgibld+WhZBf4syWB79sCZb5/IKSnjq7w/rdY8D3A+iQusf5r4Vq r6pYdMqwhREWwE+NObaYC0crySskxb+W3kTEyl7kQstoje8wvMG47WcCJn4ZI++FFr a38f6DHxqXAlfj6aEgT35vHE8ZCV4ujmqMBLy3XWHxnYrXv3R4rj1/asWl+dBemHVP LoC/unK6pjjeazHa+nhwzLsWXzDVRNBcjv1TRjqgWKi5eZLLRxp5UUBWQFm8UjwONz J1MmN3LREoQzQ== X-CNFS-Analysis: v=2.4 cv=Xas3cK15 c=1 sm=1 tr=0 ts=5f44d90b a=DfuSTiwdfqt8Y39yWVJnnA==:117 a=DfuSTiwdfqt8Y39yWVJnnA==: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 17/31] omap: timer: fix the rate setting Date: Tue, 25 Aug 2020 11:21:10 +0200 Message-Id: <20200825092124.4284-18-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200825092124.4284-1-dariobin@libero.it> References: <20200825092124.4284-1-dariobin@libero.it> X-CMAE-Envelope: MS4xfAnPX2AB0C6S66EIt1bbOAQ6tXH0EAm/CpUWsxTQfk7aYtRyspCfcRAsp4SD8VFjK8xE0VjiMSJo86G55XtJ5f57YUA7Gx6y3SBPUBSFAuMH3xhsMjmS 7ZppefdUZYk1x6oVnfs4wKVAX8ht4quxakJLXNnRjK3THUiFmEsn3Zze216Da1o4gkqFB404U/rLUWhU1sluoJ7YD8TNq64s8XaRD0r+4CwpLfnoMzH0ysFY VvWvrl+ew46Hbr48NyxzG0yoTsJfu+ACRSdbMheFWjCvWJeYDwgWDEiULRUcNFCc 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> --- drivers/timer/omap-timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)