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

Oleksandr Tymoshenko gonzo at FreeBSD.org
Wed May 2 20:04:26 UTC 2018


Author: gonzo
Date: Wed May  2 20:04:25 2018
New Revision: 333177
URL: https://svnweb.freebsd.org/changeset/base/333177

Log:
  Unbreak RaspberryPi 2 boot after r332839
  
  r332839 changed number of cells per interrupt for local_intc from 1 to 2
  to pass type of IRQ. Driver expected only 1 cell so after r332839
  all interrupt children of local_intc failed to allocate IRQ resource.
  
  Fix this regression by relaxing check for number of cells in interrupt
  property to be either 1 or 2.
  
  PR:		227904

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

Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2836.c	Wed May  2 19:36:46 2018	(r333176)
+++ head/sys/arm/broadcom/bcm2835/bcm2836.c	Wed May  2 20:04:25 2018	(r333177)
@@ -454,8 +454,10 @@ bcm_lintc_map_intr(device_t dev, struct intr_map_data 
 		return (ENOTSUP);
 
 	daf = (struct intr_map_data_fdt *)data;
-	if (daf->ncells != 1 || daf->cells[0] >= BCM_LINTC_NIRQS)
+	if (daf->ncells > 2 || daf->cells[0] >= BCM_LINTC_NIRQS)
 		return (EINVAL);
+
+	/* TODO: handle IRQ type here */
 
 	sc = device_get_softc(dev);
 	*isrcp = &sc->bls_isrcs[daf->cells[0]].bli_isrc;


More information about the svn-src-head mailing list