at91samd: Atmel SAML22 (segment LCD) family added
[fw/openocd] / src / flash / nor / non_cfi.c
index 9735bdbe930318724b74a78858a9999af3ba9036..7636a3670e0519f85de025cbb6dfa7b36b3fa766 100644 (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;
@@ -540,7 +540,6 @@ void cfi_fixup_non_cfi(struct flash_bank *bank)
 
                pri_ext->SiliconRevision = 0x0;
                pri_ext->EraseSuspend = 0x0;
-               pri_ext->EraseSuspend = 0x0;
                pri_ext->BlkProt = 0x0;
                pri_ext->TmpBlkUnprotect = 0x0;
                pri_ext->BlkProtUnprot = 0x0;