linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm
@ 2020-10-28 15:39 Geert Uytterhoeven
  2020-11-01 12:10 ` Marc Zyngier
  2020-11-01 17:00 ` [tip: irq/urgent] " tip-bot2 for Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-10-28 15:39 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier
  Cc: Ulrich Hecht, linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Get rid of the separate flag to indicate if the IRLM bit is present in
the INTC/Interrupt Control Register 0, by considering -1 an invalid
irlm_bit value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Tested on r8a7778/bock-w, r8a7779/marzen, r8a7740/armadillo. and
sh73a0/kzm9g.

 drivers/irqchip/irq-renesas-intc-irqpin.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 3819185bfd02c63f..cb7f60b3b4a920c2 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -71,8 +71,7 @@ struct intc_irqpin_priv {
 };
 
 struct intc_irqpin_config {
-	unsigned int irlm_bit;
-	unsigned needs_irlm:1;
+	int irlm_bit;		/* -1 if non-existent */
 };
 
 static unsigned long intc_irqpin_read32(void __iomem *iomem)
@@ -349,11 +348,10 @@ static const struct irq_domain_ops intc_irqpin_irq_domain_ops = {
 
 static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = {
 	.irlm_bit = 23, /* ICR0.IRLM0 */
-	.needs_irlm = 1,
 };
 
 static const struct intc_irqpin_config intc_irqpin_rmobile = {
-	.needs_irlm = 0,
+	.irlm_bit = -1,
 };
 
 static const struct of_device_id intc_irqpin_dt_ids[] = {
@@ -470,7 +468,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 	}
 
 	/* configure "individual IRQ mode" where needed */
-	if (config && config->needs_irlm) {
+	if (config && config->irlm_bit >= 0) {
 		if (io[INTC_IRQPIN_REG_IRLM])
 			intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM,
 						      config->irlm_bit, 1, 1);
-- 
2.25.1


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

* Re: [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm
  2020-10-28 15:39 [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm Geert Uytterhoeven
@ 2020-11-01 12:10 ` Marc Zyngier
  2020-11-01 17:00 ` [tip: irq/urgent] " tip-bot2 for Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2020-11-01 12:10 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Geert Uytterhoeven
  Cc: Ulrich Hecht, linux-kernel, linux-renesas-soc

On Wed, 28 Oct 2020 16:39:55 +0100, Geert Uytterhoeven wrote:
> Get rid of the separate flag to indicate if the IRLM bit is present in
> the INTC/Interrupt Control Register 0, by considering -1 an invalid
> irlm_bit value.

Applied to irq/irqchip-next, thanks!

[1/1] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm
      commit: b388bdf2bac7aedac9bde5ab63eaf7646f29fc00

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



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

* [tip: irq/urgent] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm
  2020-10-28 15:39 [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm Geert Uytterhoeven
  2020-11-01 12:10 ` Marc Zyngier
@ 2020-11-01 17:00 ` tip-bot2 for Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Geert Uytterhoeven @ 2020-11-01 17:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Geert Uytterhoeven, Marc Zyngier, x86, LKML

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     b388bdf2bac7aedac9bde5ab63eaf7646f29fc00
Gitweb:        https://git.kernel.org/tip/b388bdf2bac7aedac9bde5ab63eaf7646f29fc00
Author:        Geert Uytterhoeven <geert+renesas@glider.be>
AuthorDate:    Wed, 28 Oct 2020 16:39:55 +01:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Sun, 01 Nov 2020 11:59:22 

irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm

Get rid of the separate flag to indicate if the IRLM bit is present in
the INTC/Interrupt Control Register 0, by considering -1 an invalid
irlm_bit value.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201028153955.1736767-1-geert+renesas@glider.be
---
 drivers/irqchip/irq-renesas-intc-irqpin.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
index 3819185..cb7f60b 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
@@ -71,8 +71,7 @@ struct intc_irqpin_priv {
 };
 
 struct intc_irqpin_config {
-	unsigned int irlm_bit;
-	unsigned needs_irlm:1;
+	int irlm_bit;		/* -1 if non-existent */
 };
 
 static unsigned long intc_irqpin_read32(void __iomem *iomem)
@@ -349,11 +348,10 @@ static const struct irq_domain_ops intc_irqpin_irq_domain_ops = {
 
 static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = {
 	.irlm_bit = 23, /* ICR0.IRLM0 */
-	.needs_irlm = 1,
 };
 
 static const struct intc_irqpin_config intc_irqpin_rmobile = {
-	.needs_irlm = 0,
+	.irlm_bit = -1,
 };
 
 static const struct of_device_id intc_irqpin_dt_ids[] = {
@@ -470,7 +468,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
 	}
 
 	/* configure "individual IRQ mode" where needed */
-	if (config && config->needs_irlm) {
+	if (config && config->irlm_bit >= 0) {
 		if (io[INTC_IRQPIN_REG_IRLM])
 			intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM,
 						      config->irlm_bit, 1, 1);

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

end of thread, other threads:[~2020-11-01 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 15:39 [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm Geert Uytterhoeven
2020-11-01 12:10 ` Marc Zyngier
2020-11-01 17:00 ` [tip: irq/urgent] " tip-bot2 for Geert Uytterhoeven

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).