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