From 0b985f29304dcb9d644174edacb67298e8049d4f Mon Sep 17 00:00:00 2001
From: Kever Yang <kever.yang@rock-chips.com>
Date: Thu, 18 Mar 2021 20:15:23 +0800
Subject: [PATCH] irqchip/gic-v3-its: force to config its tables as
 no-inner-cache in rk3588

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
---
 drivers/irqchip/irq-gic-v3-its.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2385,7 +2385,8 @@ retry_baser:
 	tmp = baser->val;
 
 	if (of_machine_is_compatible("rockchip,rk3568") ||
-	    of_machine_is_compatible("rockchip,rk3566")) {
+	    of_machine_is_compatible("rockchip,rk3566") ||
+	    of_machine_is_compatible("rockchip,rk3588")) {
 		if (tmp & GITS_BASER_SHAREABILITY_MASK)
 			tmp &= ~GITS_BASER_SHAREABILITY_MASK;
 		else
@@ -3134,7 +3135,8 @@ static void its_cpu_init_lpis(void)
 	tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);
 
 	if (of_machine_is_compatible("rockchip,rk3568") ||
-	    of_machine_is_compatible("rockchip,rk3566"))
+	    of_machine_is_compatible("rockchip,rk3566") ||
+	    of_machine_is_compatible("rockchip,rk3588"))
 		tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
 
 	if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
@@ -3162,7 +3164,8 @@ static void its_cpu_init_lpis(void)
 	tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);
 
 	if (of_machine_is_compatible("rockchip,rk3568") ||
-	    of_machine_is_compatible("rockchip,rk3566"))
+	    of_machine_is_compatible("rockchip,rk3566") ||
+	    of_machine_is_compatible("rockchip,rk3588"))
 		tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
 
 	if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
@@ -5127,7 +5130,8 @@ static int __init its_probe_one(struct r
 	tmp = gits_read_cbaser(its->base + GITS_CBASER);
 
 	if (of_machine_is_compatible("rockchip,rk3568") ||
-	    of_machine_is_compatible("rockchip,rk3566"))
+	    of_machine_is_compatible("rockchip,rk3566") ||
+	    of_machine_is_compatible("rockchip,rk3588"))
 		tmp &= ~GITS_CBASER_SHAREABILITY_MASK;
 
 	if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {
