irqchip/imx-irqsteer: Support up to 960 input interrupts
The irqsteer IP routes groups of input interrupts to a dedicated system interrupt per group. Each group handles 64 input interrupts. The current driver is limited to 8 groups, i.e. 512 input interrupts, which is sufficient for the existing i.MX SoCs. The upcoming i.MX94 family extends the irqsteer IP to 15 groups, i.e. 960 interrupts. Extending the group limit to 15 enables this, but the new SoCs are not guaranteed to utilize all 15 groups. Unused groups have no mapping for the underlying output interrupt, which makes the probe function fail as it expects a valid mapping for each group output. Remove this limitation and stop the mapping loop, when no valid mapping is detected. [ tglx: Massage change log ] Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/all/20250305095522.2177843-1-ping.bai@nxp.com
This commit is contained in:
committed by
Thomas Gleixner
parent
922ac17c7b
commit
7db5fd6b75
@@ -24,7 +24,7 @@
|
||||
#define CHAN_MINTDIS(t) (CTRL_STRIDE_OFF(t, 3) + 0x4)
|
||||
#define CHAN_MASTRSTAT(t) (CTRL_STRIDE_OFF(t, 3) + 0x8)
|
||||
|
||||
#define CHAN_MAX_OUTPUT_INT 0x8
|
||||
#define CHAN_MAX_OUTPUT_INT 0xF
|
||||
|
||||
struct irqsteer_data {
|
||||
void __iomem *regs;
|
||||
@@ -228,10 +228,8 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
|
||||
|
||||
for (i = 0; i < data->irq_count; i++) {
|
||||
data->irq[i] = irq_of_parse_and_map(np, i);
|
||||
if (!data->irq[i]) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
if (!data->irq[i])
|
||||
break;
|
||||
|
||||
irq_set_chained_handler_and_data(data->irq[i],
|
||||
imx_irqsteer_irq_handler,
|
||||
@@ -254,9 +252,13 @@ static void imx_irqsteer_remove(struct platform_device *pdev)
|
||||
struct irqsteer_data *irqsteer_data = platform_get_drvdata(pdev);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < irqsteer_data->irq_count; i++)
|
||||
for (i = 0; i < irqsteer_data->irq_count; i++) {
|
||||
if (!irqsteer_data->irq[i])
|
||||
break;
|
||||
|
||||
irq_set_chained_handler_and_data(irqsteer_data->irq[i],
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
irq_domain_remove(irqsteer_data->domain);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user