]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mtd: spinand: add SPI-NAND MTD resume handler
authorPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 2 Jun 2021 09:49:13 +0000 (11:49 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 18 Jun 2021 07:45:21 +0000 (09:45 +0200)
commitf145b9dcf998427f1e3f96f61b6ca9afd629dfda
tree8db2015972151cdb87620075736ad30af9f9b973
parent41e005c23ee7689ae36b49bde4fec08e89ed121d
mtd: spinand: add SPI-NAND MTD resume handler

After power up, all SPI NAND's blocks are locked. Only read operations
are allowed, write and erase operations are forbidden.
The SPI NAND framework unlocks all the blocks during its initialization.

During a standby low power, the memory is powered down, losing its
configuration.
During the resume, the QSPI driver state is restored but the SPI NAND
framework does not reconfigured the memory.

This patch adds SPI-NAND MTD PM handlers for resume ops.
SPI NAND resume op re-initializes SPI NAND flash to its probed state.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210602094913.26472-4-patrice.chotard@foss.st.com
drivers/mtd/nand/spi/core.c