summaryrefslogtreecommitdiffstats
path: root/cf-code
diff options
context:
space:
mode:
Diffstat (limited to 'cf-code')
-rw-r--r--cf-code/cf-fsi-fw.S29
-rw-r--r--cf-code/cf-fsi-palmetto.h1
2 files changed, 23 insertions, 7 deletions
diff --git a/cf-code/cf-fsi-fw.S b/cf-code/cf-fsi-fw.S
index 6af7e25..c0ca927 100644
--- a/cf-code/cf-fsi-fw.S
+++ b/cf-code/cf-fsi-fw.S
@@ -308,9 +308,11 @@ main_loop:
#ifdef CONTINUOUS_CLOCKING
clock_toggle
#else
+#ifndef NO_SW_IRQ
stop #0x2000
move.w #0x2007,%sr
#endif
+#endif
bra 1b
arbitration_request:
@@ -318,9 +320,27 @@ arbitration_request:
move.b #ARB_ARM_ACK,%a1@(ARB_REG)
/* Wait until it's cleared by the host */
-0: move.b %a1@(ARB_REG),%d1
- bne 1f
+arb_wait:
+ move.b %a1@(ARB_REG),%d1
+ beq arb_done
+
+#ifdef NO_SW_IRQ
+ /* In absence of SW irq, just loop with some NOPs to avoid
+ * hammering the bus too hard
+ */
+ moveq.l #32,%d0
+0: nop
+ subq.l #1,%d0
+ bne 0b
+ bra arb_wait
+#else
+ /* Wait, we'll get an interrupt when the host clears it */
+ stop #0x2000
+ move.w #0x2007,%sr
+ bra arb_wait
+#endif
+arb_done:
/* Got it, re-load the GPIO caches */
move.l %a5@(0),%DCLK
move.l %a4@(0),%DDAT
@@ -333,11 +353,6 @@ arbitration_request:
/* Back to main loop */
bra main_loop
- /* Wait, we'll get an interrupt when the host clears it */
-1: stop #0x2000
- move.w #0x2007,%sr
- bra 0b
-
command_request:
/* Clear the command/status register */
moveq.l #0,%d0
diff --git a/cf-code/cf-fsi-palmetto.h b/cf-code/cf-fsi-palmetto.h
index 1fb1f30..c11b116 100644
--- a/cf-code/cf-fsi-palmetto.h
+++ b/cf-code/cf-fsi-palmetto.h
@@ -11,5 +11,6 @@
#define SYS_SIG SYS_SIG_PALMETTO
+#define NO_SW_IRQ
#define CONTINUOUS_CLOCKING
#define EXTRA_DUMMY_READ
OpenPOWER on IntegriCloud