u-boot-brain/arch/arm/mach-at91/arm926ejs
Martin Townsend bbfb81c187 ARM: mach-at91: arm926ejs: fix data abort in startup returning from lowlevel_init
The startup code in arm/cpu/arm926ejs preserves the link register across
the call to lowlevel_init by using r4:

mov	r4, lr		/* perserve link reg across call */
bl	lowlevel_init	/* go setup pll,mux,memory */
mov	lr, r4		/* restore link */

The lowlevel_init function for at91 machines based on the same CPU uses r4
and hence corrupts it causing a data abort when it returns to the startup
code. This patch fixes this by using r6 instead of r4 in the lowlevel_init
function.

Discovered and the fix was tested on a AT91SAM9261 based board.

Signed-off-by: Martin Townsend <martin@rufilla.com>
Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
2021-03-22 10:53:52 +02:00
..
at91sam9m10g45_devices.c dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() 2021-01-05 12:26:35 -07:00
at91sam9n12_devices.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91sam9rl_devices.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91sam9x5_devices.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91sam9260_devices.c dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() 2021-01-05 12:26:35 -07:00
at91sam9261_devices.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
at91sam9263_devices.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
clock.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
cpu.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
eflash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
led.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lowlevel_init.S ARM: mach-at91: arm926ejs: fix data abort in startup returning from lowlevel_init 2021-03-22 10:53:52 +02:00
Makefile ARM: at91: Add sam9x60 soc 2019-10-08 09:16:11 +03:00
reset.c common: Move reset_cpu() to the CPU header 2020-01-17 14:02:31 -05:00
sam9x60_devices.c ARM: at91: Add chip ID for SAM9X60 SiP 2020-10-19 09:19:53 +03:00
timer.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
u-boot-spl.lds spl: fix linker size check off-by-one errors 2019-05-05 08:48:50 -04:00