]> git.baikalelectronics.ru Git - uboot.git/commit
DW SPI: fix tx data loss on FIFO flush
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Thu, 22 Mar 2018 10:50:43 +0000 (13:50 +0300)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 22 Mar 2018 17:31:35 +0000 (23:01 +0530)
commitc80f68a6286f14215388831c8585561738d82679
treeb4b0c7dc260387c4b5f7dcf4fea03109c61b071e
parentbd9479dff105f019685da9c59b7d0dbf868f5c62
DW SPI: fix tx data loss on FIFO flush

In current implementation if some data still exists in Tx FIFO it
can be silently flushed, i.e. dropped on disabling of the controller,
which happens when writing 0 to DW_SPI_SSIENR (it happens in the
beginning of new transfer)

So add wait for current transmit operation to complete to be sure
that current transmit operation is finished before new one.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/spi/designware_spi.c