board: puma: allow building with TPL as well

A patch from »revive Theobroma-Systems puma board« in state Mainline for u-boot

From: Heiko Stuebner <heiko.stuebner@...> Date: Thu, 28 May 2020 16:19:22 +0200

Commit-Message

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

Patch-Comment

board/theobroma-systems/puma_rk3399/puma-rk3399.c | 4 ++++ 1 file changed, 4 insertions(+)

Statistics

  • 4 lines added
  • 0 lines removed

Changes

-------------- board/theobroma-systems/puma_rk3399/puma-rk3399.c ---------------
index 65bb2ad6f2..31ac27c6f5 100644
@@ -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
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...