[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180910121306.168536-1-lkundrak@v3.sk>
Date: Mon, 10 Sep 2018 14:13:06 +0200
From: Lubomir Rintel <lkundrak@...sk>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
Lubomir Rintel <lkundrak@...sk>
Subject: [PATCH] irqchip/mmp: use cpu_is_pj4() instead of CONFIG_CPU_MMP2
CONFIG_CPU_MMP2 is not there on multiplatform kernels with MACH_MMP2_DT.
The MMP2 platform uses the PJ4 CPU.
Signed-off-by: Lubomir Rintel <lkundrak@...sk>
---
drivers/irqchip/irq-mmp.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index 25f32e1d7764..10aa2b553145 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -22,6 +22,7 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <asm/cputype.h>
#include <asm/exception.h>
#include <asm/hardirq.h>
@@ -74,11 +75,11 @@ static void icu_mask_ack_irq(struct irq_data *d)
r |= data->conf_disable;
writel_relaxed(r, mmp_icu_base + (hwirq << 2));
} else {
-#ifdef CONFIG_CPU_MMP2
- if ((data->virq_base == data->clr_mfp_irq_base)
- && (hwirq == data->clr_mfp_hwirq))
- mmp2_clear_pmic_int();
-#endif
+ if (cpu_is_pj4()) {
+ if ((data->virq_base == data->clr_mfp_irq_base)
+ && (hwirq == data->clr_mfp_hwirq))
+ mmp2_clear_pmic_int();
+ }
r = readl_relaxed(data->reg_mask) | (1 << hwirq);
writel_relaxed(r, data->reg_mask);
}
--
2.17.1
Powered by blists - more mailing lists