Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / landisk / dev / obiovar.h
blob701166d64e3d30e51e4d26bb0bcb3da8cb5a1fd5
1 /* $NetBSD: obiovar.h,v 1.2 2008/03/27 02:26:34 uwe Exp $ */
3 /*-
4 * Copyright (c) 1997 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
34 * Copyright (c) 1995 Chris G. Demetriou
35 * Copyright (c) 1992 Berkeley Software Design, Inc.
36 * All rights reserved.
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
40 * are met:
41 * 1. Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * 2. Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in the
45 * documentation and/or other materials provided with the distribution.
46 * 3. All advertising materials mentioning features or use of this software
47 * must display the following acknowledgement:
48 * This product includes software developed by Berkeley Software
49 * Design, Inc.
50 * 4. The name of Berkeley Software Design must not be used to endorse
51 * or promote products derived from this software without specific
52 * prior written permission.
54 * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``AS IS'' AND
55 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN, INC. BE LIABLE
58 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
60 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 * SUCH DAMAGE.
66 * BSDI Id: isavar.h,v 1.5 1992/12/01 18:06:00 karels Exp
69 #ifndef _LANDISK_OBIOVAR_H_
70 #define _LANDISK_OBIOVAR_H_
72 #include <machine/bus.h>
74 /* obio tag */
75 extern struct _bus_space obio_bus_io;
76 extern struct _bus_space obio_bus_mem;
79 * obio bus attach arguments
81 struct obiobus_attach_args {
82 const char *oba_busname; /* XXX should be common */
84 bus_space_tag_t oba_iot; /* obio i/o space tag */
85 bus_space_tag_t oba_memt; /* obio mem space tag */
89 * obio bus resources.
92 struct obio_io {
93 int or_addr;
94 int or_size;
97 struct obio_iomem {
98 int or_addr;
99 int or_size;
102 struct obio_irq {
103 int or_irq;
107 * driver attach arguments
109 struct obio_attach_args {
110 bus_space_tag_t oa_iot; /* i/o space tag */
111 bus_space_tag_t oa_memt; /* memory space tag */
113 struct obio_io *oa_io; /* I/O resources */
114 int oa_nio;
116 struct obio_iomem *oa_iomem; /* memory resources */
117 int oa_niomem;
119 struct obio_irq *oa_irq; /* IRQ resources */
120 int oa_nirq;
122 void *oa_aux; /* driver specific */
125 #include "locators.h"
127 #define IOBASEUNK OBIOCF_PORT_DEFAULT /* i/o address is unknown */
128 #define IRQUNK OBIOCF_IRQ_DEFAULT /* interrupt request line is unknown */
129 #define MADDRUNK OBIOCF_IOMEM_DEFAULT /* shared memory address is unknown */
131 #define cf_iobase cf_loc[OBIOCF_PORT]
132 #define cf_iosize cf_loc[OBIOCF_SIZE]
133 #define cf_maddr cf_loc[OBIOCF_IOMEM]
134 #define cf_msize cf_loc[OBIOCF_IOSIZ]
135 #define cf_irq cf_loc[OBIOCF_IRQ]
137 void *obio_intr_establish(int irq, int level, int (*func)(void *), void *arg);
138 void obio_intr_disestablish(void *ih);
140 #endif /* _LANDISK_OBIOVAR_H_ */