Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <arch_helpers.h> |
Isla Mitchell | e363146 | 2017-07-14 10:46:32 +0100 | [diff] [blame] | 8 | #include <assert.h> |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 9 | #include <bl_common.h> |
| 10 | #include <debug.h> |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 11 | #include <interrupt_mgmt.h> |
| 12 | #include <platform.h> |
| 13 | #include <stdint.h> |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 14 | #include <tegra_def.h> |
Isla Mitchell | e363146 | 2017-07-14 10:46:32 +0100 | [diff] [blame] | 15 | #include <tegra_private.h> |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 16 | |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 17 | /* Value used to initialize Non-Secure IRQ priorities four at a time */ |
| 18 | #define GICD_IPRIORITYR_DEF_VAL \ |
| 19 | (GIC_HIGHEST_NS_PRIORITY | \ |
| 20 | (GIC_HIGHEST_NS_PRIORITY << 8) | \ |
| 21 | (GIC_HIGHEST_NS_PRIORITY << 16) | \ |
| 22 | (GIC_HIGHEST_NS_PRIORITY << 24)) |
| 23 | |
Varun Wadekar | c6c386d | 2016-05-20 16:21:22 -0700 | [diff] [blame] | 24 | static const irq_sec_cfg_t *g_irq_sec_ptr; |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 25 | static uint32_t g_num_irqs; |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 26 | |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 27 | /******************************************************************************* |
| 28 | * Place the cpu interface in a state where it can never make a cpu exit wfi as |
| 29 | * as result of an asserted interrupt. This is critical for powering down a cpu |
| 30 | ******************************************************************************/ |
| 31 | void tegra_gic_cpuif_deactivate(void) |
| 32 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 33 | uint32_t val; |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 34 | |
| 35 | /* Disable secure, non-secure interrupts and disable their bypass */ |
| 36 | val = gicc_read_ctlr(TEGRA_GICC_BASE); |
| 37 | val &= ~(ENABLE_GRP0 | ENABLE_GRP1); |
| 38 | val |= FIQ_BYP_DIS_GRP1 | FIQ_BYP_DIS_GRP0; |
| 39 | val |= IRQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP1; |
| 40 | gicc_write_ctlr(TEGRA_GICC_BASE, val); |
| 41 | } |
| 42 | |
| 43 | /******************************************************************************* |
| 44 | * Enable secure interrupts and set the priority mask register to allow all |
| 45 | * interrupts to trickle in. |
| 46 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 47 | static void tegra_gic_cpuif_setup(uint32_t gicc_base) |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 48 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 49 | uint32_t val; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 50 | |
| 51 | val = ENABLE_GRP0 | ENABLE_GRP1 | FIQ_EN | FIQ_BYP_DIS_GRP0; |
| 52 | val |= IRQ_BYP_DIS_GRP0 | FIQ_BYP_DIS_GRP1 | IRQ_BYP_DIS_GRP1; |
| 53 | |
| 54 | gicc_write_ctlr(gicc_base, val); |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 55 | gicc_write_pmr(gicc_base, GIC_PRI_MASK); |
| 56 | } |
| 57 | |
| 58 | /******************************************************************************* |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 59 | * Per cpu gic distributor setup which will be done by all cpus after a cold |
| 60 | * boot/hotplug. This marks out the secure interrupts & enables them. |
| 61 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 62 | static void tegra_gic_pcpu_distif_setup(uint32_t gicd_base) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 63 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 64 | uint32_t index, sec_ppi_sgi_mask = 0; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 65 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 66 | assert(gicd_base != 0U); |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 67 | |
| 68 | /* Setup PPI priorities doing four at a time */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 69 | for (index = 0U; index < 32U; index += 4U) { |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 70 | gicd_write_ipriorityr(gicd_base, index, |
| 71 | GICD_IPRIORITYR_DEF_VAL); |
| 72 | } |
| 73 | |
| 74 | /* |
| 75 | * Invert the bitmask to create a mask for non-secure PPIs and |
| 76 | * SGIs. Program the GICD_IGROUPR0 with this bit mask. This write will |
| 77 | * update the GICR_IGROUPR0 as well in case we are running on a GICv3 |
| 78 | * system. This is critical if GICD_CTLR.ARE_NS=1. |
| 79 | */ |
| 80 | gicd_write_igroupr(gicd_base, 0, ~sec_ppi_sgi_mask); |
| 81 | } |
| 82 | |
| 83 | /******************************************************************************* |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 84 | * Global gic distributor setup which will be done by the primary cpu after a |
| 85 | * cold boot. It marks out the non secure SPIs, PPIs & SGIs and enables them. |
| 86 | * It then enables the secure GIC distributor interface. |
| 87 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 88 | static void tegra_gic_distif_setup(uint32_t gicd_base) |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 89 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 90 | uint32_t index, num_ints, irq_num; |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 91 | uint8_t target_cpus; |
| 92 | uint32_t val; |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 93 | |
| 94 | /* |
| 95 | * Mark out non-secure interrupts. Calculate number of |
| 96 | * IGROUPR registers to consider. Will be equal to the |
| 97 | * number of IT_LINES |
| 98 | */ |
| 99 | num_ints = gicd_read_typer(gicd_base) & IT_LINES_NO_MASK; |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 100 | num_ints = (num_ints + 1U) << 5; |
| 101 | for (index = MIN_SPI_ID; index < num_ints; index += 32U) { |
| 102 | gicd_write_igroupr(gicd_base, index, 0xFFFFFFFFU); |
| 103 | } |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 104 | |
| 105 | /* Setup SPI priorities doing four at a time */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 106 | for (index = MIN_SPI_ID; index < num_ints; index += 4U) { |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 107 | gicd_write_ipriorityr(gicd_base, index, |
| 108 | GICD_IPRIORITYR_DEF_VAL); |
| 109 | } |
| 110 | |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 111 | /* Configure SPI secure interrupts now */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 112 | if (g_irq_sec_ptr != NULL) { |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 113 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 114 | for (index = 0U; index < g_num_irqs; index++) { |
| 115 | irq_num = g_irq_sec_ptr[index].irq; |
| 116 | target_cpus = (uint8_t)g_irq_sec_ptr[index].target_cpus; |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 117 | |
| 118 | if (irq_num >= MIN_SPI_ID) { |
| 119 | |
| 120 | /* Configure as a secure interrupt */ |
| 121 | gicd_clr_igroupr(gicd_base, irq_num); |
| 122 | |
| 123 | /* Configure SPI priority */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 124 | mmio_write_8((uint64_t)gicd_base + |
| 125 | (uint64_t)GICD_IPRIORITYR + |
| 126 | (uint64_t)irq_num, |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 127 | GIC_HIGHEST_SEC_PRIORITY & |
| 128 | GIC_PRI_MASK); |
| 129 | |
| 130 | /* Configure as level triggered */ |
| 131 | val = gicd_read_icfgr(gicd_base, irq_num); |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 132 | val |= (3U << ((irq_num & 0xFU) << 1U)); |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 133 | gicd_write_icfgr(gicd_base, irq_num, val); |
| 134 | |
| 135 | /* Route SPI to the target CPUs */ |
| 136 | gicd_set_itargetsr(gicd_base, irq_num, |
| 137 | target_cpus); |
| 138 | |
| 139 | /* Enable this interrupt */ |
| 140 | gicd_set_isenabler(gicd_base, irq_num); |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 145 | /* |
| 146 | * Configure the SGI and PPI. This is done in a separated function |
| 147 | * because each CPU is responsible for initializing its own private |
| 148 | * interrupts. |
| 149 | */ |
| 150 | tegra_gic_pcpu_distif_setup(gicd_base); |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 151 | |
| 152 | /* enable distributor */ |
| 153 | gicd_write_ctlr(gicd_base, ENABLE_GRP0 | ENABLE_GRP1); |
| 154 | } |
| 155 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 156 | void tegra_gic_setup(const irq_sec_cfg_t *irq_sec_ptr, uint32_t num_irqs) |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 157 | { |
Varun Wadekar | b7b4575 | 2015-12-28 14:55:41 -0800 | [diff] [blame] | 158 | g_irq_sec_ptr = irq_sec_ptr; |
| 159 | g_num_irqs = num_irqs; |
| 160 | |
Varun Wadekar | b316e24 | 2015-05-19 16:48:04 +0530 | [diff] [blame] | 161 | tegra_gic_cpuif_setup(TEGRA_GICC_BASE); |
| 162 | tegra_gic_distif_setup(TEGRA_GICD_BASE); |
| 163 | } |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 164 | |
| 165 | /******************************************************************************* |
| 166 | * An ARM processor signals interrupt exceptions through the IRQ and FIQ pins. |
| 167 | * The interrupt controller knows which pin/line it uses to signal a type of |
| 168 | * interrupt. This function provides a common implementation of |
| 169 | * plat_interrupt_type_to_line() in an ARM GIC environment for optional re-use |
| 170 | * across platforms. It lets the interrupt management framework determine |
| 171 | * for a type of interrupt and security state, which line should be used in the |
| 172 | * SCR_EL3 to control its routing to EL3. The interrupt line is represented as |
| 173 | * the bit position of the IRQ or FIQ bit in the SCR_EL3. |
| 174 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 175 | static uint32_t tegra_gic_interrupt_type_to_line(uint32_t type, |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 176 | uint32_t security_state) |
| 177 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 178 | assert((type == INTR_TYPE_S_EL1) || |
| 179 | (type == INTR_TYPE_EL3) || |
| 180 | (type == INTR_TYPE_NS)); |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 181 | |
| 182 | assert(sec_state_is_valid(security_state)); |
| 183 | |
| 184 | /* |
| 185 | * We ignore the security state parameter under the assumption that |
| 186 | * both normal and secure worlds are using ARM GICv2. This parameter |
| 187 | * will be used when the secure world starts using GICv3. |
| 188 | */ |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 189 | return gicv2_interrupt_type_to_line(TEGRA_GICC_BASE, type); |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 190 | } |
| 191 | |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 192 | /******************************************************************************* |
| 193 | * This function returns the type of the highest priority pending interrupt at |
| 194 | * the GIC cpu interface. INTR_TYPE_INVAL is returned when there is no |
| 195 | * interrupt pending. |
| 196 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 197 | static uint32_t tegra_gic_get_pending_interrupt_type(void) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 198 | { |
| 199 | uint32_t id; |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 200 | uint32_t index; |
| 201 | uint32_t ret = INTR_TYPE_NS; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 202 | |
| 203 | id = gicc_read_hppir(TEGRA_GICC_BASE) & INT_ID_MASK; |
| 204 | |
Varun Wadekar | c6c386d | 2016-05-20 16:21:22 -0700 | [diff] [blame] | 205 | /* get the interrupt type */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 206 | if (id < 1022U) { |
| 207 | for (index = 0U; index < g_num_irqs; index++) { |
| 208 | if (id == g_irq_sec_ptr[index].irq) { |
| 209 | ret = g_irq_sec_ptr[index].type; |
| 210 | break; |
| 211 | } |
| 212 | } |
| 213 | } else { |
| 214 | if (id == GIC_SPURIOUS_INTERRUPT) { |
| 215 | ret = INTR_TYPE_INVAL; |
Varun Wadekar | c6c386d | 2016-05-20 16:21:22 -0700 | [diff] [blame] | 216 | } |
| 217 | } |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 218 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 219 | return ret; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | /******************************************************************************* |
| 223 | * This function returns the id of the highest priority pending interrupt at |
| 224 | * the GIC cpu interface. INTR_ID_UNAVAILABLE is returned when there is no |
| 225 | * interrupt pending. |
| 226 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 227 | static uint32_t tegra_gic_get_pending_interrupt_id(void) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 228 | { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 229 | uint32_t id, ret; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 230 | |
| 231 | id = gicc_read_hppir(TEGRA_GICC_BASE) & INT_ID_MASK; |
| 232 | |
Antonio Nino Diaz | f94e40d | 2017-09-14 15:57:44 +0100 | [diff] [blame] | 233 | if (id < 1022U) { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 234 | ret = id; |
Antonio Nino Diaz | f94e40d | 2017-09-14 15:57:44 +0100 | [diff] [blame] | 235 | } else if (id == 1023U) { |
| 236 | ret = 0xFFFFFFFFU; /* INTR_ID_UNAVAILABLE */ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 237 | } else { |
| 238 | /* |
| 239 | * Find out which non-secure interrupt it is under the assumption that |
| 240 | * the GICC_CTLR.AckCtl bit is 0. |
| 241 | */ |
| 242 | ret = gicc_read_ahppir(TEGRA_GICC_BASE) & INT_ID_MASK; |
| 243 | } |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 244 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 245 | return ret; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | /******************************************************************************* |
| 249 | * This functions reads the GIC cpu interface Interrupt Acknowledge register |
| 250 | * to start handling the pending interrupt. It returns the contents of the IAR. |
| 251 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 252 | static uint32_t tegra_gic_acknowledge_interrupt(void) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 253 | { |
| 254 | return gicc_read_IAR(TEGRA_GICC_BASE); |
| 255 | } |
| 256 | |
| 257 | /******************************************************************************* |
| 258 | * This functions writes the GIC cpu interface End Of Interrupt register with |
| 259 | * the passed value to finish handling the active interrupt |
| 260 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 261 | static void tegra_gic_end_of_interrupt(uint32_t id) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 262 | { |
| 263 | gicc_write_EOIR(TEGRA_GICC_BASE, id); |
| 264 | } |
| 265 | |
| 266 | /******************************************************************************* |
| 267 | * This function returns the type of the interrupt id depending upon the group |
| 268 | * this interrupt has been configured under by the interrupt controller i.e. |
| 269 | * group0 or group1. |
| 270 | ******************************************************************************/ |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 271 | static uint32_t tegra_gic_get_interrupt_type(uint32_t id) |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 272 | { |
| 273 | uint32_t group; |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 274 | uint32_t index; |
| 275 | uint32_t ret = INTR_TYPE_NS; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 276 | |
| 277 | group = gicd_get_igroupr(TEGRA_GICD_BASE, id); |
| 278 | |
Varun Wadekar | c6c386d | 2016-05-20 16:21:22 -0700 | [diff] [blame] | 279 | /* get the interrupt type */ |
| 280 | if (group == GRP0) { |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 281 | for (index = 0U; index < g_num_irqs; index++) { |
| 282 | if (id == g_irq_sec_ptr[index].irq) { |
| 283 | ret = g_irq_sec_ptr[index].type; |
| 284 | break; |
| 285 | } |
Varun Wadekar | c6c386d | 2016-05-20 16:21:22 -0700 | [diff] [blame] | 286 | } |
| 287 | } |
| 288 | |
Varun Wadekar | ca87293 | 2017-05-25 18:06:59 -0700 | [diff] [blame] | 289 | return ret; |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 290 | } |
| 291 | |
Varun Wadekar | d3a4150 | 2015-06-16 11:23:00 +0530 | [diff] [blame] | 292 | uint32_t plat_ic_get_pending_interrupt_id(void) |
| 293 | { |
| 294 | return tegra_gic_get_pending_interrupt_id(); |
| 295 | } |
| 296 | |
| 297 | uint32_t plat_ic_get_pending_interrupt_type(void) |
| 298 | { |
| 299 | return tegra_gic_get_pending_interrupt_type(); |
| 300 | } |
| 301 | |
| 302 | uint32_t plat_ic_acknowledge_interrupt(void) |
| 303 | { |
| 304 | return tegra_gic_acknowledge_interrupt(); |
| 305 | } |
| 306 | |
| 307 | uint32_t plat_ic_get_interrupt_type(uint32_t id) |
| 308 | { |
| 309 | return tegra_gic_get_interrupt_type(id); |
| 310 | } |
| 311 | |
| 312 | void plat_ic_end_of_interrupt(uint32_t id) |
| 313 | { |
| 314 | tegra_gic_end_of_interrupt(id); |
| 315 | } |
| 316 | |
| 317 | uint32_t plat_interrupt_type_to_line(uint32_t type, |
| 318 | uint32_t security_state) |
| 319 | { |
| 320 | return tegra_gic_interrupt_type_to_line(type, security_state); |
| 321 | } |