aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-03-19 22:32:24 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-04-19 07:28:33 +0200
commitc053027369bf3b7a50d21d487d0170d2d7bb7f44 (patch)
treea666fb90e86ea88c42ce7150daddc174cb9fe5bf
parent538fea89d8f45297753c5c3051a1da7f8ea18f01 (diff)
downloadopenfirmware-c053027369bf3b7a50d21d487d0170d2d7bb7f44.tar.gz
kb3700: make sure the SSP's TXFIXO is empty on close
The Linux driver would get confused if it wasn't empty.
-rw-r--r--dev/olpc/kb3700/spicmd.fth5
1 files changed, 5 insertions, 0 deletions
diff --git a/dev/olpc/kb3700/spicmd.fth b/dev/olpc/kb3700/spicmd.fth
index f8429341..9fa2b2ee 100644
--- a/dev/olpc/kb3700/spicmd.fth
+++ b/dev/olpc/kb3700/spicmd.fth
@@ -349,6 +349,11 @@ defer upstream
set-ack
open-count 1 = if
ssp-base h# 1000 " map-out" $call-parent 0 is ssp-base
+
+ \ Reset the SSP3. There doesn't seem to be any other
+ \ way to drain the TXFIFO and we need to ensure we didn't
+ \ leave garbage there.
+ ssp3-clk-on
then
open-count 1- 0 max to open-count
;