From: Sean Anderson Date: Mon, 15 Mar 2021 20:09:13 -0400 Subject: [PATCH 01/19] sandbox: Only call timer_timebase_fallback() if present In-Reply-To: <20210315181056.1.I9ede5161ce79af261ff719410cbc1dc3e83366a2@changeid> References: <20210315051124.1940496-1-sjg@chromium.org> <20210315181056.1.I9ede5161ce79af261ff719410cbc1dc3e83366a2@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3/15/21 1:11 AM, Simon Glass wrote: > 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 > --- > > drivers/timer/sandbox_timer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c > index 2075cd4edda..c846bfb9f12 100644 > --- a/drivers/timer/sandbox_timer.c > +++ b/drivers/timer/sandbox_timer.c > @@ -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; > Reviewed-by: Sean Anderson