OSDN Git Service

spi: lpspi: Improve the stability of lpspi data transmission
authorClark Wang <xiaoning.wang@nxp.com>
Mon, 7 Jan 2019 07:47:38 +0000 (07:47 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jan 2019 15:17:25 +0000 (15:17 +0000)
commitc23fdef891acc3891b2885f29d9f48193ecc865a
treeeef92e0db42cebfba54b000e35f90d051da87e05
parent3c9bb6a639d0b2a45ef8aac1dd3581522814ad0c
spi: lpspi: Improve the stability of lpspi data transmission

Use SR_TDF to judge if need to send data, and SR_FCF is to judge if
transmission end and to replace the waiting after transmission end.
This waiting has no actual meaning, for module will set the FCF
flag at the real end.

The changes of interrupt flag and ISR function reduce the times of
calling ISR. The use of the FCF flag improves the stability of the
data transmission. These two points generally improve the data
transfer speed of lpspi, especially when it is set to slave mode
it can support higher transfer speed of the host.

After making these changes, there is no need to use
fsl_lpspi_txfifo_empty(), so remove it.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c