Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +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. |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __GIC_V2_H__ |
| 8 | #define __GIC_V2_H__ |
| 9 | |
Soby Mathew | 3ddc972 | 2015-10-26 14:32:09 +0000 | [diff] [blame] | 10 | /****************************************************************************** |
| 11 | * THIS DRIVER IS DEPRECATED. For GICv2 systems, use the driver in gicv2.h |
| 12 | * and for GICv3 systems, use the driver in gicv3.h. |
| 13 | *****************************************************************************/ |
| 14 | #if ERROR_DEPRECATED |
| 15 | #error " The legacy ARM GIC driver is deprecated." |
| 16 | #endif |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 17 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 18 | #define GIC400_NUM_SPIS U(480) |
| 19 | #define MAX_PPIS U(14) |
| 20 | #define MAX_SGIS U(16) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 21 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 22 | #define MIN_SGI_ID U(0) |
| 23 | #define MIN_PPI_ID U(16) |
| 24 | #define MIN_SPI_ID U(32) |
Dan Handley | fb42b12 | 2014-06-20 09:43:15 +0100 | [diff] [blame] | 25 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 26 | #define GRP0 U(0) |
| 27 | #define GRP1 U(1) |
| 28 | #define GIC_PRI_MASK U(0xff) |
| 29 | #define GIC_HIGHEST_SEC_PRIORITY U(0) |
| 30 | #define GIC_LOWEST_SEC_PRIORITY U(127) |
| 31 | #define GIC_HIGHEST_NS_PRIORITY U(128) |
| 32 | #define GIC_LOWEST_NS_PRIORITY U(254) /* 255 would disable an interrupt */ |
| 33 | #define GIC_SPURIOUS_INTERRUPT U(1023) |
| 34 | #define GIC_TARGET_CPU_MASK U(0xff) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 35 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 36 | #define ENABLE_GRP0 (U(1) << 0) |
| 37 | #define ENABLE_GRP1 (U(1) << 1) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 38 | |
| 39 | /* Distributor interface definitions */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 40 | #define GICD_CTLR U(0x0) |
| 41 | #define GICD_TYPER U(0x4) |
| 42 | #define GICD_IGROUPR U(0x80) |
| 43 | #define GICD_ISENABLER U(0x100) |
| 44 | #define GICD_ICENABLER U(0x180) |
| 45 | #define GICD_ISPENDR U(0x200) |
| 46 | #define GICD_ICPENDR U(0x280) |
| 47 | #define GICD_ISACTIVER U(0x300) |
| 48 | #define GICD_ICACTIVER U(0x380) |
| 49 | #define GICD_IPRIORITYR U(0x400) |
| 50 | #define GICD_ITARGETSR U(0x800) |
| 51 | #define GICD_ICFGR U(0xC00) |
| 52 | #define GICD_SGIR U(0xF00) |
| 53 | #define GICD_CPENDSGIR U(0xF10) |
| 54 | #define GICD_SPENDSGIR U(0xF20) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 55 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 56 | #define IGROUPR_SHIFT U(5) |
| 57 | #define ISENABLER_SHIFT U(5) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 58 | #define ICENABLER_SHIFT ISENABLER_SHIFT |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 59 | #define ISPENDR_SHIFT U(5) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 60 | #define ICPENDR_SHIFT ISPENDR_SHIFT |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 61 | #define ISACTIVER_SHIFT U(5) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 62 | #define ICACTIVER_SHIFT ISACTIVER_SHIFT |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 63 | #define IPRIORITYR_SHIFT U(2) |
| 64 | #define ITARGETSR_SHIFT U(2) |
| 65 | #define ICFGR_SHIFT U(4) |
| 66 | #define CPENDSGIR_SHIFT U(2) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 67 | #define SPENDSGIR_SHIFT CPENDSGIR_SHIFT |
| 68 | |
| 69 | /* GICD_TYPER bit definitions */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 70 | #define IT_LINES_NO_MASK U(0x1f) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 71 | |
| 72 | /* Physical CPU Interface registers */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 73 | #define GICC_CTLR U(0x0) |
| 74 | #define GICC_PMR U(0x4) |
| 75 | #define GICC_BPR U(0x8) |
| 76 | #define GICC_IAR U(0xC) |
| 77 | #define GICC_EOIR U(0x10) |
| 78 | #define GICC_RPR U(0x14) |
| 79 | #define GICC_HPPIR U(0x18) |
| 80 | #define GICC_AHPPIR U(0x28) |
| 81 | #define GICC_IIDR U(0xFC) |
| 82 | #define GICC_DIR U(0x1000) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 83 | #define GICC_PRIODROP GICC_EOIR |
| 84 | |
Achin Gupta | 966b952 | 2015-05-18 10:56:47 +0100 | [diff] [blame] | 85 | /* Common CPU Interface definitions */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 86 | #define INT_ID_MASK U(0x3ff) |
Achin Gupta | 966b952 | 2015-05-18 10:56:47 +0100 | [diff] [blame] | 87 | |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 88 | /* GICC_CTLR bit definitions */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 89 | #define EOI_MODE_NS (U(1) << 10) |
| 90 | #define EOI_MODE_S (U(1) << 9) |
| 91 | #define IRQ_BYP_DIS_GRP1 (U(1) << 8) |
| 92 | #define FIQ_BYP_DIS_GRP1 (U(1) << 7) |
| 93 | #define IRQ_BYP_DIS_GRP0 (U(1) << 6) |
| 94 | #define FIQ_BYP_DIS_GRP0 (U(1) << 5) |
| 95 | #define CBPR (U(1) << 4) |
| 96 | #define FIQ_EN (U(1) << 3) |
| 97 | #define ACK_CTL (U(1) << 2) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 98 | |
| 99 | /* GICC_IIDR bit masks and shifts */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 100 | #define GICC_IIDR_PID_SHIFT U(20) |
| 101 | #define GICC_IIDR_ARCH_SHIFT U(16) |
| 102 | #define GICC_IIDR_REV_SHIFT U(12) |
| 103 | #define GICC_IIDR_IMP_SHIFT U(0) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 104 | |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 105 | #define GICC_IIDR_PID_MASK U(0xfff) |
| 106 | #define GICC_IIDR_ARCH_MASK U(0xf) |
| 107 | #define GICC_IIDR_REV_MASK U(0xf) |
| 108 | #define GICC_IIDR_IMP_MASK U(0xfff) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 109 | |
| 110 | /* HYP view virtual CPU Interface registers */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 111 | #define GICH_CTL U(0x0) |
| 112 | #define GICH_VTR U(0x4) |
| 113 | #define GICH_ELRSR0 U(0x30) |
| 114 | #define GICH_ELRSR1 U(0x34) |
| 115 | #define GICH_APR0 U(0xF0) |
| 116 | #define GICH_LR_BASE U(0x100) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 117 | |
| 118 | /* Virtual CPU Interface registers */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 119 | #define GICV_CTL U(0x0) |
| 120 | #define GICV_PRIMASK U(0x4) |
| 121 | #define GICV_BP U(0x8) |
| 122 | #define GICV_INTACK U(0xC) |
| 123 | #define GICV_EOI U(0x10) |
| 124 | #define GICV_RUNNINGPRI U(0x14) |
| 125 | #define GICV_HIGHESTPEND U(0x18) |
| 126 | #define GICV_DEACTIVATE U(0x1000) |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 127 | |
| 128 | #ifndef __ASSEMBLY__ |
| 129 | |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 130 | #include <mmio.h> |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 131 | #include <stdint.h> |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 132 | |
| 133 | /******************************************************************************* |
| 134 | * GIC Distributor function prototypes |
| 135 | ******************************************************************************/ |
| 136 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 137 | unsigned int gicd_read_igroupr(uintptr_t, unsigned int); |
| 138 | unsigned int gicd_read_isenabler(uintptr_t, unsigned int); |
| 139 | unsigned int gicd_read_icenabler(uintptr_t, unsigned int); |
| 140 | unsigned int gicd_read_ispendr(uintptr_t, unsigned int); |
| 141 | unsigned int gicd_read_icpendr(uintptr_t, unsigned int); |
| 142 | unsigned int gicd_read_isactiver(uintptr_t, unsigned int); |
| 143 | unsigned int gicd_read_icactiver(uintptr_t, unsigned int); |
| 144 | unsigned int gicd_read_ipriorityr(uintptr_t, unsigned int); |
| 145 | unsigned int gicd_read_itargetsr(uintptr_t, unsigned int); |
| 146 | unsigned int gicd_read_icfgr(uintptr_t, unsigned int); |
| 147 | unsigned int gicd_read_cpendsgir(uintptr_t, unsigned int); |
| 148 | unsigned int gicd_read_spendsgir(uintptr_t, unsigned int); |
| 149 | void gicd_write_igroupr(uintptr_t, unsigned int, unsigned int); |
| 150 | void gicd_write_isenabler(uintptr_t, unsigned int, unsigned int); |
| 151 | void gicd_write_icenabler(uintptr_t, unsigned int, unsigned int); |
| 152 | void gicd_write_ispendr(uintptr_t, unsigned int, unsigned int); |
| 153 | void gicd_write_icpendr(uintptr_t, unsigned int, unsigned int); |
| 154 | void gicd_write_isactiver(uintptr_t, unsigned int, unsigned int); |
| 155 | void gicd_write_icactiver(uintptr_t, unsigned int, unsigned int); |
| 156 | void gicd_write_ipriorityr(uintptr_t, unsigned int, unsigned int); |
| 157 | void gicd_write_itargetsr(uintptr_t, unsigned int, unsigned int); |
| 158 | void gicd_write_icfgr(uintptr_t, unsigned int, unsigned int); |
| 159 | void gicd_write_cpendsgir(uintptr_t, unsigned int, unsigned int); |
| 160 | void gicd_write_spendsgir(uintptr_t, unsigned int, unsigned int); |
| 161 | unsigned int gicd_get_igroupr(uintptr_t, unsigned int); |
| 162 | void gicd_set_igroupr(uintptr_t, unsigned int); |
| 163 | void gicd_clr_igroupr(uintptr_t, unsigned int); |
| 164 | void gicd_set_isenabler(uintptr_t, unsigned int); |
| 165 | void gicd_set_icenabler(uintptr_t, unsigned int); |
| 166 | void gicd_set_ispendr(uintptr_t, unsigned int); |
| 167 | void gicd_set_icpendr(uintptr_t, unsigned int); |
| 168 | void gicd_set_isactiver(uintptr_t, unsigned int); |
| 169 | void gicd_set_icactiver(uintptr_t, unsigned int); |
| 170 | void gicd_set_ipriorityr(uintptr_t, unsigned int, unsigned int); |
| 171 | void gicd_set_itargetsr(uintptr_t, unsigned int, unsigned int); |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 172 | |
| 173 | |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 174 | /******************************************************************************* |
| 175 | * GIC Distributor interface accessors for reading entire registers |
| 176 | ******************************************************************************/ |
| 177 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 178 | static inline unsigned int gicd_read_ctlr(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 179 | { |
| 180 | return mmio_read_32(base + GICD_CTLR); |
| 181 | } |
| 182 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 183 | static inline unsigned int gicd_read_typer(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 184 | { |
| 185 | return mmio_read_32(base + GICD_TYPER); |
| 186 | } |
| 187 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 188 | static inline unsigned int gicd_read_sgir(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 189 | { |
| 190 | return mmio_read_32(base + GICD_SGIR); |
| 191 | } |
| 192 | |
| 193 | |
| 194 | /******************************************************************************* |
| 195 | * GIC Distributor interface accessors for writing entire registers |
| 196 | ******************************************************************************/ |
| 197 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 198 | static inline void gicd_write_ctlr(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 199 | { |
| 200 | mmio_write_32(base + GICD_CTLR, val); |
| 201 | } |
| 202 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 203 | static inline void gicd_write_sgir(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 204 | { |
| 205 | mmio_write_32(base + GICD_SGIR, val); |
| 206 | } |
| 207 | |
| 208 | |
| 209 | /******************************************************************************* |
| 210 | * GIC CPU interface accessors for reading entire registers |
| 211 | ******************************************************************************/ |
| 212 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 213 | static inline unsigned int gicc_read_ctlr(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 214 | { |
| 215 | return mmio_read_32(base + GICC_CTLR); |
| 216 | } |
| 217 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 218 | static inline unsigned int gicc_read_pmr(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 219 | { |
| 220 | return mmio_read_32(base + GICC_PMR); |
| 221 | } |
| 222 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 223 | static inline unsigned int gicc_read_BPR(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 224 | { |
| 225 | return mmio_read_32(base + GICC_BPR); |
| 226 | } |
| 227 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 228 | static inline unsigned int gicc_read_IAR(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 229 | { |
| 230 | return mmio_read_32(base + GICC_IAR); |
| 231 | } |
| 232 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 233 | static inline unsigned int gicc_read_EOIR(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 234 | { |
| 235 | return mmio_read_32(base + GICC_EOIR); |
| 236 | } |
| 237 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 238 | static inline unsigned int gicc_read_hppir(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 239 | { |
| 240 | return mmio_read_32(base + GICC_HPPIR); |
| 241 | } |
| 242 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 243 | static inline unsigned int gicc_read_ahppir(uintptr_t base) |
Achin Gupta | 02d3628 | 2014-05-04 19:02:52 +0100 | [diff] [blame] | 244 | { |
| 245 | return mmio_read_32(base + GICC_AHPPIR); |
| 246 | } |
| 247 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 248 | static inline unsigned int gicc_read_dir(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 249 | { |
| 250 | return mmio_read_32(base + GICC_DIR); |
| 251 | } |
| 252 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 253 | static inline unsigned int gicc_read_iidr(uintptr_t base) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 254 | { |
| 255 | return mmio_read_32(base + GICC_IIDR); |
| 256 | } |
| 257 | |
| 258 | |
| 259 | /******************************************************************************* |
| 260 | * GIC CPU interface accessors for writing entire registers |
| 261 | ******************************************************************************/ |
| 262 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 263 | static inline void gicc_write_ctlr(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 264 | { |
| 265 | mmio_write_32(base + GICC_CTLR, val); |
| 266 | } |
| 267 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 268 | static inline void gicc_write_pmr(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 269 | { |
| 270 | mmio_write_32(base + GICC_PMR, val); |
| 271 | } |
| 272 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 273 | static inline void gicc_write_BPR(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 274 | { |
| 275 | mmio_write_32(base + GICC_BPR, val); |
| 276 | } |
| 277 | |
| 278 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 279 | static inline void gicc_write_IAR(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 280 | { |
| 281 | mmio_write_32(base + GICC_IAR, val); |
| 282 | } |
| 283 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 284 | static inline void gicc_write_EOIR(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 285 | { |
| 286 | mmio_write_32(base + GICC_EOIR, val); |
| 287 | } |
| 288 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 289 | static inline void gicc_write_hppir(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 290 | { |
| 291 | mmio_write_32(base + GICC_HPPIR, val); |
| 292 | } |
| 293 | |
Juan Castillo | 7f1f062 | 2014-09-09 09:49:23 +0100 | [diff] [blame] | 294 | static inline void gicc_write_dir(uintptr_t base, unsigned int val) |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 295 | { |
| 296 | mmio_write_32(base + GICC_DIR, val); |
| 297 | } |
| 298 | |
Achin Gupta | 191e86e | 2014-05-09 10:03:15 +0100 | [diff] [blame] | 299 | /******************************************************************************* |
| 300 | * Prototype of function to map an interrupt type to the interrupt line used to |
| 301 | * signal it. |
| 302 | ******************************************************************************/ |
| 303 | uint32_t gicv2_interrupt_type_to_line(uint32_t cpuif_base, uint32_t type); |
| 304 | |
Dan Handley | 930ee2e | 2014-04-17 17:48:52 +0100 | [diff] [blame] | 305 | #endif /*__ASSEMBLY__*/ |
| 306 | |
Sandrine Bailleux | 27866d8 | 2013-10-25 15:33:39 +0100 | [diff] [blame] | 307 | #endif /* __GIC_V2_H__ */ |