[PATCH 1/1] sandbox: fix building with CONFIG_SPL_TIMER=y

Simon Glass sjg at chromium.org
Tue Feb 21 20:35:44 CET 2023


Hi Heinrich,

On Sat, 18 Feb 2023 at 02:34, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Building sandbox_defconfig with CONFIG_SPL_TIMER=y results in an error
>
>     include/dm/platdata.h:63:33: error: static assertion failed:
>     "Cannot use U_BOOT_DRVINFO with of-platdata.
>     Please use devicetree instead"
>
> Add a missing condition in the sandbox driver.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  drivers/timer/sandbox_timer.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c
> index c846bfb9f1..278893d1e9 100644
> --- a/drivers/timer/sandbox_timer.c
> +++ b/drivers/timer/sandbox_timer.c
> @@ -66,6 +66,8 @@ U_BOOT_DRIVER(sandbox_timer) = {
>  };
>
>  /* This is here in case we don't have a device tree */
> +#if !CONFIG_IS_ENABLED(OF_PLATDATA) || defined(DT_PLAT_C)

Can you drop the second condition? That is an internal thing that must
not be used outside a particular file generated by dtoc.

>  U_BOOT_DRVINFO(sandbox_timer_non_fdt) = {
>         .name = "sandbox_timer",
>  };
> +#endif
> --
> 2.38.1
>

Regards,
SImon


More information about the U-Boot mailing list