All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] arm: xea: Modify board code to generate single binary u-boot
@ 2021-12-22 12:49 Lukasz Majewski
  2021-12-22 12:49 ` [PATCH v1 2/3] arm: xea: config: Provide special defconfig for a " Lukasz Majewski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lukasz Majewski @ 2021-12-22 12:49 UTC (permalink / raw)
  To: u-boot, Stefano Babic, Tom Rini; +Cc: Lukasz Majewski

This change provides the possibility to build XEA (imx287 based) board
U-Boot as a single binary (without support for CONFIG_SPL_FRAMEWORK).

The generated u-boot.sb can be used in the factory environment to for
example perform initial setup or HW testing.

It can be used with 'uuu' utility
(SDPS: boot -f /srv/tftp/xea/u-boot.sb)

The board_init_ll() is used in arch/arm/cpu/arm926ejs/mxs/start.S, which
is utilized when CONFIG_SPL_FRAMEWORK is disabled.

However, when it is enabled the arch/arm/cpu/arm926ejs/start.S is used,
which requires the lowlevel_init() function.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 board/liebherr/xea/spl_xea.c | 8 ++++++++
 board/liebherr/xea/xea.c     | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/board/liebherr/xea/spl_xea.c b/board/liebherr/xea/spl_xea.c
index 192f68fca5f..5ee561b8b78 100644
--- a/board/liebherr/xea/spl_xea.c
+++ b/board/liebherr/xea/spl_xea.c
@@ -290,6 +290,13 @@ u32 mxs_dram_vals[] = {
 	0x00000000, 0xffffffff
 };
 
+/* #ifndef CONFIG_SPL_FRAMEWORK */
+#if !CONFIG_IS_ENABLED(FRAMEWORK)
+void board_init_ll(const u32 arg, const uint32_t *resptr)
+{
+	mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup));
+}
+#else
 void lowlevel_init(void)
 {
 	struct mxs_pinctrl_regs *pinctrl_regs =
@@ -301,3 +308,4 @@ void lowlevel_init(void)
 
 	mxs_common_spl_init(0, NULL, iomux_setup, ARRAY_SIZE(iomux_setup));
 }
+#endif
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index cd11b0ada77..685e2e26a18 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -58,7 +58,8 @@ static void init_clocks(void)
 	mxs_set_sspclk(MXC_SSPCLK3, 96000, 0);
 }
 
-#ifdef CONFIG_SPL_BUILD
+/* #if CONFIG_SPL_BUILD && CONFIG_SPL_FRAMEWORK */
+#if CONFIG_IS_ENABLED(BUILD) && CONFIG_IS_ENABLED(FRAMEWORK)
 void board_init_f(ulong arg)
 {
 	init_clocks();
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-23 12:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 12:49 [PATCH v1 1/3] arm: xea: Modify board code to generate single binary u-boot Lukasz Majewski
2021-12-22 12:49 ` [PATCH v1 2/3] arm: xea: config: Provide special defconfig for a " Lukasz Majewski
2021-12-22 12:49 ` [PATCH v1 3/3] arm: dts: Enable support for USB on XEA (imx28) board Lukasz Majewski
2021-12-22 16:46 ` [PATCH v1 1/3] arm: xea: Modify board code to generate single binary u-boot Tom Rini
2021-12-23  8:42   ` Lukasz Majewski
2021-12-23 12:53     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.