From patchwork Wed Jun 3 14:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 241614 List-Id: U-Boot discussion From: heiko at sntech.de (Heiko Stuebner) Date: Wed, 3 Jun 2020 16:59:28 +0200 Subject: [PATCH 5/6] board: puma: allow building with TPL as well In-Reply-To: <20200603145929.364923-1-heiko@sntech.de> References: <20200603145929.364923-1-heiko@sntech.de> Message-ID: <20200603145929.364923-6-heiko@sntech.de> From: Heiko Stuebner 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 Reviewed-by: Philipp Tomsich --- 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