]> git.baikalelectronics.ru Git - uboot.git/commitdiff
sandbox: fix building with CONFIG_SPL_TIMER=y
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 22 Feb 2023 00:39:18 +0000 (01:39 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 1 Mar 2023 18:22:40 +0000 (11:22 -0700)
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@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/timer/sandbox_timer.c

index c846bfb9f122abd79595d77bbfb8246ba10bc5aa..1da7e0c3a76865a1b374748fa442516cd5e14121 100644 (file)
@@ -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)
 U_BOOT_DRVINFO(sandbox_timer_non_fdt) = {
        .name = "sandbox_timer",
 };
+#endif