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

From: Lubomir Rintel
Date: Mon Sep 17 2018 - 09:57:14 EST


On Mon, 2018-09-10 at 14:13 +0200, Lubomir Rintel wrote:
> CONFIG_CPU_MMP2 is not there on multiplatform kernels with
> MACH_MMP2_DT.
> The MMP2 platform uses the PJ4 CPU.

Actually, this patch breaks the DT-only build.

Please ignore it, sorry for the noise.

Lubo

>
> 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);
> }