Unverified Commit 781842ea authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by GitHub
Browse files

Merge pull request #1501 from robertovargas-arm/cci

cci: Wait before reading status register
parents 83f51dac ae551a13
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <arch.h> #include <arch.h>
#include <arch_helpers.h>
#include <assert.h> #include <assert.h>
#include <cci.h> #include <cci.h>
#include <debug.h> #include <debug.h>
...@@ -142,6 +143,12 @@ void cci_enable_snoop_dvm_reqs(unsigned int master_id) ...@@ -142,6 +143,12 @@ void cci_enable_snoop_dvm_reqs(unsigned int master_id)
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG, SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
DVM_EN_BIT | SNOOP_EN_BIT); 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 */ /* Wait for the dust to settle down */
while (mmio_read_32(cci_base + STATUS_REG) & CHANGE_PENDING_BIT) 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) ...@@ -163,6 +170,12 @@ void cci_disable_snoop_dvm_reqs(unsigned int master_id)
SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG, SLAVE_IFACE_OFFSET(slave_if_id) + SNOOP_CTRL_REG,
~(DVM_EN_BIT | SNOOP_EN_BIT)); ~(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 */ /* Wait for the dust to settle down */
while (mmio_read_32(cci_base + STATUS_REG) & CHANGE_PENDING_BIT) while (mmio_read_32(cci_base + STATUS_REG) & CHANGE_PENDING_BIT)
; ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment