flash: constify driver data structures

Change-Id: Ia5c3de48119f036e1d7a41be62a672a6fb37e59b
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/2293
Tested-by: jenkins
This commit is contained in:
Spencer Oliver
2014-09-11 22:08:34 +01:00
parent 03410e92da
commit 36bc83b174
3 changed files with 7 additions and 6 deletions

View File

@@ -33,7 +33,7 @@
#define ERASE_REGION(num, size) (((size/256) << 16) | (num-1))
/* non-CFI compatible flashes */
static struct non_cfi non_cfi_flashes[] = {
static const struct non_cfi non_cfi_flashes[] = {
{
.mfr = CFI_MFR_SST,
.id = 0xd4,
@@ -472,7 +472,7 @@ void cfi_fixup_non_cfi(struct flash_bank *bank)
{
unsigned int mask;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
struct non_cfi *non_cfi = non_cfi_flashes;
const struct non_cfi *non_cfi = non_cfi_flashes;
if (cfi_info->x16_as_x8)
mask = 0xFF;