Thread (23 messages) 23 messages, 2 authors, 2018-11-20

[RFC PATCH v2 05/14] irqchip/sun4i: add support for suniv interrupt controller

From: Maxime Ripard <hidden>
Date: 2018-11-20 08:48:29
Also in: linux-clk, linux-devicetree, linux-gpio, lkml

Hi,

On Sun, Nov 18, 2018 at 05:17:04PM +0300, Mesih Kilinc wrote:
quoted hunk ↗ jump to hunk
The new F-series SoCs (suniv) from Allwinner use an stripped version of
the interrupt controller in A10/A13.

Add support for it in irq-sun4i driver.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Mesih Kilinc <redacted>
---
 drivers/irqchip/irq-sun4i.c | 47 ++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 42 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index e3e5b91..2abf662 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -23,13 +23,26 @@
 
 #include <asm/exception.h>
 
+enum sun4i_irq_type {
+	sun4i_ic,
+	suniv_ic
+};
+
+static enum sun4i_irq_type sun4i_irq_type;
You don't really need that type. It's completely redundant with the
compatible.
+static int sun4i_irq_enable_reg_offset;
+static int sun4i_irq_mask_reg_offset;
Ideally, this should be a structure so that we can easily extend it
without adding more and more global variables. And the type shouldn't
be signed.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/f43113d5/attachment-0001.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help