flash: add padded_value cmd

This adds support for setting the default value used when padding image
sections. Previously 0xff was used but some targets have an erased value
of 0x00.

Change-Id: If3df6fea3abf95b09daa3ff7be362acf991070ce
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1635
Tested-by: jenkins
This commit is contained in:
Spencer Oliver
2013-09-19 12:07:06 +01:00
parent 53ca124a75
commit 1f3ca0b5b8
5 changed files with 38 additions and 2 deletions
+4
View File
@@ -87,6 +87,10 @@ struct flash_bank {
int chip_width; /**< Width of the chip in bytes (1,2,4 bytes) */
int bus_width; /**< Maximum bus width, in bytes (1,2,4 bytes) */
/** Default padded value used, normally this matches the flash
* erased value. Defaults to 0xFF. */
uint8_t default_padded_value;
/**
* The number of sectors on this chip. This value will
* be set intially to 0, and the flash driver must set this to