spi: stm32: fix fifo threshold level in case of short transfer
authorAmelie Delaunay <amelie.delaunay@st.com>
Mon, 10 Aug 2020 07:12:35 +0000 (09:12 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 10 Aug 2020 18:46:42 +0000 (19:46 +0100)
commit3373e9004acc0603242622b4378c64bc01d21b5f
tree0840a97cb9d9d7944eee55246c836b40a98243b5
parent135dd873d3c76d812ae64c668adef3f2c59ed27f
spi: stm32: fix fifo threshold level in case of short transfer

When transfer is shorter than half of the fifo, set the data packet size
up to transfer size instead of up to half of the fifo.
Check also that threshold is set at least to 1 data frame.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Alain Volmat <alain.volmat@st.com>
Link: https://lore.kernel.org/r/1597043558-29668-3-git-send-email-alain.volmat@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c