#define USE_FSR 0x80 /* use flag status register */
#define SPI_NOR_FLASH_LOCK 0x100 /* Flash protection support */
#define SPI_NOR_QUAD_IO_READ 0x200 /* Flash supports Quad IO read */
+/* Unlock the Global protection for sst flashes */
+#define SST_GLOBAL_PROT_UNLK 0x400
};
#define JEDEC_MFR(info) ((info)->id[0])
JEDEC_MFR(info) == CFI_MFR_SST) {
write_enable(nor);
write_sr(nor, 0);
+
+ if (info->flags & SST_GLOBAL_PROT_UNLK) {
+ write_enable(nor);
+ /* Unlock global write protection bits */
+ nor->write_reg(nor, GLOBAL_BLKPROT_UNLK, NULL, 0, 0);
+ }
}
if (!mtd->name)
#define SPINOR_OP_BP 0x02 /* Byte program */
#define SPINOR_OP_WRDI 0x04 /* Write disable */
#define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */
+#define GLOBAL_BLKPROT_UNLK 0x98 /* Clear global write protection bits */
/* Used for Macronix and Winbond flashes. */
#define SPINOR_OP_EN4B 0xb7 /* Enter 4-byte mode */