From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 1/5] rk3399: spl: Add rk_spl_board_init as __weak
Date: Mon, 8 Jun 2020 14:31:40 -0400 [thread overview]
Message-ID: <20200608183144.26809-2-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200608183144.26809-1-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 <jagan@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
---
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
--
2.20.1
next prev parent reply other threads:[~2020-06-08 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 18:31 [PATCH v3 0/5] roc-rk3399-pc: Custom SPL init Jagan Teki
2020-06-08 18:31 ` Jagan Teki [this message]
2020-06-08 18:31 ` [PATCH v3 2/5] rk3399: spl: Print SPL banner after relocation Jagan Teki
2020-06-08 18:31 ` [PATCH v3 3/5] roc-rk3399-pc: Move leds setup in SPL Jagan Teki
2020-06-08 18:31 ` [PATCH v3 4/5] rockchip: Separate the reset cause from display cpuinfo Jagan Teki
2020-06-08 18:31 ` [PATCH v3 5/5] roc-rk3399-pc: Set LED only during POR and pwr_key=y Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200608183144.26809-2-jagan@amarulasolutions.com \
--to=jagan@amarulasolutions.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox