Skip to content

Commit

Permalink
irqchip/gic-v3-its: force to config its tables as no-inner-cache in r…
Browse files Browse the repository at this point in the history
…k3588

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I7275cbf011061f11968505a7570230d2d789e9fc
  • Loading branch information
keveryang authored and rkhuangtao committed Oct 13, 2021
1 parent 6588d22 commit 0b985f2
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions drivers/irqchip/irq-gic-v3-its.c
Expand Up @@ -2354,8 +2354,10 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
its_write_baser(its, baser, val);
tmp = baser->val;

if (of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566")) {
if (IS_ENABLED(CONFIG_NO_GKI) &&
(of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566") ||
of_machine_is_compatible("rockchip,rk3588"))) {
if (tmp & GITS_BASER_SHAREABILITY_MASK)
tmp &= ~GITS_BASER_SHAREABILITY_MASK;
else
Expand Down Expand Up @@ -3093,8 +3095,10 @@ static void its_cpu_init_lpis(void)
gicr_write_propbaser(val, rbase + GICR_PROPBASER);
tmp = gicr_read_propbaser(rbase + GICR_PROPBASER);

if (of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566"))
if (IS_ENABLED(CONFIG_NO_GKI) &&
(of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566") ||
of_machine_is_compatible("rockchip,rk3588")))
tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;

if ((tmp ^ val) & GICR_PROPBASER_SHAREABILITY_MASK) {
Expand All @@ -3121,8 +3125,10 @@ static void its_cpu_init_lpis(void)
gicr_write_pendbaser(val, rbase + GICR_PENDBASER);
tmp = gicr_read_pendbaser(rbase + GICR_PENDBASER);

if (of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566"))
if (IS_ENABLED(CONFIG_NO_GKI) &&
(of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566") ||
of_machine_is_compatible("rockchip,rk3588")))
tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;

if (!(tmp & GICR_PENDBASER_SHAREABILITY_MASK)) {
Expand Down Expand Up @@ -5084,8 +5090,10 @@ static int __init its_probe_one(struct resource *res,
gits_write_cbaser(baser, its->base + GITS_CBASER);
tmp = gits_read_cbaser(its->base + GITS_CBASER);

if (of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566"))
if (IS_ENABLED(CONFIG_NO_GKI) &&
(of_machine_is_compatible("rockchip,rk3568") ||
of_machine_is_compatible("rockchip,rk3566") ||
of_machine_is_compatible("rockchip,rk3588")))
tmp &= ~GITS_CBASER_SHAREABILITY_MASK;

if ((tmp ^ baser) & GITS_CBASER_SHAREABILITY_MASK) {
Expand Down

0 comments on commit 0b985f2

Please sign in to comment.