diff options
author | Dan Handley <dan.handley@arm.com> | 2014-08-04 16:11:15 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-08-14 10:49:20 +0100 |
commit | cae3ef992e24b9ceb2ba1cd7d2ef0c6faaf29e0a (patch) | |
tree | 453461858d984fca597da46d983a33e9fda89adf /include | |
parent | f0e240d7f59cbf1cb99fc358ddec967cad8bf3df (diff) |
Remove platform dependency in CCI-400 driver
* Create cci_init() function in CCI-400 driver to allow platform
to provide arguments needed by the driver (i.e. base address
and cluster indices for the ACE slave interfaces).
* Rename cci_(en|dis)able_coherency to
cci_(en|dis)able_cluster_coherency to make it clear that
the driver only enables/disables the coherency of CPU
clusters and not other devices connected to the CCI-400.
* Update FVP port to use new cci_init() function and remove
unnecessary CCI defintions from platform_def.h. Also rename
fvp_cci_setup() to fvp_cci_enable() to more clearly
differentiate between CCI initialization and enabling.
THIS CHANGE REQUIRES PLATFORM PORTS THAT USE THE CCI-400 DRIVER
TO BE UPDATED
Fixes ARM-software/tf-issues#168
Change-Id: I1946a51409b91217b92285b6375082619f607fec
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/arm/cci400.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/drivers/arm/cci400.h b/include/drivers/arm/cci400.h index 6246e48..7756bdf 100644 --- a/include/drivers/arm/cci400.h +++ b/include/drivers/arm/cci400.h @@ -37,7 +37,8 @@ #define SLAVE_IFACE2_OFFSET 0x3000 #define SLAVE_IFACE1_OFFSET 0x2000 #define SLAVE_IFACE0_OFFSET 0x1000 -#define SLAVE_IFACE_OFFSET(index) SLAVE_IFACE0_OFFSET + (0x1000 * index) +#define SLAVE_IFACE_OFFSET(index) SLAVE_IFACE0_OFFSET + \ + (0x1000 * (index)) /* Control and ID register offsets */ #define CTRL_OVERRIDE_REG 0x0 @@ -68,8 +69,22 @@ #ifndef __ASSEMBLY__ /* Function declarations */ -void cci_enable_coherency(unsigned long mpidr); -void cci_disable_coherency(unsigned long mpidr); + +/* + * The CCI-400 driver must be initialized with the base address of the + * CCI-400 device in the platform memory map, and the cluster indices for + * the CCI-400 slave interfaces 3 and 4 respectively. These are the fully + * coherent ACE slave interfaces of CCI-400. + * The cluster indices must either be 0 or 1, corresponding to the level 1 + * affinity instance of the mpidr representing the cluster. A negative cluster + * index indicates that no cluster is present on that slave interface. + */ +void cci_init(unsigned long cci_base, + int slave_iface3_cluster_ix, + int slave_iface4_cluster_ix); + +void cci_enable_cluster_coherency(unsigned long mpidr); +void cci_disable_cluster_coherency(unsigned long mpidr); #endif /* __ASSEMBLY__ */ #endif /* __CCI_400_H__ */ |