mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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
This commit is contained in:
committed by
Marc Zyngier
parent
f9ac7bbd6e
commit
b388bdf2ba
@@ -71,8 +71,7 @@ struct intc_irqpin_priv {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct intc_irqpin_config {
|
struct intc_irqpin_config {
|
||||||
unsigned int irlm_bit;
|
int irlm_bit; /* -1 if non-existent */
|
||||||
unsigned needs_irlm:1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned long intc_irqpin_read32(void __iomem *iomem)
|
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 = {
|
static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = {
|
||||||
.irlm_bit = 23, /* ICR0.IRLM0 */
|
.irlm_bit = 23, /* ICR0.IRLM0 */
|
||||||
.needs_irlm = 1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct intc_irqpin_config intc_irqpin_rmobile = {
|
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[] = {
|
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 */
|
/* configure "individual IRQ mode" where needed */
|
||||||
if (config && config->needs_irlm) {
|
if (config && config->irlm_bit >= 0) {
|
||||||
if (io[INTC_IRQPIN_REG_IRLM])
|
if (io[INTC_IRQPIN_REG_IRLM])
|
||||||
intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM,
|
intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM,
|
||||||
config->irlm_bit, 1, 1);
|
config->irlm_bit, 1, 1);
|
||||||
|
Reference in New Issue
Block a user