[PATCH] irqchip/mmp: use cpu_is_pj4() instead of CONFIG_CPU_MMP2

From: Lubomir Rintel
Date: Mon Sep 10 2018 - 08:13:17 EST


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@xxxxx>
---
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