summaryrefslogtreecommitdiffstats
path: root/cf-code
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-13 21:49:31 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-13 21:49:31 +1000
commitef2334e5c677868c249e61cdaf6ae205185750e3 (patch)
treedd6de5ae561103fd1ab5a0d6d35427a192872cd1 /cf-code
parentea064f5405f1539356dcb6355f7c432b36979261 (diff)
downloadcf-fsi-ef2334e5c677868c249e61cdaf6ae205185750e3.tar.gz
cf-fsi-ef2334e5c677868c249e61cdaf6ae205185750e3.zip
Add clock count in debug mode
Allows to verify that continuous clocking is working Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'cf-code')
-rw-r--r--cf-code/cf-fsi-fw.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S
index e897eaa..6af7e25 100644
--- a/cf-code/cf-fsi-fw.S
+++ b/cf-code/cf-fsi-fw.S
@@ -67,9 +67,14 @@
.macro trace op:req
move.b \op,%a3@+
.endm
+ .macro count_clock
+ addq.l #1,%a1@(CLK_CNT)
+ .endm
#else
.macro trace op:req
.endm
+ .macro count_clock
+ .endm
#endif
/*
@@ -82,6 +87,7 @@
move.l %DCLK,%a5@(0)
bset.l %d5,%DCLK /* clock high */
move.l %DCLK,%a5@(0)
+ count_clock
.endm
/* clock_out_bit reg: Clock out bit 31 of reg */
@@ -131,6 +137,7 @@
move.l %a4@(0),\tmp /* actual read */
bset.l %d5,%DCLK /* clock high */
move.l %DCLK,%a5@(0)
+ count_clock
moveq.l #DATA_GPIO_BIT,\tmp2
lsr.l \tmp2,\tmp
moveq.l #1,\tmp2
OpenPOWER on IntegriCloud