Przeglądaj źródła

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>
Lokesh Vutla 6 lat temu
rodzic
commit
84b4221cff
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      drivers/timer/omap-timer.c

+ 2 - 1
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 timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
 	struct omap_timer_priv *priv = dev_get_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 */
 	/* start the counter ticking up, reload value on overflow */
 	writel(0, &priv->regs->tldr);
 	writel(0, &priv->regs->tldr);