diff mbox series

[U-Boot,v6,09/13] drivers: board: Make the board drivers available in SPL

Message ID 20191022143922.10205-10-jjhiblot@ti.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Add support for applications of overlays in SPL | expand

Commit Message

Jean-Jacques Hiblot Oct. 22, 2019, 2:39 p.m. UTC
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>

---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- depend on SPL_DM
- update the commit log

 drivers/Makefile       | 2 +-
 drivers/board/Kconfig  | 3 +++
 drivers/board/Makefile | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

Comments

Tom Rini Jan. 8, 2020, 8:11 p.m. UTC | #1
On Tue, Oct 22, 2019 at 04:39:18PM +0200, Jean-Jacques Hiblot wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/Makefile b/drivers/Makefile
index a4bb5e4975..6dd43d4949 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -26,6 +26,7 @@  obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/
 obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/
 obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/
 obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/
+obj-$(CONFIG_$(SPL_)BOARD) += board/
 
 ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_BUILD
@@ -77,7 +78,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/
diff --git a/drivers/board/Kconfig b/drivers/board/Kconfig
index 2a3fc9c049..254f657049 100644
--- a/drivers/board/Kconfig
+++ b/drivers/board/Kconfig
@@ -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"
diff --git a/drivers/board/Makefile b/drivers/board/Makefile
index c8dab4fa0b..cc16361755 100644
--- a/drivers/board/Makefile
+++ b/drivers/board/Makefile
@@ -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