diff options
-rw-r--r-- | drivers/timer/omap-timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c index 3f847984cb9..138783b69fa 100644 --- a/drivers/timer/omap-timer.c +++ b/drivers/timer/omap-timer.c @@ -51,7 +51,7 @@ static int omap_timer_get_count(struct udevice *dev, u64 *count) { struct omap_timer_priv *priv = dev_get_priv(dev); - *count = readl(&priv->regs->tcrr); + *count = timer_conv_64(readl(&priv->regs->tcrr)); return 0; } @@ -65,6 +65,7 @@ static int omap_timer_probe(struct udevice *dev) /* start the counter ticking up, reload value on overflow */ writel(0, &priv->regs->tldr); + writel(0, &priv->regs->tcrr); /* enable timer */ writel((CONFIG_SYS_PTV << 2) | TCLR_PRE_EN | TCLR_AUTO_RELOAD | TCLR_START, &priv->regs->tclr); |