]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus
authorChristophe Kerello <christophe.kerello@st.com>
Mon, 16 Dec 2019 09:01:55 +0000 (10:01 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 9 Jan 2020 19:03:41 +0000 (20:03 +0100)
commit731714c59b32ffbb33c1b16edd48df195854d010
tree5c4e41379e26f3ec11043b65342bcf06f775840d
parentcdc2320cbb59dea44aae73acf1819cf7501d06d3
mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus

We are currently using nand_soft_waitrdy to poll the status of the NAND
flash. FMC2 enables the wait feature bit (this feature is mandatory for
the sequencer mode). By enabling this feature, we can't poll the status
of the NAND flash, the read status command is stucked in FMC2 pipeline
until R/B# signal is high, and locks the CPU bus.
To avoid to lock the CPU bus, we poll FMC2 ISR register. This register
reports the status of the R/B# signal.

Fixes: d6be4a72df2e ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/stm32_fmc2_nand.c