]> git.sur5r.net Git - openocd/commit
flash: Add support for Atheros (ath79) SPI interface
authorTobias Diedrich <ranma+coreboot@tdiedrich.de>
Mon, 1 Aug 2016 13:57:20 +0000 (15:57 +0200)
committerPaul Fertser <fercerpav@gmail.com>
Wed, 31 May 2017 07:18:29 +0000 (08:18 +0100)
commit6b9d19d3675a82ccc501fd7cba036c5b04d04590
treef245477ad7f5c46478fc864ea8680782cc181fe9
parent83c67b7ac7635260d09d9fe15a50a34440c0c4bb
flash: Add support for Atheros (ath79) SPI interface

Supported SoCs: AR71xx, AR724x, AR91xx, AR93xx, QCA9558

Extended and revised version of my original patch submitted by Dmytro
here: http://openocd.zylin.com/#/c/3390

This driver is using pure SPI mode, so the flash base address is not
used except some flash commands (e.g. "flash program") need it to
distinguish the banks.

Example config with all 3 chip selects:
flash bank flash0 ath79 0 0 0 0 $_TARGETNAME cs0
flash bank flash1 ath79 0x10000000 0 0 0 $_TARGETNAME cs1
flash bank flash2 ath79 0x20000000 0 0 0 $_TARGETNAME cs2

Example usage:
> flash probe flash0
Found flash device 'win w25q128fv' (ID 0x001840ef)
flash 'ath79' found at 0x00000000
> flash probe flash1
No SPI flash found
> flash probe flash2
No SPI flash found
> flash banks
> flash read_bank flash0 /tmp/test.bin 0x00000000 0x1000
reading 4096 bytes from flash @0x00000000
wrote 4096 bytes to file /tmp/test.bin from flash bank 0 at offset
0x00000000 in 28.688066s (0.139 KiB/s)

Change-Id: I5feb697722c07e83a9c1b361a9db7b06bc699aa8
Signed-off-by: Tobias Diedrich <ranma+openocd@tdiedrich.de>
Reviewed-on: http://openocd.zylin.com/3612
Tested-by: jenkins
Reviewed-by: Dmytro <dioptimizer@hotmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
README
doc/openocd.texi
src/flash/nor/Makefile.am
src/flash/nor/ath79.c [new file with mode: 0644]
src/flash/nor/drivers.c
src/target/mips32_pracc.h