Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 1 | /* |
Dan Handley | e83b0ca | 2014-01-14 18:17:09 +0000 | [diff] [blame] | 2 | * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CCI_400_H__ |
| 8 | #define __CCI_400_H__ |
| 9 | |
Vikram Kanigiri | 080c0be | 2015-12-03 17:49:45 +0000 | [diff] [blame] | 10 | /************************************************************** |
| 11 | * THIS DRIVER IS DEPRECATED. Please use the driver in cci.h |
| 12 | **************************************************************/ |
| 13 | #if ERROR_DEPRECATED |
| 14 | #error " The CCI-400 specific driver is deprecated." |
| 15 | #endif |
| 16 | |
| 17 | |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 18 | /* Slave interface offsets from PERIPHBASE */ |
| 19 | #define SLAVE_IFACE4_OFFSET 0x5000 |
| 20 | #define SLAVE_IFACE3_OFFSET 0x4000 |
| 21 | #define SLAVE_IFACE2_OFFSET 0x3000 |
| 22 | #define SLAVE_IFACE1_OFFSET 0x2000 |
| 23 | #define SLAVE_IFACE0_OFFSET 0x1000 |
Dan Handley | be234f9 | 2014-08-04 16:11:15 +0100 | [diff] [blame] | 24 | #define SLAVE_IFACE_OFFSET(index) SLAVE_IFACE0_OFFSET + \ |
| 25 | (0x1000 * (index)) |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 26 | |
| 27 | /* Control and ID register offsets */ |
| 28 | #define CTRL_OVERRIDE_REG 0x0 |
| 29 | #define SPEC_CTRL_REG 0x4 |
| 30 | #define SECURE_ACCESS_REG 0x8 |
| 31 | #define STATUS_REG 0xc |
| 32 | #define IMPRECISE_ERR_REG 0x10 |
| 33 | #define PERFMON_CTRL_REG 0x100 |
| 34 | |
| 35 | /* Slave interface register offsets */ |
| 36 | #define SNOOP_CTRL_REG 0x0 |
| 37 | #define SH_OVERRIDE_REG 0x4 |
| 38 | #define READ_CHNL_QOS_VAL_OVERRIDE_REG 0x100 |
| 39 | #define WRITE_CHNL_QOS_VAL_OVERRIDE_REG 0x104 |
| 40 | #define QOS_CTRL_REG 0x10c |
| 41 | #define MAX_OT_REG 0x110 |
| 42 | #define TARGET_LATENCY_REG 0x130 |
| 43 | #define LATENCY_REGULATION_REG 0x134 |
| 44 | #define QOS_RANGE_REG 0x138 |
| 45 | |
| 46 | /* Snoop Control register bit definitions */ |
| 47 | #define DVM_EN_BIT (1 << 1) |
| 48 | #define SNOOP_EN_BIT (1 << 0) |
| 49 | |
| 50 | /* Status register bit definitions */ |
| 51 | #define CHANGE_PENDING_BIT (1 << 0) |
| 52 | |
Soby Mathew | 0da9593 | 2014-07-16 09:23:52 +0100 | [diff] [blame] | 53 | #ifndef __ASSEMBLY__ |
| 54 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 55 | #include <stdint.h> |
| 56 | |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 57 | /* Function declarations */ |
Dan Handley | be234f9 | 2014-08-04 16:11:15 +0100 | [diff] [blame] | 58 | |
| 59 | /* |
| 60 | * The CCI-400 driver must be initialized with the base address of the |
| 61 | * CCI-400 device in the platform memory map, and the cluster indices for |
| 62 | * the CCI-400 slave interfaces 3 and 4 respectively. These are the fully |
| 63 | * coherent ACE slave interfaces of CCI-400. |
| 64 | * The cluster indices must either be 0 or 1, corresponding to the level 1 |
| 65 | * affinity instance of the mpidr representing the cluster. A negative cluster |
| 66 | * index indicates that no cluster is present on that slave interface. |
| 67 | */ |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 68 | void cci_init(uintptr_t cci_base, |
Dan Handley | be234f9 | 2014-08-04 16:11:15 +0100 | [diff] [blame] | 69 | int slave_iface3_cluster_ix, |
Soren Brinkmann | a581bd5 | 2016-01-14 10:02:33 -0800 | [diff] [blame] | 70 | int slave_iface4_cluster_ix) __deprecated; |
Dan Handley | be234f9 | 2014-08-04 16:11:15 +0100 | [diff] [blame] | 71 | |
Soren Brinkmann | a581bd5 | 2016-01-14 10:02:33 -0800 | [diff] [blame] | 72 | void cci_enable_cluster_coherency(unsigned long mpidr) __deprecated; |
| 73 | void cci_disable_cluster_coherency(unsigned long mpidr) __deprecated; |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 74 | |
Soby Mathew | 0da9593 | 2014-07-16 09:23:52 +0100 | [diff] [blame] | 75 | #endif /* __ASSEMBLY__ */ |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 76 | #endif /* __CCI_400_H__ */ |