summaryrefslogtreecommitdiffstats
path: root/cf-code
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-08 14:59:57 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-08 14:59:57 +1000
commit6aba4e94522c34d3416235ae9242a82fcf2951a6 (patch)
treef534699410bcfc9f81de8d7072a4eadf4818ec98 /cf-code
parentd2e14fd32702f47c496a9d8d85412515b4596540 (diff)
downloadcf-fsi-6aba4e94522c34d3416235ae9242a82fcf2951a6.tar.gz
cf-fsi-6aba4e94522c34d3416235ae9242a82fcf2951a6.zip
Deal with arbitration at startup
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'cf-code')
-rw-r--r--cf-code/cf-fsi-fw.S18
1 files changed, 15 insertions, 3 deletions
diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S
index 0ac7375..90e1248 100644
--- a/cf-code/cf-fsi-fw.S
+++ b/cf-code/cf-fsi-fw.S
@@ -173,6 +173,21 @@ _start:
moveq.l #CLOCK_GPIO_BIT,%d5
/*
+ * Check arbitration register early. There's a case where an arbitration request
+ * might have occurred right as we were starting the coprocessor. In that case,
+ * wait until we get back ownership
+ */
+ move.b %a1@(ARB_REG),%d2
+ beq 1f
+
+ /* Ack it */
+ move.b #ARB_ARM_ACK,%a1@(ARB_REG)
+
+ /* Wait until it's cleared by the host */
+0: move.b %a1@(ARB_REG),%d1
+ bne 0b
+
+1: /*
* Load GPIO values into caches and set initial values
*
* Note: We load from the "Data Read" register which
@@ -220,9 +235,6 @@ _start:
/* Configure GPIOs to output */
bsr config_gpio_out
- /* Clear arbitration register */
- move.b #0,%a1@(ARB_REG)
-
/* Populate version & signature */
move.w #SYS_SIG,%a1@(SYS_SIG_REG)
move.b #FW_VERSION,%a1@(FW_VERS_REG)
OpenPOWER on IntegriCloud