Deleted Added
full compact
grackle.c (217658) grackle.c (218184)
1/*-
2 * Copyright 2003 by Peter Grehan. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 * 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 *
1/*-
2 * Copyright 2003 by Peter Grehan. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 * 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 * $FreeBSD: head/sys/powerpc/powermac/grackle.c 217658 2011-01-20 20:22:19Z andreast $
27 * $FreeBSD: head/sys/powerpc/powermac/grackle.c 218184 2011-02-02 05:58:51Z marcel $
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/module.h>
33#include <sys/bus.h>
34#include <sys/conf.h>
35#include <sys/kernel.h>

--- 312 unchanged lines hidden (view full) ---

348 phandle_t iparent;
349 uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
350
351 sc = device_get_softc(bus);
352 pintr = pin;
353 if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, &reg,
354 sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
355 &iparent, maskbuf))
28 */
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/module.h>
33#include <sys/bus.h>
34#include <sys/conf.h>
35#include <sys/kernel.h>

--- 312 unchanged lines hidden (view full) ---

348 phandle_t iparent;
349 uint8_t maskbuf[sizeof(reg) + sizeof(pintr)];
350
351 sc = device_get_softc(bus);
352 pintr = pin;
353 if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, &reg,
354 sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr),
355 &iparent, maskbuf))
356 return (INTR_VEC(iparent, mintr));
356 return (MAP_IRQ(iparent, mintr));
357
358 /* Maybe it's a real interrupt, not an intpin */
359 if (pin > 4)
360 return (pin);
361
362 device_printf(bus, "could not route pin %d for device %d.%d\n",
363 pin, pci_get_slot(dev), pci_get_function(dev));
364 return (PCI_INVALID_IRQ);

--- 225 unchanged lines hidden ---
357
358 /* Maybe it's a real interrupt, not an intpin */
359 if (pin > 4)
360 return (pin);
361
362 device_printf(bus, "could not route pin %d for device %d.%d\n",
363 pin, pci_get_slot(dev), pci_get_function(dev));
364 return (PCI_INVALID_IRQ);

--- 225 unchanged lines hidden ---