1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: mapped_scsi.h,v $
29 * Revision 2.7 91/10/09 16:16:45 af
30 * Define maximum size of mapped region. The fifo flags
31 * for the ASC chip do not change with interrupt ack, the
32 * command might.
33 * [91/10/05 10:25:03 af]
34 *
35 * Revision 2.6 91/06/19 11:56:46 rvb
36 * File moved here from mips/PMAX since it is now "MI" code, also
37 * used by Vax3100 and soon -- the omron luna88k.
38 * [91/06/04 rvb]
39 *
40 * Revision 2.5 91/05/14 17:24:10 mrt
41 * Correcting copyright
42 *
43 * Revision 2.4 91/02/05 17:42:31 mrt
44 * Added author notices
45 * [91/02/04 11:14:56 mrt]
46 *
47 * Revision 2.3 90/12/05 23:32:32 af
48 * Changed to use new Mach copyright
49 *
50 * Revision 2.1.1.1 90/11/13 15:09:49 af
51 * Factored out, for user's benefit.
52 * [90/11/08 af]
53 */
54 /*
55 * File: mapped_scsi.h
56 * Author: Alessandro Forin, Carnegie Mellon University
57 * Date: 11/90
58 *
59 * Definitions for the User-level SCSI Driver
60 */
61
62 /*
63 * HBA chips of various sorts
64 */
65
66 /* DEC 7061 used on pmaxen */
67
68 typedef struct sii_volatile_regs {
69 unsigned short sii_conn_csr;
70 unsigned short sii_data_csr;
71 } *sii_reg_t;
72
73 #define HBA_DEC_7061 0x00000001
74
75 /* layout of mapped stuff */
76 #define SII_REGS_BASE (SCSI_INFO_BASE+SCSI_INFO_SIZE)
77 #define SII_REGS_SIZE PAGE_SIZE
78 #define SII_RAM_BASE (SII_REGS_BASE+SII_REGS_SIZE)
79
80
81 /* National 53C94, used on 3maxen' PMAZ-AA boards */
82
83 typedef struct asc_volatile_regs {
84 unsigned char csr;
85 unsigned char isr;
86 unsigned char seq;
87 unsigned char cmd;
88 } *asc_reg_t;
89
90 #define HBA_NCR_53c94 0x00000002
91
92 /* layout of mapped stuff */
93 #define ASC_REGS_BASE (SCSI_INFO_BASE+SCSI_INFO_SIZE)
94 #define ASC_REGS_SIZE PAGE_SIZE
95 #define ASC_DMAR_BASE (ASC_REGS_BASE+ASC_REGS_SIZE)
96 #define ASC_DMAR_SIZE PAGE_SIZE
97 #define ASC_RAM_BASE (ASC_DMAR_BASE+ASC_DMAR_SIZE)
98
99 /*
100 * User-mapped information block, common to all
101 */
102 #define SCSI_INFO_BASE 0
103 #define SCSI_INFO_SIZE PAGE_SIZE
104
105 #define SCSI_MAX_MAPPED_SIZE (ASC_RAM_BASE+128*1024)
106
107 typedef struct {
108 int interrupt_count;/* Counter kept by kernel */
109 unsigned int wait_event; /* To wait for interrupts */
110 unsigned ram_size;
111 int hba_type; /* Tag for regs union */
112 union { /* Space for regs saved on
113 * intr. Only few used */
114 struct asc_volatile_regs asc;
115 struct sii_volatile_regs sii;
116 } saved_regs;
117 } *mapped_scsi_info_t;
118
Cache object: 430b08a9c279e26b3fecb4208b526de4
|