summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt/fdt_common.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-15 14:26:11 +0000
committerian <ian@FreeBSD.org>2014-05-15 14:26:11 +0000
commit27f0a13f0adbfdb658bb63aac86772e0107c1c20 (patch)
tree51fd84ee4d563c9fcc06c0dd196587a24ab23dfc /sys/dev/fdt/fdt_common.c
parente24fc6cb17a568070581980459e14fc4808f0bb4 (diff)
downloadFreeBSD-src-27f0a13f0adbfdb658bb63aac86772e0107c1c20.zip
FreeBSD-src-27f0a13f0adbfdb658bb63aac86772e0107c1c20.tar.gz
MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404,
r261405 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. Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged. Allow nesting of simplebuses. Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to process "status" properties of OF nodes. Fix one remnant endian flaw in nexus.
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r--sys/dev/fdt/fdt_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
index 9d6840c..6cb5ac3 100644
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -489,11 +489,10 @@ fdt_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl,
OF_searchencprop(OF_xref_phandle(iparent), "#interrupt-cells",
&icells, sizeof(icells));
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[i]);
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);
}
OpenPOWER on IntegriCloud