]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commita55847fe5476251ca212c0e0da5639bca93e6cf0
tree10690a31f769273d1e69340e74079d720cecd110
parentd8822af231b7cfc4df2b8b08dde1d351588ebb61
mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus

BugLink: https://bugs.launchpad.net/bugs/1862227
commit 4114b17af41272e14939b000ce8f3ed7ba937e3c upstream.

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: 2cd457f328c1 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mtd/nand/raw/stm32_fmc2_nand.c