diff mbox series

[v2,1/7] common: spl: move armv7m-specific code to spl_perform_fixups()

Message ID 20220101171332.2676936-1-ovidiu.panait@windriver.com
State Accepted
Commit 027b0e9c165d33da1bd7458363a3d57fdadee662
Delegated to: Tom Rini
Headers show
Series [v2,1/7] common: spl: move armv7m-specific code to spl_perform_fixups() | expand

Commit Message

Ovidiu Panait Jan. 1, 2022, 5:13 p.m. UTC
Factor out armv7m fragment to spl_perform_fixups(), which is an arch/board
specific function designed for this purpose.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---

(no changes since v1)

 arch/arm/cpu/armv7m/cpu.c | 6 ++++++
 common/spl/spl.c          | 3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Tom Rini Jan. 18, 2022, 5:39 p.m. UTC | #1
On Sat, Jan 01, 2022 at 07:13:25PM +0200, Ovidiu Panait wrote:

> Factor out armv7m fragment to spl_perform_fixups(), which is an arch/board
> specific function designed for this purpose.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c
index 63721018c1..65427b5312 100644
--- a/arch/arm/cpu/armv7m/cpu.c
+++ b/arch/arm/cpu/armv7m/cpu.c
@@ -12,6 +12,7 @@ 
 #include <irq_func.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
+#include <spl.h>
 
 /*
  * This is called right before passing control to
@@ -56,3 +57,8 @@  void reset_cpu(void)
 		| (V7M_SCB->aircr & V7M_AIRCR_PRIGROUP_MSK)
 		| V7M_AIRCR_SYSRESET, &V7M_SCB->aircr);
 }
+
+void spl_perform_fixups(struct spl_image_info *spl_image)
+{
+	spl_image->entry_point |= 0x1;
+}
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4c101ec5d3..dab0f5fe38 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -770,9 +770,6 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 			       ret);
 	}
 
-#ifdef CONFIG_CPU_V7M
-	spl_image.entry_point |= 0x1;
-#endif
 	switch (spl_image.os) {
 	case IH_OS_U_BOOT:
 		debug("Jumping to %s...\n", spl_phase_name(spl_next_phase()));