aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/arm
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-08-06 16:09:20 +0100
committerGitHub <noreply@github.com>2018-08-06 16:09:20 +0100
commit781842ea8a0d144b5bf2920e0bc0a9701236bdfb (patch)
treec5281e87de2eea984b168905a79cb22ac67e2339 /drivers/arm
parent83f51dac2dce56152697003597077d2306729514 (diff)
parentae551a13708cca093605119c0235e259a3538b05 (diff)
downloadplatform_external_arm-trusted-firmware-781842ea8a0d144b5bf2920e0bc0a9701236bdfb.tar.gz
platform_external_arm-trusted-firmware-781842ea8a0d144b5bf2920e0bc0a9701236bdfb.tar.bz2
platform_external_arm-trusted-firmware-781842ea8a0d144b5bf2920e0bc0a9701236bdfb.zip
Merge pull request #1501 from robertovargas-arm/cci
cci: Wait before reading status register
Diffstat (limited to 'drivers/arm')
-rw-r--r--drivers/arm/cci/cci.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/arm/cci/cci.c b/drivers/arm/cci/cci.c
index 81808b9f7..71b65f42c 100644
--- a/drivers/arm/cci/cci.c
+++ b/drivers/arm/cci/cci.c
@@ -5,6 +5,7 @@
*/
#include <arch.h>
+#include <arch_helpers.h>
#include <assert.h>
#include <cci.h>
#include <debug.h>
@@ -142,6 +143,12 @@ void cci_enable_snoop_dvm_reqs(unsigned int master_id)
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
DVM_EN_BIT | SNOOP_EN_BIT);
+ /*
+ * Wait for the completion of the write to the Snoop Control Register
+ * before testing the change_pending bit
+ */
+ dmbish();
+
/* Wait for the dust to settle down */
while (mmio_read_32(cci_base + STATUS_REG) & CHANGE_PENDING_BIT)
;
@@ -163,6 +170,12 @@ void cci_disable_snoop_dvm_reqs(unsigned int master_id)
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
~(DVM_EN_BIT | SNOOP_EN_BIT));
+ /*
+ * Wait for the completion of the write to the Snoop Control Register
+ * before testing the change_pending bit
+ */
+ dmbish();
+
/* Wait for the dust to settle down */
while (mmio_read_32(cci_base + STATUS_REG) & CHANGE_PENDING_BIT)
;