mtd: spi-nor: stm32-quadspi: fix prefetching outside fsize
authorLudovic Barre <ludovic.barre@st.com>
Thu, 26 Oct 2017 15:12:34 +0000 (17:12 +0200)
committerCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Sun, 29 Oct 2017 17:54:22 +0000 (18:54 +0100)
commit10cd4b7b7432d529d7f8b73979a846e33a573a9e
tree4827aa1a6ffef13bcf6ba4f146f9c4831eab03dc
parente812963b918656d875beb47c277fd0e29bd826af
mtd: spi-nor: stm32-quadspi: fix prefetching outside fsize

When memory-mapped mode is used, a prefetching mechanism fully
managed by the hardware allows to optimize the read from external
the QSPI memory. A 32-bytes FIFO is used for prefetching.
When the limit of flash size - fifo size is reached the prefetching
mechanism tries to read outside the fsize.
The stm32 quadspi hardware become busy and should be aborted.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Reported-by: Bruno Herrera <bruherrera@gmail.com>
Tested-by: Bruno Herrera <bruherrera@gmail.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/stm32-quadspi.c