From f214848258c8696dcbf805759fd9d1698fb337fe Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Wed, 23 Oct 2013 17:24:21 +0000 Subject: 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. --- sys/powerpc/pseries/vdevice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/powerpc/pseries') 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); -- cgit v1.2.3