summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor/intel-spi.c
diff options
context:
space:
mode:
authorNeilBrown2018-04-21 00:54:40 +0200
committerBoris Brezillon2018-04-21 10:05:23 +0200
commitf134fbbb4ff813dd227c9ce40b5c0b2078a77b07 (patch)
tree610eab8a466e1c8a507d39505c982111f5181772 /drivers/mtd/spi-nor/intel-spi.c
parentmtd: spi-nor: Add support for XM25QH64A and XM25QH128A (diff)
downloadkernel-qcow2-linux-f134fbbb4ff813dd227c9ce40b5c0b2078a77b07.tar.gz
kernel-qcow2-linux-f134fbbb4ff813dd227c9ce40b5c0b2078a77b07.tar.xz
kernel-qcow2-linux-f134fbbb4ff813dd227c9ce40b5c0b2078a77b07.zip
mtd: spi-nor: clear Winbond Extended Address Reg on switch to 3-byte addressing.
Winbond spi-nor flash 32MB and larger have an 'Extended Address Register' as one option for addressing beyond 16MB (Macronix has the same concept, Spansion has EXTADD bits in the Bank Address Register). According to section 8.2.7 Write Extended Address Register (C5h) of the Winbond W25Q256FV data sheet (256M-BIT SPI flash) The Extended Address Register is only effective when the device is in the 3-Byte Address Mode. When the device operates in the 4-Byte Address Mode (ADS=1), any command with address input of A31-A24 will replace the Extended Address Register values. It is recommended to check and update the Extended Address Register if necessary when the device is switched from 4-Byte to 3-Byte Address Mode. So the documentation suggests clearing the EAR after switching to 3-byte mode. Experimentation shows that the EAR is *always* one after the switch to 3-byte mode, so clearing the EAR is mandatory at shutdown for a subsequent 3-byte-addressed reboot to work. Note that some SOCs (e.g. MT7621) do not assert a reset line at normal reboot, so we cannot rely on hardware reset. The MT7621 does assert a reset line at watchdog-reset. Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/spi-nor/intel-spi.c')
0 files changed, 0 insertions, 0 deletions