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
This commit is contained in:
Oleksandr Tymoshenko 2018-05-02 20:04:25 +00:00
parent 44aaf08ba7
commit 5ebc699ab2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333177

View File

@ -454,9 +454,11 @@ bcm_lintc_map_intr(device_t dev, struct intr_map_data *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;
return (0);