linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v4 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt
@ 2020-11-30 10:15 Biwen Li
  2020-11-30 10:15 ` [v4 02/11] arm64: dts: ls1043a: add DT node for external interrupt lines Biwen Li
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: Biwen Li @ 2020-11-30 10:15 UTC (permalink / raw)
  To: linux, shawnguo, robh+dt, mark.rutland, leoyang.li, zhiqiang.hou,
	tglx, jason, maz
  Cc: devicetree, linux-kernel, jiafei.pan, xiaobo.xie,
	linux-arm-kernel, Hou Zhiqiang, Biwen Li

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Add an new IRQ chip declaration for LS1043A and LS1088A
- compatible "fsl,ls1043a-extirq" for LS1043A, LS1046A.
- compatible "fsl,ls1088a-extirq" for LS1088A, LS208xA, LX216xA.
- get mask value directly according to compatible property of DT
  and remove confused code(bit_reverse field of struct ls_extirq_data,
  no need this field for SoC LS1021A. Because the register
  LS1021A_SCFGREVCR is initialized to 0xffffffff by the relative rcw)

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
---
Change in v4:
	- fix warning when checking patch
	- simplify code
	- update commit message

Change in v3:
	- cleanup code
	- remove robust copyright

Change in v2:
	- add despcription of bit reverse
	- update copyright

 drivers/irqchip/irq-ls-extirq.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/irqchip/irq-ls-extirq.c b/drivers/irqchip/irq-ls-extirq.c
index 4d1179fed77c..f94f974a8764 100644
--- a/drivers/irqchip/irq-ls-extirq.c
+++ b/drivers/irqchip/irq-ls-extirq.c
@@ -18,7 +18,7 @@
 struct ls_extirq_data {
 	struct regmap		*syscon;
 	u32			intpcr;
-	bool			bit_reverse;
+	bool			is_ls1021a_or_ls1043a;
 	u32			nirq;
 	struct irq_fwspec	map[MAXIRQ];
 };
@@ -30,7 +30,7 @@ ls_extirq_set_type(struct irq_data *data, unsigned int type)
 	irq_hw_number_t hwirq = data->hwirq;
 	u32 value, mask;
 
-	if (priv->bit_reverse)
+	if (priv->is_ls1021a_or_ls1043a)
 		mask = 1U << (31 - hwirq);
 	else
 		mask = 1U << hwirq;
@@ -174,14 +174,8 @@ ls_extirq_of_init(struct device_node *node, struct device_node *parent)
 	if (ret)
 		goto out;
 
-	if (of_device_is_compatible(node, "fsl,ls1021a-extirq")) {
-		u32 revcr;
-
-		ret = regmap_read(priv->syscon, LS1021A_SCFGREVCR, &revcr);
-		if (ret)
-			goto out;
-		priv->bit_reverse = (revcr != 0);
-	}
+	priv->is_ls1021a_or_ls1043a = of_device_is_compatible(node, "fsl,ls1021a-extirq") ||
+				      of_device_is_compatible(node, "fsl,ls1043a-extirq");
 
 	domain = irq_domain_add_hierarchy(parent_domain, 0, priv->nirq, node,
 					  &extirq_domain_ops, priv);
@@ -195,3 +189,5 @@ ls_extirq_of_init(struct device_node *node, struct device_node *parent)
 }
 
 IRQCHIP_DECLARE(ls1021a_extirq, "fsl,ls1021a-extirq", ls_extirq_of_init);
+IRQCHIP_DECLARE(ls1043a_extirq, "fsl,ls1043a-extirq", ls_extirq_of_init);
+IRQCHIP_DECLARE(ls1088a_extirq, "fsl,ls1088a-extirq", ls_extirq_of_init);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-05  1:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 10:15 [v4 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Biwen Li
2020-11-30 10:15 ` [v4 02/11] arm64: dts: ls1043a: add DT node for external interrupt lines Biwen Li
2021-01-05  1:45   ` Shawn Guo
2020-11-30 10:15 ` [v4 03/11] arm64: dts: ls1046a: " Biwen Li
2020-11-30 10:15 ` [v4 04/11] arm64: dts: ls1046ardb: Add interrupt line for RTC node Biwen Li
2020-11-30 10:15 ` [v4 05/11] arm64: dts: ls1088a: add DT node for external interrupt lines Biwen Li
2020-11-30 10:15 ` [v4 06/11] arm64: dts: ls1088ardb: fix interrupt line for RTC node Biwen Li
2020-11-30 10:15 ` [v4 07/11] arm64: dts: ls208xa: add DT node for external interrupt lines Biwen Li
2020-11-30 10:15 ` [v4 08/11] arm64: dts: ls208xa-rdb: add interrupt line for RTC node Biwen Li
2020-11-30 10:15 ` [v4 09/11] arm64: dts: lx2160a: add DT node for external interrupt lines Biwen Li
2020-11-30 10:15 ` [v4 10/11] arm64: dts: lx2160ardb: fix interrupt line for RTC node Biwen Li
2020-11-30 10:15 ` [v4 11/11] dt-bindings: interrupt-controller: update bindings for supporting more SoCs Biwen Li
2020-12-01  2:09   ` Rob Herring
2020-12-11 14:58   ` [irqchip: irq/irqchip-next] " irqchip-bot for Biwen Li
2020-12-11 14:58 ` [irqchip: irq/irqchip-next] irqchip/ls-extirq: Add LS1043A, LS1088A external interrupt support irqchip-bot for Hou Zhiqiang
2020-12-11 15:01 ` [v4 01/11] irqchip: ls-extirq: Add LS1043A, LS1088A external interrupt Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).