Skip to content
Commit 6701401b authored by Amit Kumar Mahapatra's avatar Amit Kumar Mahapatra Committed by Quanyang Wang
Browse files

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: default avatarAmit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Reviewed-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
State: pending
Signed-off-by: default avatarQuanyang Wang <quanyang.wang@windriver.com>
parent 06d533ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment