diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2019-01-23 08:24:03 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-24 08:33:04 +0100 |
commit | a1e0b63ac1bddb330c74cde950a0ed5a47cbd954 (patch) | |
tree | 4ecf209fc904010fecbdc5c67beec3f3fc4e772a /arch/mips/lib/end.S | |
parent | 4bcae6eff38a35f2b0eea58b513bc544c555c464 (diff) | |
download | barebox-a1e0b63ac1bddb330c74cde950a0ed5a47cbd954.tar.gz barebox-a1e0b63ac1bddb330c74cde950a0ed5a47cbd954.tar.xz |
MIPS: ath79: add spi and sram bootstrap helpers
At least some ath79 SoC have build in 32K RAM. It allow us to use
lowlevel portion of barebox to bootstrap the system by using JTAG
debugger (For example OpenOCD).
Since ath79 has no reliable way to stop the CPU execution before
reading SPI Flash, this can cause different issues. To avoid it, we
need to flash a execution trap with software debug breakpoint to the
flash.
The workflow should be as follow:
- After power on or reset the CPU will start execution of SPI flash.
As soon as software debug breakpoint is executed, CPU will halt and
notify OpenOCD about breakpoint event.
- OpenOCD will load reduced barebox to SRAM and execute it.
This part will do all needed low level initialization - PLL, RAM and
trigger second breakpoint event.
- OpenOCD will load full barebox version to the main RAM and start
execution.
It can be used for bring-up, so no regular flashing is needed.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/lib/end.S')
-rw-r--r-- | arch/mips/lib/end.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/lib/end.S b/arch/mips/lib/end.S new file mode 100644 index 0000000000..78bd15ec17 --- /dev/null +++ b/arch/mips/lib/end.S @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2018 Oleksij Rempel <linux@rempel-privat.de> + */ + +#include <asm/asm.h> +#include <asm/regdef.h> + + .text + .set noreorder +LEAF(mips_dead_end) +__error: + b __error; + nop; + + END(mips_dead_end) |