aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/pseries
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2013-10-23 17:24:21 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2013-10-23 17:24:21 +0000
commitf214848258c8696dcbf805759fd9d1698fb337fe (patch)
treed4e3d58bb502f0d503cc1aad68d3a3651bbaa43b /sys/powerpc/pseries
parent959bd87986ecaeabcd228220d1cabe07f6003827 (diff)
downloadsrc-f214848258c8696dcbf805759fd9d1698fb337fe.tar.gz
src-f214848258c8696dcbf805759fd9d1698fb337fe.zip
Add two new interfaces to ofw_bus:
- ofw_bus_map_intr() Maps an (iparent, IRQ) tuple to a system-global interrupt number in some platform dependent way. This is meant to be implemented as a replacement for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus hierarchy. - ofw_bus_config_intr() Configures an interrupt (previously mapped) based on firmware sense flags. This replaces manual interpretation of the sense field in bus drivers and will, in a follow-up, allow that interpretation to be redirected to the PIC drivers where it belongs. This will eventually replace the tables in /sys/dev/fdt/fdt_ARCH.c The PowerPC/AIM code has been converted to use these globally, with an implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly be integrated into pic_if.m and bounced through nexus into the PIC tree. FDT integration will happen significantly later due to larger testing requirements. This patch in general also lays the groundwork for the removal of /sys/dev/fdt/fdt_ARCH.c and machine/fdt.h.
Notes
Notes: svn path=/head/; revision=256994
Diffstat (limited to 'sys/powerpc/pseries')
-rw-r--r--sys/powerpc/pseries/vdevice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/powerpc/pseries/vdevice.c b/sys/powerpc/pseries/vdevice.c
index 8ddd531e5e3d..54cd5ddc6be7 100644
--- a/sys/powerpc/pseries/vdevice.c
+++ b/sys/powerpc/pseries/vdevice.c
@@ -156,7 +156,8 @@ vdevice_attach(device_t dev)
for (i = 0; i < nintr; i += icells) {
u_int irq = intr[i];
if (iparent != -1)
- irq = MAP_IRQ(iparent, intr[i]);
+ irq = ofw_bus_map_intr(dev, iparent,
+ intr[i]);
resource_list_add(&dinfo->mdi_resources,
SYS_RES_IRQ, i, irq, irq, i);