mbavar.h revision 1.1 1 1.1 ragge /* $NetBSD: mbavar.h,v 1.1 1995/02/13 00:44:04 ragge Exp $ */
2 1.1 ragge /*
3 1.1 ragge * Copyright (c) 1994 Ludd, University of Lule}, Sweden
4 1.1 ragge * All rights reserved.
5 1.1 ragge *
6 1.1 ragge * Redistribution and use in source and binary forms, with or without
7 1.1 ragge * modification, are permitted provided that the following conditions
8 1.1 ragge * are met:
9 1.1 ragge * 1. Redistributions of source code must retain the above copyright
10 1.1 ragge * notice, this list of conditions and the following disclaimer.
11 1.1 ragge * 2. Redistributions in binary form must reproduce the above copyright
12 1.1 ragge * notice, this list of conditions and the following disclaimer in the
13 1.1 ragge * documentation and/or other materials provided with the distribution.
14 1.1 ragge * 3. All advertising materials mentioning features or use of this software
15 1.1 ragge * must display the following acknowledgement:
16 1.1 ragge * This product includes software developed at Ludd, University of Lule}.
17 1.1 ragge * 4. The name of the author may not be used to endorse or promote products
18 1.1 ragge * derived from this software without specific prior written permission
19 1.1 ragge *
20 1.1 ragge * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 1.1 ragge * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 1.1 ragge * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 1.1 ragge * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 1.1 ragge * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 1.1 ragge * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 1.1 ragge * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 1.1 ragge * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 1.1 ragge * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 1.1 ragge * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 1.1 ragge */
31 1.1 ragge
32 1.1 ragge /* All bugs are subject to removal without further notice */
33 1.1 ragge
34 1.1 ragge /* Mba n}nting... ragge 940311 */
35 1.1 ragge
36 1.1 ragge #define MBCR_INIT 1
37 1.1 ragge #define MBCR_IE (1<<2)
38 1.1 ragge #define MBDS_DPR (1<<8)
39 1.1 ragge #define MBSR_NED (1<<18)
40 1.1 ragge #define MBDT_MOH (1<<13)
41 1.1 ragge #define MBDT_TYPE 511
42 1.1 ragge #define MBDT_TAP (1<<14)
43 1.1 ragge
44 1.1 ragge #define CLOSED 0
45 1.1 ragge #define WANTOPEN 1
46 1.1 ragge #define RDLABEL 2
47 1.1 ragge #define OPEN 3
48 1.1 ragge #define OPENRAW 4
49 1.1 ragge
50 1.1 ragge struct mba_ctrl {
51 1.1 ragge struct mba_regs *mba_regs;
52 1.1 ragge struct mba_device *mba_device[8];
53 1.1 ragge };
54 1.1 ragge
55 1.1 ragge struct mba_device {
56 1.1 ragge struct mba_driver *driver;
57 1.1 ragge int unit;
58 1.1 ragge int mbanum;
59 1.1 ragge int drive;
60 1.1 ragge int dk;
61 1.1 ragge int alive;
62 1.1 ragge int type;
63 1.1 ragge struct mba_regs *mi_mba;
64 1.1 ragge struct mba_hd *hd;
65 1.1 ragge int drv;
66 1.1 ragge int device;
67 1.1 ragge };
68 1.1 ragge
69 1.1 ragge struct mba_slave {
70 1.1 ragge struct mba_driver *driver;
71 1.1 ragge int ctlr;
72 1.1 ragge int unit;
73 1.1 ragge int slave;
74 1.1 ragge int alive;
75 1.1 ragge };
76 1.1 ragge
77 1.1 ragge struct mba_driver {
78 1.1 ragge int (*slave)();
79 1.1 ragge char *sname;
80 1.1 ragge char *dname;
81 1.1 ragge short *type;
82 1.1 ragge int (*attach)();
83 1.1 ragge struct mba_device **info;
84 1.1 ragge };
85 1.1 ragge
86 1.1 ragge struct mba_hd {
87 1.1 ragge struct mba_device *device[8]; /* XXX - Var tidigare mh_mbip */
88 1.1 ragge int ndrive;
89 1.1 ragge int mh_active;
90 1.1 ragge struct mba_regs *mh_mba;
91 1.1 ragge struct mba_regs *mh_physmba;
92 1.1 ragge struct mba_device *mh_actf;
93 1.1 ragge struct mba_device *mh_actl;
94 1.1 ragge };
95