|
|
@@ -174,6 +174,12 @@ static void etm4_enable_hw(void *info)
|
|
|
if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 0))
|
|
|
dev_err(drvdata->dev,
|
|
|
"timeout while waiting for Idle Trace Status\n");
|
|
|
+ /*
|
|
|
+ * As recommended by section 4.3.7 ("Synchronization when using the
|
|
|
+ * memory-mapped interface") of ARM IHI 0064D
|
|
|
+ */
|
|
|
+ dsb(sy);
|
|
|
+ isb();
|
|
|
|
|
|
CS_LOCK(drvdata->base);
|
|
|
|
|
|
@@ -324,8 +330,12 @@ static void etm4_disable_hw(void *info)
|
|
|
/* EN, bit[0] Trace unit enable bit */
|
|
|
control &= ~0x1;
|
|
|
|
|
|
- /* make sure everything completes before disabling */
|
|
|
- mb();
|
|
|
+ /*
|
|
|
+ * Make sure everything completes before disabling, as recommended
|
|
|
+ * by section 7.3.77 ("TRCVICTLR, ViewInst Main Control Register,
|
|
|
+ * SSTATUS") of ARM IHI 0064D
|
|
|
+ */
|
|
|
+ dsb(sy);
|
|
|
isb();
|
|
|
writel_relaxed(control, drvdata->base + TRCPRGCTLR);
|
|
|
|