ofw_pcib_pci.c (256816) | ofw_pcib_pci.c (256994) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_pcib_pci.c 256816 2013-10-21 00:04:26Z nwhitehorn $"); | 29__FBSDID("$FreeBSD: head/sys/powerpc/ofw/ofw_pcib_pci.c 256994 2013-10-23 17:24:21Z nwhitehorn $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/module.h> 34#include <sys/bus.h> 35#include <sys/malloc.h> 36#include <sys/kernel.h> 37 --- 114 unchanged lines hidden (view full) --- 152 if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®, 153 sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), 154 &iparent, maskbuf)) { 155 /* 156 * If we've found a mapping, return it and don't map 157 * it again on higher levels - that causes problems 158 * in some cases, and never seems to be required. 159 */ | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/module.h> 34#include <sys/bus.h> 35#include <sys/malloc.h> 36#include <sys/kernel.h> 37 --- 114 unchanged lines hidden (view full) --- 152 if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), ii, ®, 153 sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), 154 &iparent, maskbuf)) { 155 /* 156 * If we've found a mapping, return it and don't map 157 * it again on higher levels - that causes problems 158 * in some cases, and never seems to be required. 159 */ |
160 return (MAP_IRQ(iparent, mintr)); | 160 return (ofw_bus_map_intr(dev, iparent, mintr)); |
161 } 162 } else if (intpin >= 1 && intpin <= 4) { 163 /* 164 * When an interrupt map is missing, we need to do the 165 * standard PCI swizzle and continue mapping at the parent. 166 */ 167 return (pcib_route_interrupt(bridge, dev, intpin)); 168 } 169 return (PCIB_ROUTE_INTERRUPT(device_get_parent(device_get_parent( 170 bridge)), bridge, intpin)); 171} 172 | 161 } 162 } else if (intpin >= 1 && intpin <= 4) { 163 /* 164 * When an interrupt map is missing, we need to do the 165 * standard PCI swizzle and continue mapping at the parent. 166 */ 167 return (pcib_route_interrupt(bridge, dev, intpin)); 168 } 169 return (PCIB_ROUTE_INTERRUPT(device_get_parent(device_get_parent( 170 bridge)), bridge, intpin)); 171} 172 |