diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-02-01 17:17:35 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2014-02-01 17:17:35 +0000 |
commit | fe5ea2b0207e1ec2c4537c9b3331811e6e7c0f61 (patch) | |
tree | a83a2c1252b628ba29e227d3b9818f9a71b63d48 /sys/dev/fdt/fdt_common.c | |
parent | b6007fbe3e12e7460f4a667fe2f52a1a291dcc5c (diff) | |
download | FreeBSD-src-fe5ea2b0207e1ec2c4537c9b3331811e6e7c0f61.zip FreeBSD-src-fe5ea2b0207e1ec2c4537c9b3331811e6e7c0f61.tar.gz |
Open Firmware interrupt specifiers can consist of arbitrary-length byte
strings and include arbitrary information (IRQ line/domain/sense). When the
ofw_bus_map_intr() API was introduced, it assumed that, as on most systems,
these were either 1 cell, containing an interrupt line, or 2, containing
a line number plus a sense code. It turns out a non-negligible number of
ARM systems use 3 (or even 4!) cells for interrupts, so make this more
general.
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r-- | sys/dev/fdt/fdt_common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c index b4aabbd..9365d79 100644 --- a/sys/dev/fdt/fdt_common.c +++ b/sys/dev/fdt/fdt_common.c @@ -501,11 +501,9 @@ fdt_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl, icells = 1; } for (i = 0, k = 0; i < nintr; i += icells, k++) { - intr[i] = ofw_bus_map_intr(dev, iparent, intr[i]); + intr[i] = ofw_bus_map_intr(dev, iparent, icells, intr); resource_list_add(rl, SYS_RES_IRQ, k, intr[i], intr[i], 1); - if (icells > 1) - ofw_bus_config_intr(dev, intr[i], intr[i+1]); } free(intr, M_OFWPROP); } |