Files
u-boot/drivers
Philipp Tomsich 7e0e5c552f rockchip: spi: only wait for completion, if transmitting
The logic in the main transmit loop took a bit of reading the TRM to
fully understand (due to silent assumptions based in internal logic):
the "wait until idle" at the end of each iteration through the loop is
required for the transmit-path as each clearing of the ENA register
(to update run-length in the CTRLR1 register) will implicitly flush
the FIFOs... transmisson can therefore not overlap loop iterations.

This change adds a comment to clarify the reason/need for waiting
until the controller becomes idle and wraps the entire check into an
'if (out)' to make it clear that this is required for transfers with a
transmit-component only (for transfers having a receive-component,
completion of the transmit-side is trivially ensured by having
received the correct number of bytes).

The change does not increase execution time measurably in any of my
tests.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-05-01 00:00:04 +02:00
..
2019-01-15 15:28:53 -05:00
2019-02-27 09:12:33 +08:00
2019-02-20 15:27:08 +08:00
2018-12-06 14:37:51 -08:00
2019-04-12 16:09:13 +02:00
2018-07-19 16:31:38 -04:00
2019-02-20 15:27:11 +08:00
2018-11-29 09:30:06 -07:00
2019-04-21 10:26:52 +02:00
2019-04-11 20:07:12 -04:00