Skip to content

Commit b388bdf

Browse files
geertuMarc Zyngier
authored andcommitted
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
1 parent f9ac7bb commit b388bdf

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

drivers/irqchip/irq-renesas-intc-irqpin.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ struct intc_irqpin_priv {
7171
};
7272

7373
struct intc_irqpin_config {
74-
unsigned int irlm_bit;
75-
unsigned needs_irlm:1;
74+
int irlm_bit; /* -1 if non-existent */
7675
};
7776

7877
static unsigned long intc_irqpin_read32(void __iomem *iomem)
@@ -349,11 +348,10 @@ static const struct irq_domain_ops intc_irqpin_irq_domain_ops = {
349348

350349
static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = {
351350
.irlm_bit = 23, /* ICR0.IRLM0 */
352-
.needs_irlm = 1,
353351
};
354352

355353
static const struct intc_irqpin_config intc_irqpin_rmobile = {
356-
.needs_irlm = 0,
354+
.irlm_bit = -1,
357355
};
358356

359357
static const struct of_device_id intc_irqpin_dt_ids[] = {
@@ -470,7 +468,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
470468
}
471469

472470
/* configure "individual IRQ mode" where needed */
473-
if (config && config->needs_irlm) {
471+
if (config && config->irlm_bit >= 0) {
474472
if (io[INTC_IRQPIN_REG_IRLM])
475473
intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM,
476474
config->irlm_bit, 1, 1);

0 commit comments

Comments
 (0)