Deleted Added
sdiff udiff text old ( 128712 ) new ( 129051 )
full compact
1/*
2 * Copyright (c) 1999, 2000 Matthew R. Green
3 * Copyright (c) 2001, 2003 Thomas Moestl <tmm@FreeBSD.org>
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:

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

23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * from: NetBSD: ebus.c,v 1.26 2001/09/10 16:27:53 eeh Exp
30 *
31 * $FreeBSD: head/sys/sparc64/isa/ofw_isa.c 129051 2004-05-08 13:53:47Z marius $
32 */
33
34/*
35 * Helper functions which can be used in both ISA and EBus code.
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41
42#include <dev/ofw/openfirm.h>
43
44#include <machine/bus.h>
45#include <machine/resource.h>
46#include <machine/ofw_bus.h>
47
48#include <sparc64/pci/ofw_pci.h>
49#include <sparc64/isa/ofw_isa.h>
50

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

92 if (which != NULL)
93 *which = i;
94 return (ofw_isa_range_restype(r));
95 }
96 panic("ofw_isa_map_iorange: could not map range %#lx - %#lx",
97 *start, *end);
98}
99
100ofw_pci_intr_t
101ofw_isa_route_intr(device_t bridge, phandle_t node, struct ofw_bus_iinfo *ii,
102 ofw_isa_intr_t intr)
103{
104 struct isa_regs reg;
105 u_int8_t maskbuf[sizeof(reg) + sizeof(intr)];
106 device_t pbridge;
107 ofw_isa_intr_t mintr;

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

113 */
114 if (!ofw_bus_lookup_imap(node, ii, &reg, sizeof(reg),
115 &intr, sizeof(intr), &mintr, sizeof(mintr), maskbuf)) {
116 /* Try routing at the parent bridge. */
117 mintr = PCIB_ROUTE_INTERRUPT(pbridge, bridge, intr);
118 }
119 return (mintr);
120}