svn commit: r354488 - head/sys/arm/broadcom/bcm2835

Kyle Evans kevans at FreeBSD.org
Thu Nov 7 21:31:16 UTC 2019


Author: kevans
Date: Thu Nov  7 21:31:15 2019
New Revision: 354488
URL: https://svnweb.freebsd.org/changeset/base/354488

Log:
  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.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2836.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2836.c	Thu Nov  7 21:30:27 2019	(r354487)
+++ head/sys/arm/broadcom/bcm2835/bcm2836.c	Thu Nov  7 21:31:15 2019	(r354488)
@@ -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);
 }


More information about the svn-src-head mailing list