]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: Disable the flash quad mode in spi_nor_restore()
authorYicong Yang <yangyicong@hisilicon.com>
Mon, 6 Jul 2020 09:22:36 +0000 (17:22 +0800)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 13 Jul 2020 09:09:52 +0000 (12:09 +0300)
commit3517bfdf9153b5531d2d9f3432033d37dada2c87
treefd3cd1bd329abe7802c348e42af6829e9ae046ff
parentf16ff8f509890501d5ae87c1759a3eebe3e566bd
mtd: spi-nor: Disable the flash quad mode in spi_nor_restore()

If the flash's quad mode is enabled, it'll remain in the quad mode when
it's removed. If we drive the flash next time in Standard/Dual SPI mode,
the QE bit is not cleared and the function of flash's WP# and RESET#/HOLD#
have been switched to IO2 and IO3 and are not restored.

Disable the Quad mode in spi_nor_restore(), then the flash's QE bit will
be cleared when removed. This will make sure the flash always enter the
Standard/Dual SPI mode when loaded.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/1594027356-19088-3-git-send-email-yangyicong@hisilicon.com
drivers/mtd/spi-nor/core.c