riscv-openocd/src/target
Andreas Färber eaacb900dd flash/nor: Add erased_value to drivers and pass it to targets
struct flash_driver has a default_padded_value field that is similar,
but it can be changed by the user for the specific purpose of padding.

Add a new erased_value field and initialize it for all targets,
particularly stm32lx, xmc4xxx and virtual.

Use this value in core.c:default_flash_mem_blank_check(), the slow path.

Extend the target API to pass erased_value down to target code.
Adding an argument ensures that we catch all callers.

This allows us to merge xmc4xxx.c:xmc4xxx_blank_check_memory() into
armv7m:armv7m_blank_check_memory().

It further allows us to use default_flash_blank_check() in place of
xmc4xxx.c:xmc4xxx_flash_blank_check(), adding a potential slow path
fallback, as well as stm32lx:stm32lx_erase_check(), adding the potential
armv7m fast path with fallback to default_flash_mem_blank_check().

Fix a mips32 code comment while at it (zeroed -> erased).

The armv4_5 and mips32 target implementations will now error out if an
erase value other than 0xff is used, causing default_flash_blank_check()
to fall back to the default_flank_mem_blank_check() slow path.

Change-Id: I39323fbbc4b71c256cd567e439896d0245d4745f
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3497
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-10-30 20:30:48 +00:00
..
openrisc Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
xscale Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
Makefile.am Support for Freescale LS102x SAP 2016-06-23 07:37:36 +01:00
adi_v5_jtag.c adi_v5_jtag: clear sticky overrun condition in WAIT timeout 2016-08-09 14:36:13 +01:00
adi_v5_swd.c swd: Add support for connect_assert_srst for SWD. 2016-07-04 23:44:02 +01:00
algorithm.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
algorithm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm.h flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
arm7_9_common.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm7_9_common.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm7tdmi.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm7tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm9tdmi.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm9tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11.c Fix resume when core state has been modified 2016-08-09 14:28:43 +01:00
arm11.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11_dbgtap.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm11_dbgtap.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm720t.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm720t.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm920t.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm920t.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm926ejs.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm926ejs.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm946e.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm946e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm966e.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm966e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_adi_v5.c arm_adi_v5: add dap apreg command for AP register read/write 2016-07-17 23:30:09 +01:00
arm_adi_v5.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_disassembler.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_disassembler.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_dpm.c Fix resume when core state has been modified 2016-08-09 14:28:43 +01:00
arm_dpm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_jtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_opcodes.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_semihosting.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_semihosting.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_simulator.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_simulator.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5.c flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
armv4_5.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5_cache.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv4_5_cache.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5_mmu.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv4_5_mmu.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv7a.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a_cache.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv7a_cache.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a_cache_l2x.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv7a_cache_l2x.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7m.c flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
armv7m.h flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
armv7m_trace.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv7m_trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_ap7k.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_ap7k.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_jtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_mem.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_mem.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_regs.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_regs.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avrt.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avrt.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
breakpoints.c breakpoints: Add missing space in error message 2016-10-17 09:21:14 +01:00
breakpoints.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
cortex_a.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
cortex_a.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
cortex_m.c cortex_m: fix autoincrement range of Cortex-M7 2016-10-04 16:17:30 +01:00
cortex_m.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp563xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
dsp563xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp563xx_once.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
dsp563xx_once.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp5680xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
dsp5680xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
embeddedice.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
embeddedice.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etb.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etb.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm_dummy.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etm_dummy.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
fa526.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
feroceon.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
hla_target.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
image.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
image.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
lakemont.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
lakemont.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
ls1_sap.c Support for Freescale LS102x SAP 2016-06-23 07:37:36 +01:00
mips32.c flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
mips32.h flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
mips32_dmaacc.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
mips32_dmaacc.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
mips32_pracc.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
mips32_pracc.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
mips_ejtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
mips_ejtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
mips_m4k.c mips: Added #define for scan_delay legacy mode default value 2016-10-04 11:41:34 +01:00
mips_m4k.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_aice.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_aice.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_cmd.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_cmd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_disassembler.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_disassembler.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_edm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_insn.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_reg.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_reg.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_tlb.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_tlb.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v2.c nds32: Fix typo in debug log 2016-10-04 11:49:59 +01:00
nds32_v2.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3.c nds32: Fix typo in debug log 2016-10-04 11:49:59 +01:00
nds32_v3.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3_common.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_v3_common.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3m.c nds32: Fix typo in debug log 2016-10-04 11:49:59 +01:00
nds32_v3m.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
oocd_trace.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
oocd_trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
quark_d20xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
quark_x10xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
register.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
register.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
smp.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
smp.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
startup.tcl tcl: introduce using_(jtag|swd|hla) helpers and use them in reset handler 2014-06-28 09:28:12 +00:00
target.c flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
target.h flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
target_request.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
target_request.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
target_type.h flash/nor: Add erased_value to drivers and pass it to targets 2016-10-30 20:30:48 +00:00
testee.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
trace.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
x86_32_common.c x86_32_common: Fix typo in function name 2016-10-04 11:49:52 +01:00
x86_32_common.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
xscale.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
xscale.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00