mtd: spi-nor: Fix Write failure in SST flashes
commit 59bcb1bdd8bc372328a10a2903a22d1686a30700 from https://github.com/Xilinx/linux-xlnx.git xlnx_rebase_v6.1 SST flashes need to be unlocked during initialization before performing any operation on it but the commands for unlocking are different for SST26 & SST25 series of flashes. SST26 series flashes doesn't support sst write operations but it supports Global Block Unlock command(0x98), disable SST_WRITE & enable SPI_NOR_HAS_LOCK & SST_GLOBAL_PROT_UNLK flags respectively in the flashinfo structure for SST26 series flashes. SST25 series flashes doesn't support Serial Flash Discoverable Parameters(SFDP), enable SPI_NOR_SKIP_SFDP flag in the flashinfo structure for SST25 series flashes. Update spi_nor_init() to unlock all SST clearing the status register. Signed-off-by:Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com> Reviewed-by:
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> State: pending Signed-off-by:
Quanyang Wang <quanyang.wang@windriver.com>
Loading
Please register or sign in to comment