[PATCH 5/6] board: puma: allow building with TPL as well

Heiko Stuebner heiko at sntech.de
Wed Jun 3 16:59:28 CEST 2020


From: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>

Right now puma-u-boot can fit everything into SPL but that may overflow
easily for example with more extensive debug options.

By adding CONFIG_TPL and removing the CONFIG_SPL_TEXT_BASE it is easy
to enable a TPL build as well. Only obstacle is the usb-specific handling
for the puma regulator, so make this conditional on actual usb options
being enabled in SPL and U-Boot proper.

Signed-off-by: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
---
 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 65bb2ad6f2..31ac27c6f5 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -153,6 +153,9 @@ void get_board_serial(struct tag_serialnr *serialnr)
 }
 #endif
 
+#if !defined(CONFIG_TPL_BUILD) && \
+    (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USB_HOST_SUPPORT)) || \
+    (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB))
 /**
  * Switch power at an external regulator (for our root hub).
  *
@@ -219,3 +222,4 @@ void usb_hub_reset_devices(struct usb_hub_device *hub, int port)
 	 */
 	board_usb_port_power_set(ctrl, port, true);
 }
+#endif
-- 
2.25.1



More information about the U-Boot mailing list