common: spl: move armv7m-specific code to spl_perform_fixups()
authorOvidiu Panait <ovidiu.panait@windriver.com>
Sat, 1 Jan 2022 17:13:25 +0000 (19:13 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jan 2022 13:31:02 +0000 (08:31 -0500)
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>
arch/arm/cpu/armv7m/cpu.c
common/spl/spl.c

index 6372101..65427b5 100644 (file)
@@ -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;
+}
index f51d1f3..c5360f3 100644 (file)
@@ -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()));