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>
1 parent 4bcae6e commit a1e0b63ac1bddb330c74cde950a0ed5a47cbd954
@Oleksij Rempel Oleksij Rempel authored on 23 Jan 2019
Sascha Hauer committed on 24 Jan 2019
Showing 8 changed files
View
arch/mips/include/asm/asm.h
View
arch/mips/lib/Makefile
View
arch/mips/lib/end.S 0 → 100644
View
arch/mips/mach-ath79/Makefile
View
arch/mips/mach-ath79/include/mach/pbl_macros.h
View
arch/mips/mach-ath79/lowlevel_ar9331_spi_trap.S 0 → 100644
View
arch/mips/mach-ath79/lowlevel_ar9331_sram.S 0 → 100644
View
images/Makefile.ath79