drivers: interrupt_controller: gicv3: Skip typr for SGI

SGI are always edge triggered. Interrupt type configuration
is not available for SGI.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
This commit is contained in:
Sandeep Tripathy 2020-06-12 20:33:53 +05:30 committed by Anas Nashif
commit 2e42a7028d

View file

@ -54,15 +54,17 @@ void arm_gic_irq_set_priority(unsigned int intid,
sys_write8(prio & GIC_PRI_MASK, IPRIORITYR(base, intid));
/* Interrupt type config */
idx = intid / GIC_NUM_CFG_PER_REG;
shift = (intid & (GIC_NUM_CFG_PER_REG - 1)) * 2;
if (!GIC_IS_SGI(intid)) {
idx = intid / GIC_NUM_CFG_PER_REG;
shift = (intid & (GIC_NUM_CFG_PER_REG - 1)) * 2;
val = sys_read32(ICFGR(base, idx));
val &= ~(GICD_ICFGR_MASK << shift);
if (flags & IRQ_TYPE_EDGE) {
val |= (GICD_ICFGR_TYPE << shift);
val = sys_read32(ICFGR(base, idx));
val &= ~(GICD_ICFGR_MASK << shift);
if (flags & IRQ_TYPE_EDGE) {
val |= (GICD_ICFGR_TYPE << shift);
}
sys_write32(val, ICFGR(base, idx));
}
sys_write32(val, ICFGR(base, idx));
}
void arm_gic_irq_enable(unsigned int intid)