Message ID | 20200603145929.364923-6-heiko@sntech.de |
---|---|
State | New |
Headers | show |
Series | revive Theobroma-Systems puma board | expand |
> On 03.06.2020, at 16:59, Heiko Stuebner <heiko at sntech.de> wrote: > > 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> Reviewed-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
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