summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-sunxi-nmi.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2015-12-03 11:20:12 +0300
committerJason Cooper <jason@lakedaemon.net>2015-12-03 15:54:11 +0300
commitbbbb03c1a82eea24e9b15b2f96ecb0cc882ddd2c (patch)
treeb4c7dca36a1e3427ae6717cdc2f7a1bc856ac2f4 /drivers/irqchip/irq-sunxi-nmi.c
parentcc66ef3c3923f8d2287c11e0a76ee2b68dc3e64a (diff)
downloadlinux-bbbb03c1a82eea24e9b15b2f96ecb0cc882ddd2c.tar.xz
irqchip/sunxi-nmi: Support sun9i A80 NMI controller
The A80 moves the NMI controller into the PRCM address space, and also rearranges the registers. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lkml.kernel.org/r/1449130813-22400-4-git-send-email-wens@csie.org Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/irqchip/irq-sunxi-nmi.c')
-rw-r--r--drivers/irqchip/irq-sunxi-nmi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 4ef178078e5b..0820f67cc9a7 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -50,6 +50,12 @@ static struct sunxi_sc_nmi_reg_offs sun6i_reg_offs = {
.enable = 0x34,
};
+static struct sunxi_sc_nmi_reg_offs sun9i_reg_offs = {
+ .ctrl = 0x00,
+ .pend = 0x08,
+ .enable = 0x04,
+};
+
static inline void sunxi_sc_nmi_write(struct irq_chip_generic *gc, u32 off,
u32 val)
{
@@ -207,3 +213,10 @@ static int __init sun7i_sc_nmi_irq_init(struct device_node *node,
return sunxi_sc_nmi_irq_init(node, &sun7i_reg_offs);
}
IRQCHIP_DECLARE(sun7i_sc_nmi, "allwinner,sun7i-a20-sc-nmi", sun7i_sc_nmi_irq_init);
+
+static int __init sun9i_nmi_irq_init(struct device_node *node,
+ struct device_node *parent)
+{
+ return sunxi_sc_nmi_irq_init(node, &sun9i_reg_offs);
+}
+IRQCHIP_DECLARE(sun9i_nmi, "allwinner,sun9i-a80-nmi", sun9i_nmi_irq_init);