提交 472eaf8b 编写于 作者: A Abhijeet Dharmapurikar 提交者: Greg Kroah-Hartman

spmi: pmic-arb: check apid enabled before calling the handler

The driver currently invokes the apid handler (periph_handler())
once it sees that the summary status bit for that apid is set.

However the hardware is designed to set that bit even if the apid
interrupts are disabled. The driver should check whether the apid
is indeed enabled before calling the apid handler.
Signed-off-by: NAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: NKiran Gunda <kgunda@codeaurora.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5f9b2ea3
......@@ -536,8 +536,8 @@ static void pmic_arb_chained_irq(struct irq_desc *desc)
void __iomem *intr = pa->intr;
int first = pa->min_apid >> 5;
int last = pa->max_apid >> 5;
u32 status;
int i, id;
u32 status, enable;
int i, id, apid;
chained_irq_enter(chip, desc);
......@@ -547,7 +547,11 @@ static void pmic_arb_chained_irq(struct irq_desc *desc)
while (status) {
id = ffs(status) - 1;
status &= ~BIT(id);
periph_interrupt(pa, id + i * 32);
apid = id + i * 32;
enable = readl_relaxed(intr +
pa->ver_ops->acc_enable(apid));
if (enable & SPMI_PIC_ACC_ENABLE_BIT)
periph_interrupt(pa, apid);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册