ARM: zynq: zed: partially revert zynq_cpu_lowlevel_init() chnages
Subsystems (4)
PATCH 1/1 ARM: zynq: zed: partially revert zynq_cpu_lowlevel_init() chnages
Calling arm_cpu_lowlevel_init() from zynq_cpu_lowlevel_init() adds a stack push/pop to the latter function which doesn't work this early in the boot.
As the BootROM apparently hands proccessor control to us in abort(!?!) mode, setting up a stack requires duplicating most of arm_cpu_lowlevel_init(). To get around this catch-22 move the call to arm_cpu_lowlevel_init back into the board lowlevel start function, so we don't need a stack at all.
--- arch/arm/boards/avnet-zedboard/lowlevel.c | 1 + arch/arm/mach-zynq/cpu_init.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/boards/avnet-zedboard/lowlevel.c +1 -0
@@ -284,6 +284,7 @@ ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)void *fdt = __dtb_zynq_zed_start +get_runtime_offset (); +arm_cpu_lowlevel_init ();zynq_cpu_lowlevel_init ();avnet_zedboard_ps7_init ();
arch/arm/mach-zynq/cpu_init.c +0 -2
@@ -7,8 +7,6 @@void zynq_cpu_lowlevel_init (void ) { -arm_cpu_lowlevel_init (); -enable_arm_errata_761320_war ();enable_arm_errata_794072_war ();enable_arm_errata_845369_war ();
Signature · 7 lines
2.24.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 8 lines · Lucas Stach
Calling
arm_cpu_lowlevel_init()fromzynq_cpu_lowlevel_init()adds a stack push/pop to the latter function which doesn't work this early in the boot.As the BootROM apparently hands proccessor control to us in abort(!?!) mode, setting up a stack requires duplicating most of
arm_cpu_lowlevel_init(). To get around this catch-22 move the call toarm_cpu_lowlevel_initback into the board lowlevel start function, so we don't need a stack at all.
Quoted 5 lines
Signed-off-by Lucas Stach <[email protected]>--- arch/arm/boards/avnet-zedboard/lowlevel.c | 1 + arch/arm/mach-zynq/cpu_init.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox