There are firmware tables out describing the ITS but does not support
LPIs. This will result to a data abort when trying to initialize ITS.
While this can be consider a bug in the Device-Tree, same configuration
boots on Linux. So gate the ITS initialization with the support of LPIs
in the distributor.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
}
#endif
+static bool gic_dist_supports_lpis(void)
+{
+ return (readl_relaxed(GICD + GICD_TYPER) & GICD_TYPE_LPIS);
+}
+
/* Set up the GIC */
static int __init gicv3_init(void)
{
gicv3_dist_init();
- res = gicv3_its_init();
- if ( res )
- panic("GICv3: ITS: initialization failed: %d\n", res);
+ if ( gic_dist_supports_lpis() )
+ {
+ res = gicv3_its_init();
+ if ( res )
+ panic("GICv3: ITS: initialization failed: %d\n", res);
+ }
res = gicv3_cpu_init();
if ( res )