atzscreg.h revision 1.5 1 1.5 christos /* $NetBSD: atzscreg.h,v 1.5 2005/12/11 12:16:28 christos Exp $ */
2 1.2 cgd
3 1.1 chopps /*
4 1.1 chopps * Copyright (c) 1982, 1990 The Regents of the University of California.
5 1.1 chopps * All rights reserved.
6 1.4 agc *
7 1.4 agc * Redistribution and use in source and binary forms, with or without
8 1.4 agc * modification, are permitted provided that the following conditions
9 1.4 agc * are met:
10 1.4 agc * 1. Redistributions of source code must retain the above copyright
11 1.4 agc * notice, this list of conditions and the following disclaimer.
12 1.4 agc * 2. Redistributions in binary form must reproduce the above copyright
13 1.4 agc * notice, this list of conditions and the following disclaimer in the
14 1.4 agc * documentation and/or other materials provided with the distribution.
15 1.4 agc * 3. Neither the name of the University nor the names of its contributors
16 1.4 agc * may be used to endorse or promote products derived from this software
17 1.4 agc * without specific prior written permission.
18 1.4 agc *
19 1.4 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.4 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.4 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.4 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.4 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.4 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.4 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.4 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.4 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.4 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.4 agc * SUCH DAMAGE.
30 1.4 agc *
31 1.4 agc * @(#)dmareg.h
32 1.4 agc */
33 1.4 agc /*
34 1.4 agc * Copyright (c) 1994 Christian E. Hopps
35 1.1 chopps *
36 1.1 chopps * Redistribution and use in source and binary forms, with or without
37 1.1 chopps * modification, are permitted provided that the following conditions
38 1.1 chopps * are met:
39 1.1 chopps * 1. Redistributions of source code must retain the above copyright
40 1.1 chopps * notice, this list of conditions and the following disclaimer.
41 1.1 chopps * 2. Redistributions in binary form must reproduce the above copyright
42 1.1 chopps * notice, this list of conditions and the following disclaimer in the
43 1.1 chopps * documentation and/or other materials provided with the distribution.
44 1.1 chopps * 3. All advertising materials mentioning features or use of this software
45 1.1 chopps * must display the following acknowledgement:
46 1.1 chopps * This product includes software developed by the University of
47 1.1 chopps * California, Berkeley and its contributors.
48 1.1 chopps * 4. Neither the name of the University nor the names of its contributors
49 1.1 chopps * may be used to endorse or promote products derived from this software
50 1.1 chopps * without specific prior written permission.
51 1.1 chopps *
52 1.1 chopps * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
53 1.1 chopps * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 1.1 chopps * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 1.1 chopps * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
56 1.1 chopps * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 1.1 chopps * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 1.1 chopps * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 1.1 chopps * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 1.1 chopps * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 1.1 chopps * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 1.1 chopps * SUCH DAMAGE.
63 1.1 chopps *
64 1.1 chopps * @(#)dmareg.h
65 1.1 chopps */
66 1.1 chopps #ifndef _AMIGA_DEV_ATZSCREG_H_
67 1.1 chopps #define _AMIGA_DEV_ATZSCREG_H_
68 1.1 chopps
69 1.1 chopps /*
70 1.1 chopps * Hardware layout of the A2091 SDMAC. This also contains the
71 1.1 chopps * registers for the sbic chip, but in favor of separating DMA and
72 1.1 chopps * scsi, the scsi-driver doesn't make use of this dependency
73 1.1 chopps */
74 1.1 chopps
75 1.1 chopps #define v_char volatile char
76 1.1 chopps #define v_int volatile int
77 1.1 chopps #define vu_char volatile u_char
78 1.1 chopps #define vu_short volatile u_short
79 1.1 chopps #define vu_int volatile u_int
80 1.1 chopps
81 1.1 chopps /* This chip definition only defines the registers also present on the
82 1.1 chopps A3000 SDMAC. */
83 1.1 chopps
84 1.1 chopps struct sdmac {
85 1.1 chopps short pad0[0x20];
86 1.1 chopps vu_short ISTR; /* Interrupt Status Register RO */
87 1.1 chopps vu_short CNTR; /* Control Register RW */
88 1.1 chopps short pad1[0x1e];
89 1.1 chopps vu_int WTC; /* Word Transfer Count Register RW */
90 1.1 chopps vu_int ACR; /* Address Count Register RW */
91 1.1 chopps short pad2[0x03];
92 1.1 chopps vu_short DAWR; /* DACK Width Register WO */
93 1.1 chopps char pad3;
94 1.1 chopps vu_char SASR; /* sbic asr */
95 1.1 chopps char pad4;
96 1.1 chopps vu_char SCMD; /* sbic data */
97 1.1 chopps short pad5[0x26];
98 1.1 chopps vu_short ST_DMA; /* Start DMA Transfers RW-Strobe */
99 1.1 chopps vu_short SP_DMA; /* Stop DMA Transfers RW-Strobe */
100 1.1 chopps vu_short CINT; /* Clear Interrupts RW-Strobe */
101 1.1 chopps short pad6;
102 1.1 chopps vu_short FLUSH; /* Flush FIFO RW-Strobe */
103 1.1 chopps };
104 1.3 aymeric
105 1.1 chopps /*
106 1.1 chopps * value to go into DAWR
107 1.1 chopps */
108 1.1 chopps #define DAWR_ATZSC 3 /* according to A3000T service-manual */
109 1.1 chopps
110 1.1 chopps /*
111 1.1 chopps * bits defined for CNTR
112 1.1 chopps */
113 1.1 chopps #define CNTR_TCEN (1<<7) /* Terminal Count Enable */
114 1.1 chopps #define CNTR_PREST (1<<6) /* Perp Reset (not implemented :-((( ) */
115 1.1 chopps #define CNTR_PDMD (1<<5) /* Perp Device Mode Select (1=SCSI,0=XT/AT) */
116 1.1 chopps #define CNTR_INTEN (1<<4) /* Interrupt Enable */
117 1.1 chopps #define CNTR_DDIR (1<<3) /* Device Direction. 1==rd host, wr to perp */
118 1.1 chopps
119 1.1 chopps /*
120 1.1 chopps * bits defined for ISTR
121 1.1 chopps */
122 1.1 chopps #define ISTR_INTX (1<<8) /* XT/AT Interrupt pending */
123 1.1 chopps #define ISTR_INT_F (1<<7) /* Interrupt Follow */
124 1.1 chopps #define ISTR_INTS (1<<6) /* SCSI Peripheral Interrupt */
125 1.1 chopps #define ISTR_E_INT (1<<5) /* End-Of-Process Interrupt */
126 1.1 chopps #define ISTR_INT_P (1<<4) /* Interrupt Pending */
127 1.1 chopps #define ISTR_UE_INT (1<<3) /* Under-Run FIFO Error Interrupt */
128 1.1 chopps #define ISTR_OE_INT (1<<2) /* Over-Run FIFO Error Interrupt */
129 1.1 chopps #define ISTR_FF_FLG (1<<1) /* FIFO-Full Flag */
130 1.1 chopps #define ISTR_FE_FLG (1<<0) /* FIFO-Empty Flag */
131 1.1 chopps
132 1.1 chopps #endif /* _AMIGA_DEV_ATZSCREG_H_ */
133