From 40e911cb4c049d627e83e8bb6efb9bbc41ef6b45 Mon Sep 17 00:00:00 2001
From: Nitin Garg <nitin.garg@nxp.com>
Date: Thu, 15 Feb 2018 15:30:51 -0600
Subject: [PATCH] MLK-17597-1: i.MX8MQ workaround affecting other SoCs

Fix iMX8MQ workaround to be specific to that
machine.

Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
(cherry picked from commit 5fc3246190546c455f47fa3094ee717bd84a167c)
---
 drivers/irqchip/irq-gic-v3.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index de708816b74e6e..ee57409f5ea553 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1327,8 +1327,11 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
 		rdist_regs[i].phys_base = res.start;
 	}
 
-	/* sw workaround for IPI can't wakeup CORE ERRATA(ERR011171) on i.MX8MQ */
-	iomuxc_gpr_base = of_iomap(node, 2);
+	if (of_machine_is_compatible("fsl,imx8mq")) {
+		/* sw workaround for IPI can't wakeup CORE
+		   ERRATA(ERR011171) on i.MX8MQ */
+		iomuxc_gpr_base = of_iomap(node, 2);
+	}
 
 	if (of_property_read_u64(node, "redistributor-stride", &redist_stride))
 		redist_stride = 0;
-- 
GitLab