2 * Copyright (c) 1982, 1990 The Regents of the University of California.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * @(#)device.h 7.3 (Berkeley) 5/7/91
34 * $Id: device.h,v 1.13 2007/03/04 05:59:18 christos Exp $
38 int (*d_init
) (void *); /* amiga_device or amiga_ctrl */
40 int (*d_start
) (int unit
);
41 int (*d_go
) (int unit
, ...);
42 int (*d_intr
) (int unit
, int stat
);
43 int (*d_done
) (int unit
);
44 int (*d_ustart
) (int unit
);
47 void (*d_reset
) (int unit
);
48 void (*d_delay
) (int delay
);
49 int (*d_tur
) (int ctlr
, int slave
, int unit
);
50 int (*d_ssu
) (int ctlr
, int slave
, int unit
, int start
);
53 int (*d_immcmd_nd
) ();
60 struct driver
*amiga_driver
;
69 struct driver
*amiga_driver
;
70 struct driver
*amiga_cdriver
;
84 struct devqueue
*dq_forw
;
85 struct devqueue
*dq_back
;
89 struct driver
*dq_driver
;
92 #define MAXCTLRS 16 /* Size of HW table (arbitrary) */
93 #define MAXSLAVES 8 /* Slaves per controller (SCSI limit) */
96 void * hw_pa
; /* physical address of control space */
97 int hw_size
; /* size of control space */
98 void * hw_kva
; /* kernel virtual address of control space */
100 int hw_product
; /* autoconfig® parameters */
101 int hw_serno
; /* serial number, needed by ethernet boards */
106 /* some I know, some I defined.. PLEASE ADD!! */
107 #define MANUF_BUILTIN 1
108 #define PROD_BUILTIN_SCSI 1
109 #define PROD_BUILTIN_FLOPPY 2
110 #define PROD_BUILTIN_RS232 3
111 #define PROD_BUILTIN_CLOCK 4
112 #define PROD_BUILTIN_KEYBOARD 5
113 #define PROD_BUILTIN_PPORT 6
114 #define PROD_BUILTIN_DISPLAY 7
115 #define PROD_BUILTIN_MOUSE 8
116 #define PROD_BUILTIN_CLOCK2 9
117 #define PROD_BUILTIN_FLOP 10
119 /* They have more than one manuf-id */
120 #define MANUF_CBM_1 513
121 #define PROD_CBM_1_A2088 1
122 #define MANUF_CBM_2 514
123 #define PROD_CBM_2_A2091 3
124 #define PROD_CBM_2_A2065 0x70
126 /* Ameristar Ethernet board is the same as commo's A2065 (dunno exact boardname) */
127 #define MANUF_AMERISTAR 1053
128 #define PROD_AMERISTAR_ETHER 1
130 /* Unilowell tiga-board */
131 #define MANUF_UNILOWELL 1030
132 #define PROD_UNILOWELL_A2410 0
134 /* MacroSystem Retina board */
135 #define MANUF_MACROSYSTEM 0x4754
136 #define PROD_MACROSYSTEM_RETINA 6
139 #define MANUF_GVP 2017
140 #define PROD_GVP_SERIES_I 9 /* Impact Series-I SCSI? */
141 #define PROD_GVP_SERIES_II 11 /* !!!! many things !!! */
142 #define PROD_GVP_X_GF40 0x20 /* G-Force 040 w/o SCSI */
143 #define PROD_GVP_X_GF40_SCSI 0x30 /* G-Force 040 SCSI */
144 #define PROD_GVP_X_COMBO4 0x60 /* Combo 030 Rev 4 w/o SCSI */
145 #define PROD_GVP_X_COMBO4_SCSI 0x70 /* Combo 030 Rev 4 SCSI */
146 #define PROD_GVP_X_IOEXTEND 0x98 /* I/O Extender */
147 #define PROD_GVP_X_GF30 0xa0 /* G-Force 030 w/o SCSI */
148 #define PROD_GVP_X_GF30_SCSI 0xb0 /* G-Force 030 SCSI */
149 #define PROD_GVP_X_COMBO3 0xe0 /* Combo 030 Rev 3 w/o SCSI */
150 #define PROD_GVP_X_COMBO3_SCSI 0xf0 /* Combo 030 Rev 3 SCSI */
151 #define PROD_GVP_X_SCSI_II 0xf8 /* Impact Series-II SCSI */
152 #define PROD_GVP_IV24 32
154 /* Progressive Peripherals Inc. */
155 #define MANUF_PPI 2026
156 #define PROD_PPI_ZEUS 150
157 #define PROD_PPI_A500_040 187
158 #define PROD_PPI_A2000_040 105
159 #define PROD_PPI_A3000_040 1
160 #define PROD_PPI_MERCURY 0
163 #define MANUF_CSA 1058
164 #define PROD_CSA_MAGNUM 17
165 #define PROD_CSA_12G 21
168 #define MANUF_MICROBOTICS 1010
169 #define PROD_MICROBOTICS_VXL30 69
172 #define MANUF_SUPRA 1056
173 #define PROD_SUPRA_WORDSYNC_2 12
176 #define MANUF_IVS 2112
177 #define PROD_IVS_TRUMPCARD 52
178 #define PROD_IVS_VECTOR_ACC 242
179 #define PROD_IVS_VECTOR 243
182 #define MANUF_HACKER 2011
183 #define PROD_HACKER_MLH 1 /* XXXX Michael's scsi */
186 #define B_MASK 0xE000
187 #define B_BUILTIN 0x2000
188 #define B_ZORROII 0x4000
189 #define B_ZORROIII 0x6000
190 /* controller types */
193 #define C_FLOPPY 0x81
195 /* device types (controllers with no slaves) */
197 #define D_BITMAP 0x01
200 #define D_KEYBOARD 0x04
201 #define D_COMMSER 0x05
207 #define HW_ISCTLR(hw) ((hw)->hw_type & C_FLAG)
208 #define HW_ISFLOPPY(hw) (((hw)->hw_type & C_MASK) == C_FLOPPY)
209 #define HW_ISSCSI(hw) (((hw)->hw_type & C_MASK) == C_SCSI)
210 #define HW_ISDEV(hw,d) (((hw)->hw_type & D_MASK) == (d))
212 /* doesn't belong here... */
214 * Pseudo-device attach information (function + number of pseudo-devs).
217 void (*pdev_attach
) __P((int));
222 extern struct amiga_hw sc_table
[];
223 extern struct amiga_ctlr amiga_cinit
[];
224 extern struct amiga_device amiga_dinit
[];
225 extern void *sctova(), sctopa(), iomap();