SST flashes has multi size erase blocks like 8K, 32K and 64K bytes. We
cannot perform a 64KB sector erase on all the blocks, So use 4k sector
erase command to perform an erase operation.
We could enable SPI_FLASH_USE_4K_SECTORS config to use 4K sector erase.
But it will impact erase operation time on all large memory flashes.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
nor->erase_opcode = SPINOR_OP_SE;
mtd->erasesize = info->sector_size << nor->shift;
}
+
+ if ((JEDEC_MFR(info) == SNOR_MFR_SST) && info->flags & SECT_4K) {
+ nor->erase_opcode = SPINOR_OP_BE_4K;
+ mtd->erasesize = 4096 << nor->shift;
+ }
+
return 0;
}