diff options
author | Chen-Yu Tsai <wens@csie.org> | 2017-06-06 13:59:24 +0800 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-06-22 14:06:17 +0100 |
commit | e3ece0d5a31a588ced938d09f30c870ed9b2a2a6 (patch) | |
tree | 8e5f95d3f0d06fa65914990de03888a8dc5ae42b /drivers/irqchip/irq-sunxi-nmi.c | |
parent | 9ce18f6f0b0c7463fcdce70c35db17a891adc90d (diff) | |
download | talos-op-linux-e3ece0d5a31a588ced938d09f30c870ed9b2a2a6.tar.gz talos-op-linux-e3ece0d5a31a588ced938d09f30c870ed9b2a2a6.zip |
irqchip/sunxi-nmi: Document interrupt disabling and clearing at probe time
The sunxi-nmi disables all its interrupts and clears any pending
interrupts at probe time.
Add comments documenting it, just to make it clear.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip/irq-sunxi-nmi.c')
-rw-r--r-- | drivers/irqchip/irq-sunxi-nmi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c index 177efb473c7d..9a7f6971cc3a 100644 --- a/drivers/irqchip/irq-sunxi-nmi.c +++ b/drivers/irqchip/irq-sunxi-nmi.c @@ -201,7 +201,10 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node, gc->chip_types[1].regs.type = reg_offs->ctrl; gc->chip_types[1].handler = handle_edge_irq; + /* Disable any active interrupts */ sunxi_sc_nmi_write(gc, reg_offs->enable, 0); + + /* Clear any pending NMI interrupts */ sunxi_sc_nmi_write(gc, reg_offs->pend, SUNXI_NMI_IRQ_BIT); irq_set_chained_handler_and_data(irq, sunxi_sc_nmi_handle_irq, domain); |