* Copyright 2019 Broadcom.
*/
#include <common.h>
+#include <cpu_func.h>
#include <dm.h>
#include <regmap.h>
#include <syscon.h>
int i;
u64 redist_lpi_base;
u64 pend_base;
+ ulong pend_tab_total_sz;
+ void *pend_tab_va;
if (gic_v3_its_get_gic_addr(&priv))
return -EINVAL;
}
redist_lpi_base = priv.lpi_base + LPI_PROPBASE_SZ;
+ pend_tab_total_sz = priv.num_redist * LPI_PENDBASE_SZ;
+ pend_tab_va = map_physmem(redist_lpi_base, pend_tab_total_sz,
+ MAP_NOCACHE);
+ memset(pend_tab_va, 0, pend_tab_total_sz);
+ flush_cache((ulong)pend_tab_va, pend_tab_total_sz);
+ unmap_physmem(pend_tab_va, MAP_NOCACHE);
pend_base = priv.gicr_base + GICR_PENDBASER;
for (i = 0; i < priv.num_redist; i++) {
val = ((redist_lpi_base + (i * LPI_PENDBASE_SZ)) |
GICR_PENDBASER_INNERSHAREABLE |
- GICR_PENDBASER_RAWAWB);
+ GICR_PENDBASER_RAWAWB |
+ GICR_PENDBASER_PTZ);
writeq(val, (uintptr_t)(pend_base + offset));
tmp = readq((uintptr_t)(pend_base + offset));