ofw_isa.h (128712) | ofw_isa.h (129051) |
---|---|
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.h 128712 2004-04-28 13:06:46Z tmm $ | 31 * $FreeBSD: head/sys/sparc64/isa/ofw_isa.h 129051 2004-05-08 13:53:47Z marius $ |
32 */ 33 34#ifndef _SPARC64_ISA_OFW_ISA_H_ 35#define _SPARC64_ISA_OFW_ISA_H_ 36 37/* 38 * ISA PROM structures 39 */ --- 19 unchanged lines hidden (view full) --- 59#define ISA_RANGE_CHILD(r) \ 60 ((((u_int64_t)((r)->child_hi)) << 32) | ((u_int64_t)(r)->child_lo)) 61#define ISA_RANGE_PS(r) (((r)->phys_hi >> 24) & 0x03) 62#define ISA_RANGE_PHYS(r) \ 63 ((((u_int64_t)(r)->phys_mid) << 32) | ((u_int64_t)(r)->phys_lo)) 64 65typedef u_int32_t ofw_isa_intr_t; 66 | 32 */ 33 34#ifndef _SPARC64_ISA_OFW_ISA_H_ 35#define _SPARC64_ISA_OFW_ISA_H_ 36 37/* 38 * ISA PROM structures 39 */ --- 19 unchanged lines hidden (view full) --- 59#define ISA_RANGE_CHILD(r) \ 60 ((((u_int64_t)((r)->child_hi)) << 32) | ((u_int64_t)(r)->child_lo)) 61#define ISA_RANGE_PS(r) (((r)->phys_hi >> 24) & 0x03) 62#define ISA_RANGE_PHYS(r) \ 63 ((((u_int64_t)(r)->phys_mid) << 32) | ((u_int64_t)(r)->phys_lo)) 64 65typedef u_int32_t ofw_isa_intr_t; 66 |
67struct isa_imap { 68 u_int32_t phys_hi; /* high phys addr mask */ 69 u_int32_t phys_lo; /* low phys addr mask */ 70 ofw_isa_intr_t intr; /* interrupt mask */ 71 phandle_t cnode; /* child node */ 72 ofw_pci_intr_t cintr; /* child interrupt */ 73}; 74 75struct isa_imap_msk { 76 u_int32_t phys_hi; /* high phys addr */ 77 u_int32_t phys_lo; /* low phys addr */ 78 ofw_isa_intr_t intr; /* interrupt */ 79}; 80 | |
81int ofw_isa_range_restype(struct isa_ranges *); 82/* Map an IO range. Returns the resource type of the range. */ 83int ofw_isa_range_map(struct isa_ranges *, int, u_long *, u_long *, int *); 84 | 67int ofw_isa_range_restype(struct isa_ranges *); 68/* Map an IO range. Returns the resource type of the range. */ 69int ofw_isa_range_map(struct isa_ranges *, int, u_long *, u_long *, int *); 70 |
85#ifdef OFW_NEWPCI | |
86ofw_pci_intr_t ofw_isa_route_intr(device_t, phandle_t, struct ofw_bus_iinfo *, 87 ofw_isa_intr_t); | 71ofw_pci_intr_t ofw_isa_route_intr(device_t, phandle_t, struct ofw_bus_iinfo *, 72 ofw_isa_intr_t); |
88#endif | |
89 90#endif /* !_SPARC64_ISA_OFW_ISA_H_ */ | 73 74#endif /* !_SPARC64_ISA_OFW_ISA_H_ */ |