summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-13 17:12:12 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-13 17:12:12 +1000
commitbddeeae3cc2f31400d41dd27a4dd7e4f2156565d (patch)
treee877ddea4ed56c75265822e86fcfe0c2fffd0a52
parent2a5e7f567e562b2ea21a55ea4e1b529e2db0b88c (diff)
downloadcf-fsi-bddeeae3cc2f31400d41dd27a4dd7e4f2156565d.tar.gz
cf-fsi-bddeeae3cc2f31400d41dd27a4dd7e4f2156565d.zip
Add continuous clocking option
For P8 CFAM without async mode Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--cf-code/cf-fsi-fw.S16
-rw-r--r--cf-fsi-fw.h3
2 files changed, 16 insertions, 3 deletions
diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S
index f76627e..e897eaa 100644
--- a/cf-code/cf-fsi-fw.S
+++ b/cf-code/cf-fsi-fw.S
@@ -175,11 +175,19 @@ _header_info:
.byte API_VERSION_MAJ /* 0x04 */
.byte API_VERSION_MIN /* 0x05 */
.byte 0,0 /* 0x06 pad */
+
#ifdef ENABLE_TRACE
- .long FW_OPTION_TRACE_EN /* 0x08 */
+#define _FW_OPTION_TRACE_EN FW_OPTION_TRACE_EN
+#else
+#define _FW_OPTION_TRACE_EN 0
+#endif
+
+#ifdef CONTINUOUS_CLOCKING
+#define _FW_OPTION_CONT_CLOCK FW_OPTION_CONT_CLOCK
#else
- .long 0
+#define _FW_OPTION_CONT_CLOCK 0
#endif
+ .long _FW_OPTION_TRACE_EN | _FW_OPTION_CONT_CLOCK /* 0x08 */
/*
* Config area
@@ -290,8 +298,12 @@ main_loop:
move.l %a1@(CMD_STAT_REG),%d2
tst.b %d2
bne command_request
+#ifdef CONTINUOUS_CLOCKING
+ clock_toggle
+#else
stop #0x2000
move.w #0x2007,%sr
+#endif
bra 1b
arbitration_request:
diff --git a/cf-fsi-fw.h b/cf-fsi-fw.h
index 1ffa0a5..9356a41 100644
--- a/cf-fsi-fw.h
+++ b/cf-fsi-fw.h
@@ -32,7 +32,8 @@
#define API_VERSION_MAJ 1 /* Current version */
#define API_VERSION_MIN 1
#define HDR_FW_OPTIONS 0x08 /* 4 bytes option flags */
-#define FW_OPTION_TRACE_EN 0x00000001 /* FW tracing enabled */
+#define FW_OPTION_TRACE_EN 0x00000001 /* FW tracing enabled */
+#define FW_OPTION_CONT_CLOCK 0x00000002 /* Continuous clocking */
/* Boot Config: Address of Command/Status area */
#define HDR_CMD_STAT_AREA 0x80 /* 4 bytes CF address */
OpenPOWER on IntegriCloud