ofw_isa.c (91966) | ofw_isa.c (93067) |
---|---|
1/* 2 * Copyright (c) 1999, 2000 Matthew R. Green 3 * Copyright (c) 2001 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 * | 1/* 2 * Copyright (c) 1999, 2000 Matthew R. Green 3 * Copyright (c) 2001 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 91966 2002-03-09 22:00:30Z tmm $ | 31 * $FreeBSD: head/sys/sparc64/isa/ofw_isa.c 93067 2002-03-24 02:11:06Z tmm $ |
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 <ofw/openfirm.h> 43#include <ofw/ofw_pci.h> 44 45#include <machine/resource.h> 46#include <machine/ofw_bus.h> 47 48#include <sparc64/isa/ofw_isa.h> 49#include <sparc64/pci/ofw_pci.h> 50 | 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 <ofw/openfirm.h> 43#include <ofw/ofw_pci.h> 44 45#include <machine/resource.h> 46#include <machine/ofw_bus.h> 47 48#include <sparc64/isa/ofw_isa.h> 49#include <sparc64/pci/ofw_pci.h> 50 |
51/* 52 * This applies only for an ISA/EBus with an own interrupt-map property. 53 */ 54int 55ofw_isa_map_intr(struct isa_imap *imap, int nimap, struct isa_imap_msk *imapmsk, 56 int intr, struct isa_regs *regs, int nregs) 57{ 58 char regm[8]; 59 60 return (ofw_bus_route_intr(intr, regs, sizeof(*regs), 8, nregs, 61 imap, nimap, imapmsk, regm)); 62} 63 | |
64/* XXX: this only supports PCI as parent bus right now. */ 65int 66ofw_isa_map_iorange(struct isa_ranges *range, int nrange, u_long *start, 67 u_long *end) 68{ 69 u_int64_t offs, cstart, cend; 70 int i; 71 --- 30 unchanged lines hidden --- | 51/* XXX: this only supports PCI as parent bus right now. */ 52int 53ofw_isa_map_iorange(struct isa_ranges *range, int nrange, u_long *start, 54 u_long *end) 55{ 56 u_int64_t offs, cstart, cend; 57 int i; 58 --- 30 unchanged lines hidden --- |