plat/nvidia/tegra/common/tegra_gic.c
/*******************************************************************************
 * This function returns the type of the highest priority pending interrupt at
 * the GIC cpu interface. INTR_TYPE_INVAL is returned when there is no
 * interrupt pending.
 ******************************************************************************/
This function returns the type of the highest priority pending interrupt at
the GIC cpu interface. INTR_TYPE_INVAL is returned when there is no
interrupt pending.
This function returns the type of the highest priority pending interrupt at the GIC cpu interface . INTR_TYPE_INVAL is returned when there is no interrupt pending .
static uint32_t tegra_gic_get_pending_interrupt_type(void)
{
	uint32_t id;
	uint32_t index;
	uint32_t ret = INTR_TYPE_NS;
	id = gicc_read_hppir(TEGRA_GICC_BASE) & INT_ID_MASK;
	if (id < 1022U) {
		for (index = 0U; index < g_num_irqs; index++) {
			if (id == g_irq_sec_ptr[index].irq) {
				ret = g_irq_sec_ptr[index].type;
				break;
			}
		}
	} else {
		 if (id == GIC_SPURIOUS_INTERRUPT) {
			ret = INTR_TYPE_INVAL;
		}
	}
	return ret;
}
static uint32_t tegra_gic_get_pending_interrupt_type ( void ) { uint32_t id ; uint32_t index ; uint32_t ret = INTR_TYPE_NS ; id = gicc_read_hppir ( TEGRA_GICC_BASE ) & INT_ID_MASK ; if ( id < 1022U ) { for ( index = 0U ; index < g_num_irqs ; index ++ ) { if ( id == g_irq_sec_ptr [ index ] . irq ) { ret = g_irq_sec_ptr [ index ] . type ; break ; } } } else { if ( id == GIC_SPURIOUS_INTERRUPT ) { ret = INTR_TYPE_INVAL ; } } return ret ; }
This function returns the type of the highest priority pending interrupt at
 the GIC cpu interface.
This function returns the type of the highest priority pending interrupt at the GIC cpu interface .
/* get the interrupt type */