Skip to content

Commit 027b0e9

Browse files
opanait-wrtrini
authored andcommitted
common: spl: move armv7m-specific code to spl_perform_fixups()
Factor out armv7m fragment to spl_perform_fixups(), which is an arch/board specific function designed for this purpose. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Ovidiu Panait <[email protected]>
1 parent ea9733a commit 027b0e9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

arch/arm/cpu/armv7m/cpu.c

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <irq_func.h>
1313
#include <asm/io.h>
1414
#include <asm/armv7m.h>
15+
#include <spl.h>
1516

1617
/*
1718
* This is called right before passing control to
@@ -56,3 +57,8 @@ void reset_cpu(void)
5657
| (V7M_SCB->aircr & V7M_AIRCR_PRIGROUP_MSK)
5758
| V7M_AIRCR_SYSRESET, &V7M_SCB->aircr);
5859
}
60+
61+
void spl_perform_fixups(struct spl_image_info *spl_image)
62+
{
63+
spl_image->entry_point |= 0x1;
64+
}

common/spl/spl.c

-3
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
770770
ret);
771771
}
772772

773-
#ifdef CONFIG_CPU_V7M
774-
spl_image.entry_point |= 0x1;
775-
#endif
776773
switch (spl_image.os) {
777774
case IH_OS_U_BOOT:
778775
debug("Jumping to %s...\n", spl_phase_name(spl_next_phase()));

0 commit comments

Comments
 (0)