summaryrefslogtreecommitdiff
path: root/drivers/timer/omap-timer.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-12 09:32:48 -0500
committerTom Rini <trini@konsulko.com>2021-01-12 09:32:48 -0500
commitee6726be4f0dccb612f0193c62ca149164c8a5af (patch)
treec58716b51bec487da0c5ac8929bc072549c90b07 /drivers/timer/omap-timer.c
parent996f217ea368ecaef84863bb29699c0e185b9be7 (diff)
parentea3f5348063ebe4f41be7d1ba3ef0afe56a04a40 (diff)
Merge tag 'ti-v2021.04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
- DM support for OMAP PWM backlight - USB host mode support for AM654 - Minor SPI fixes - Add support k2g ice board with 1GHz silicon - Fix GTC programming for K3 devices
Diffstat (limited to 'drivers/timer/omap-timer.c')
-rw-r--r--drivers/timer/omap-timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index 7ac20d78dd8..721e385fd15 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);