esp_isavar.h revision 1.2.6.2 1 1.2.6.2 bouyer /* $NetBSD: esp_isavar.h,v 1.2.6.2 2000/11/20 11:41:13 bouyer Exp $ */
2 1.2.6.2 bouyer
3 1.2.6.2 bouyer /*
4 1.2.6.2 bouyer * Copyright (c) 1997 Allen Briggs.
5 1.2.6.2 bouyer * All rights reserved.
6 1.2.6.2 bouyer *
7 1.2.6.2 bouyer * Redistribution and use in source and binary forms, with or without
8 1.2.6.2 bouyer * modification, are permitted provided that the following conditions
9 1.2.6.2 bouyer * are met:
10 1.2.6.2 bouyer * 1. Redistributions of source code must retain the above copyright
11 1.2.6.2 bouyer * notice, this list of conditions and the following disclaimer.
12 1.2.6.2 bouyer * 2. Redistributions in binary form must reproduce the above copyright
13 1.2.6.2 bouyer * notice, this list of conditions and the following disclaimer in the
14 1.2.6.2 bouyer * documentation and/or other materials provided with the distribution.
15 1.2.6.2 bouyer * 3. All advertising materials mentioning features or use of this software
16 1.2.6.2 bouyer * must display the following acknowledgement:
17 1.2.6.2 bouyer * This product includes software developed by Peter Galbavy.
18 1.2.6.2 bouyer * 4. The name of the author may not be used to endorse or promote products
19 1.2.6.2 bouyer * derived from this software without specific prior written permission.
20 1.2.6.2 bouyer *
21 1.2.6.2 bouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 1.2.6.2 bouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 1.2.6.2 bouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 1.2.6.2 bouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 1.2.6.2 bouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 1.2.6.2 bouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 1.2.6.2 bouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 1.2.6.2 bouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 1.2.6.2 bouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 1.2.6.2 bouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 1.2.6.2 bouyer */
32 1.2.6.2 bouyer
33 1.2.6.2 bouyer /*
34 1.2.6.2 bouyer * Copyright (c) 1997 Eric S. Hvozda (hvozda (at) netcom.com)
35 1.2.6.2 bouyer * All rights reserved.
36 1.2.6.2 bouyer *
37 1.2.6.2 bouyer * Redistribution and use in source and binary forms, with or without
38 1.2.6.2 bouyer * modification, are permitted provided that the following conditions
39 1.2.6.2 bouyer * are met:
40 1.2.6.2 bouyer * 1. Redistributions of source code must retain the above copyright
41 1.2.6.2 bouyer * notice, this list of conditions and the following disclaimer.
42 1.2.6.2 bouyer * 2. Redistributions in binary form must reproduce the above copyright
43 1.2.6.2 bouyer * notice, this list of conditions and the following disclaimer in the
44 1.2.6.2 bouyer * documentation and/or other materials provided with the distribution.
45 1.2.6.2 bouyer * 3. All advertising materials mentioning features or use of this software
46 1.2.6.2 bouyer * must display the following acknowledgement:
47 1.2.6.2 bouyer * This product includes software developed by Eric S. Hvozda.
48 1.2.6.2 bouyer * 4. The name of Eric S. Hvozda may not be used to endorse or promote products
49 1.2.6.2 bouyer * derived from this software without specific prior written permission.
50 1.2.6.2 bouyer *
51 1.2.6.2 bouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
52 1.2.6.2 bouyer * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
53 1.2.6.2 bouyer * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54 1.2.6.2 bouyer * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55 1.2.6.2 bouyer * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56 1.2.6.2 bouyer * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 1.2.6.2 bouyer * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 1.2.6.2 bouyer * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 1.2.6.2 bouyer * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
60 1.2.6.2 bouyer * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 1.2.6.2 bouyer */
62 1.2.6.2 bouyer
63 1.2.6.2 bouyer struct esp_isa_softc {
64 1.2.6.2 bouyer struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */
65 1.2.6.2 bouyer
66 1.2.6.2 bouyer int sc_active; /* Pseudo-DMA state vars */
67 1.2.6.2 bouyer int sc_tc;
68 1.2.6.2 bouyer int sc_datain;
69 1.2.6.2 bouyer size_t sc_dmasize;
70 1.2.6.2 bouyer size_t sc_dmatrans;
71 1.2.6.2 bouyer char **sc_dmaaddr;
72 1.2.6.2 bouyer size_t *sc_pdmalen;
73 1.2.6.2 bouyer
74 1.2.6.2 bouyer bus_space_tag_t sc_iot;
75 1.2.6.2 bouyer bus_space_handle_t sc_ioh;
76 1.2.6.2 bouyer void *sc_ih;
77 1.2.6.2 bouyer int sc_irq;
78 1.2.6.2 bouyer int sc_drq;
79 1.2.6.2 bouyer
80 1.2.6.2 bouyer #ifdef ESP_DEBUG
81 1.2.6.2 bouyer int sc_debug;
82 1.2.6.2 bouyer #endif
83 1.2.6.2 bouyer };
84 1.2.6.2 bouyer
85 1.2.6.2 bouyer struct esp_isa_probe_data {
86 1.2.6.2 bouyer int sc_irq;
87 1.2.6.2 bouyer int sc_isncr;
88 1.2.6.2 bouyer int sc_rev;
89 1.2.6.2 bouyer int sc_isfast;
90 1.2.6.2 bouyer int sc_msize;
91 1.2.6.2 bouyer int sc_parity;
92 1.2.6.2 bouyer int sc_sync;
93 1.2.6.2 bouyer int sc_id;
94 1.2.6.2 bouyer u_char sc_cfg4, sc_cfg5;
95 1.2.6.2 bouyer };
96 1.2.6.2 bouyer
97 1.2.6.2 bouyer #define ESP_ISA_IOSIZE 16
98 1.2.6.2 bouyer
99 1.2.6.2 bouyer int esp_isa_find __P((bus_space_tag_t, bus_space_handle_t,
100 1.2.6.2 bouyer struct esp_isa_probe_data *));
101 1.2.6.2 bouyer void esp_isa_init __P((struct esp_isa_softc *, struct esp_isa_probe_data *));
102 1.2.6.2 bouyer
103 1.2.6.2 bouyer #ifdef ESP_DEBUG
104 1.2.6.2 bouyer extern int esp_isa_debug;
105 1.2.6.2 bouyer
106 1.2.6.2 bouyer #define ESP_SHOWTRAC 0x01
107 1.2.6.2 bouyer #define ESP_SHOWREGS 0x02
108 1.2.6.2 bouyer #define ESP_SHOWMISC 0x04
109 1.2.6.2 bouyer
110 1.2.6.2 bouyer #define ESP_TRACE(str) \
111 1.2.6.2 bouyer do {if (esp_isa_debug & ESP_SHOWTRAC) printf str;} while (0)
112 1.2.6.2 bouyer #define ESP_REGS(str) \
113 1.2.6.2 bouyer do {if (esp_isa_debug & ESP_SHOWREGS) printf str;} while (0)
114 1.2.6.2 bouyer #define ESP_MISC(str) \
115 1.2.6.2 bouyer do {if (esp_isa_debug & ESP_SHOWMISC) printf str;} while (0)
116 1.2.6.2 bouyer #else
117 1.2.6.2 bouyer #define ESP_TRACE(str)
118 1.2.6.2 bouyer #define ESP_REGS(str)
119 1.2.6.2 bouyer #define ESP_MISC(str)
120 1.2.6.2 bouyer #endif
121