drivers: board: Make the board drivers available in SPL
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Tue, 22 Oct 2019 14:39:18 +0000 (16:39 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 7 Jan 2020 16:13:24 +0000 (11:13 -0500)
Make the board driver available in the SPL too. The board driver is a way
to provide useful information about the board and that can be useful in
the SPL too.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/Makefile
drivers/board/Kconfig
drivers/board/Makefile

index cb8c215e76700b873ea331cb2ab47ce1bec48f2f..b51bdeedbe6147b415b77e9e1ff5e9ed61690969 100644 (file)
@@ -26,6 +26,7 @@ obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/
 obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/
 obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/
 obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += power/acpi_pmc/
+obj-$(CONFIG_$(SPL_)BOARD) += board/
 
 ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_BUILD
@@ -75,7 +76,6 @@ obj-y += ata/
 obj-$(CONFIG_DM_DEMO) += demo/
 obj-$(CONFIG_BIOSEMU) += bios_emulator/
 obj-y += block/
-obj-y += board/
 obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/
 obj-y += cache/
 obj-$(CONFIG_CPU) += cpu/
index 2a3fc9c049be06eec89d29e1923fc16404d1cccc..254f657049df00eec9554ff69a7c0bee9634b510 100644 (file)
@@ -8,6 +8,9 @@ menuconfig BOARD
 
 if BOARD
 
+config SPL_BOARD
+       depends on SPL_DM
+       bool "Enable board driver support in SPL"
 
 config BOARD_GAZERBEAM
        bool "Enable board driver for the Gazerbeam board"
index c8dab4fa0bad0d71cbbc59cc173e8ad93206c85f..cc16361755a1704a74ff8175d6dc3ff4f732a6a9 100644 (file)
@@ -2,6 +2,6 @@
 #
 # (C) Copyright 2017
 # Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
-obj-$(CONFIG_BOARD) += board-uclass.o
+obj-y += board-uclass.o
 obj-$(CONFIG_BOARD_GAZERBEAM) += gazerbeam.o
 obj-$(CONFIG_BOARD_SANDBOX) += sandbox.o