[<prev] [next>] [day] [month] [year] [list]
Message-ID: <174056783904.10177.12923814398050084958.tip-bot2@tip-bot2>
Date: Wed, 26 Feb 2025 11:03:59 -0000
From: "tip-bot2 for Biju Das" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Biju Das <biju.das.jz@...renesas.com>,
Thomas Gleixner <tglx@...utronix.de>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Tommaso Merciai <tommaso.merciai.xr@...renesas.com>,
Geert Uytterhoeven <geert+renesas@...der.be>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: irq/drivers] irqchip/renesas-rzv2h: Add max_tssel to struct
rzv2h_hw_info
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: eb23d23d082d097e2a8154a57da72061cb7e33b3
Gitweb: https://git.kernel.org/tip/eb23d23d082d097e2a8154a57da72061cb7e33b3
Author: Biju Das <biju.das.jz@...renesas.com>
AuthorDate: Mon, 24 Feb 2025 13:11:24
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 26 Feb 2025 11:59:50 +01:00
irqchip/renesas-rzv2h: Add max_tssel to struct rzv2h_hw_info
The number of GPIO interrupts on RZ/G3E for TINT selection is 141 compared
to 86 on RZ/V2H. Rename the macro ICU_PB5_TINT->ICU_RZV2H_TSSEL_MAX_VAL to
hold this difference for RZ/V2H.
Add max_tssel to struct rzv2h_hw_info and replace the hardcoded constants
in the code.
Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Link: https://lore.kernel.org/all/20250224131253.134199-9-biju.das.jz@bp.renesas.com
---
drivers/irqchip/irq-renesas-rzv2h.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c
index 43b805b..2fae327 100644
--- a/drivers/irqchip/irq-renesas-rzv2h.c
+++ b/drivers/irqchip/irq-renesas-rzv2h.c
@@ -78,14 +78,16 @@
#define ICU_TINT_EXTRACT_HWIRQ(x) FIELD_GET(GENMASK(15, 0), (x))
#define ICU_TINT_EXTRACT_GPIOINT(x) FIELD_GET(GENMASK(31, 16), (x))
-#define ICU_PB5_TINT 0x55
+#define ICU_RZV2H_TSSEL_MAX_VAL 0x55
/**
* struct rzv2h_hw_info - Interrupt Control Unit controller hardware info structure.
* @t_offs: TINT offset
+ * @max_tssel: TSSEL max value
*/
struct rzv2h_hw_info {
u16 t_offs;
+ u8 max_tssel;
};
/**
@@ -298,13 +300,12 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
return -EINVAL;
}
+ priv = irq_data_to_priv(d);
tint = (u32)(uintptr_t)irq_data_get_irq_chip_data(d);
- if (tint > ICU_PB5_TINT)
+ if (tint > priv->info->max_tssel)
return -EINVAL;
- priv = irq_data_to_priv(d);
hwirq = irqd_to_hwirq(d);
-
tint_nr = hwirq - ICU_TINT_START;
tssr_k = ICU_TSSR_K(tint_nr);
@@ -517,6 +518,7 @@ pm_put:
static const struct rzv2h_hw_info rzv2h_hw_params = {
.t_offs = 0,
+ .max_tssel = ICU_RZV2H_TSSEL_MAX_VAL,
};
static int rzv2h_icu_init(struct device_node *node, struct device_node *parent)
Powered by blists - more mailing lists