MLK-20004 spi: lpspi: Improve the stability of lpspi data transmission
authorXiaoning Wang <xiaoning.wang@nxp.com>
Mon, 22 Oct 2018 04:42:57 +0000 (12:42 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitea404344c42391b4a5f465504a927ddb79bb6a7d
tree292795344c2153c4321615f946a2885e187889d1
parent81ecfc64cf3a421cd6d1cc5e26f59c1748fb454a
MLK-20004 spi: lpspi: Improve the stability of lpspi data transmission

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

Resolved an issue that could cause a transmission timeout when
transferring large amounts of data.

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

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/spi/spi-fsl-lpspi.c