diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2018-08-16 18:26:55 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-09-10 20:48:19 -0400 |
commit | 84b4221cffa805ab525be9a2d580f40f6d9a0243 (patch) | |
tree | 72a3af3c754f65c32cdb62bb230737535f54a3e8 /drivers/timer/omap-timer.c | |
parent | 3ee15a51809998dda6bb94eea85237eb9fe698f0 (diff) |
dm: omap-timer: Update clock rate only if not populated
timer_pre_probe() tries to populate the clock rate from DT. omap
timer driver tries to overwrite this value irrespective of the value
populated fro DT. So update this value only when DT doesn't populate
the clock rate.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/timer/omap-timer.c')
-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 138783b69fa..f10df69092a 100644 --- a/drivers/timer/omap-timer.c +++ b/drivers/timer/omap-timer.c @@ -61,7 +61,8 @@ static int omap_timer_probe(struct udevice *dev) struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct omap_timer_priv *priv = dev_get_priv(dev); - uc_priv->clock_rate = TIMER_CLOCK; + if (!uc_priv->clock_rate) + uc_priv->clock_rate = TIMER_CLOCK; /* start the counter ticking up, reload value on overflow */ writel(0, &priv->regs->tldr); |