mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
sandbox: Only call timer_timebase_fallback() if present
This function only exists if CPU is enabled. Update the code to take account of this, so that it does not have to be enabled on all sandbox builds. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
70f5c99d60
commit
539db6ab09
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ static int sandbox_timer_probe(struct udevice *dev)
|
|||
{
|
||||
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
|
||||
|
||||
if (dev_read_bool(dev, "sandbox,timebase-frequency-fallback"))
|
||||
if (CONFIG_IS_ENABLED(CPU) &&
|
||||
dev_read_bool(dev, "sandbox,timebase-frequency-fallback"))
|
||||
return timer_timebase_fallback(dev);
|
||||
else if (!uc_priv->clock_rate)
|
||||
uc_priv->clock_rate = SANDBOX_TIMER_RATE;
|
||||
|
|
Loading…
Add table
Reference in a new issue