From patchwork Mon Jun 8 18:31:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 241923 List-Id: U-Boot discussion From: jagan at amarulasolutions.com (Jagan Teki) Date: Mon, 8 Jun 2020 14:31:40 -0400 Subject: [PATCH v3 1/5] rk3399: spl: Add rk_spl_board_init as __weak In-Reply-To: <20200608183144.26809-1-jagan@amarulasolutions.com> References: <20200608183144.26809-1-jagan@amarulasolutions.com> Message-ID: <20200608183144.26809-2-jagan@amarulasolutions.com> Current spl_board_init is mostly specific to puma-rk3399 target and in other words it cannot be required or useful for other rk3399 boards. Some boards require their custom initialization to be part of spl_board_init like roc-rk3399-pc require leds setup, environments. So, this patch handles all these possible scenarios. Add rk_spl_board_init as __weak so that boards that require their own custom initialization can be defined on their board file. Signed-off-by: Jagan Teki Tested-by: Suniel Mahesh --- Changes for v3: - new patch arch/arm/mach-rockchip/rk3399/rk3399.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index 4fda93b152..681f80f339 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -241,7 +241,7 @@ static void rk3399_force_power_on_reset(void) } #endif -void spl_board_init(void) +__weak void rk_spl_board_init(void) { #if defined(SPL_GPIO_SUPPORT) struct rockchip_cru *cru = rockchip_get_cru(); @@ -274,4 +274,11 @@ void spl_board_init(void) debug("%s: Cannot enable boot on regulator\n", __func__); #endif } + +void spl_board_init(void) +{ + /* board specific spl init */ + rk_spl_board_init(); +} + #endif