bcm_lintc: don't attach if "interrupt-controller" is missing

This is a standard required property for interrupt controllers, and present
on the bcm_lintc nodes for currently supported RPi models. For the RPi4, we
have both bcm_lintc as well as GIC-400, but only one may be active at a
time.

Don't probe bcm_lintc if it's missing the "interrupt-controller" property --
in RPi 4 DTS, the bcm_lintc node is actually missing this along with other
required interrupt properties. Presumably, if the earlier boot stages will
support switching to the legacy interrupt controller (as is suggested
possible by the documentation), the DTS will need to be updated to indicate
the proper interrupt-parent and hopefully also mark this node as an
interrupt-controller instead.
This commit is contained in:
Kyle Evans 2019-11-07 21:31:15 +00:00
parent 43e8b279b8
commit 63f34d0109
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354488

View File

@ -660,6 +660,8 @@ bcm_lintc_probe(device_t dev)
if (!ofw_bus_is_compatible(dev, "brcm,bcm2836-l1-intc"))
return (ENXIO);
if (!ofw_bus_has_prop(dev, "interrupt-controller"))
return (ENXIO);
device_set_desc(dev, "BCM2836 Interrupt Controller");
return (BUS_PROBE_DEFAULT);
}