1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 #ifndef PAS16_H
37 #define PAS16_H
38
39 #define PAS16_PUBLIC_RELEASE 3
40
41 #define PDEBUG_INIT 0x1
42 #define PDEBUG_TRANSFER 0x2
43
44 #define PAS16_DEFAULT_BASE_1 0x388
45 #define PAS16_DEFAULT_BASE_2 0x384
46 #define PAS16_DEFAULT_BASE_3 0x38c
47 #define PAS16_DEFAULT_BASE_4 0x288
48
49 #define PAS16_DEFAULT_BOARD_1_IRQ 10
50 #define PAS16_DEFAULT_BOARD_2_IRQ 12
51 #define PAS16_DEFAULT_BOARD_3_IRQ 14
52 #define PAS16_DEFAULT_BOARD_4_IRQ 15
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 #define P_TIMEOUT_COUNTER_REG 0x4000
72 #define P_TC_DISABLE 0x80
73
74
75
76 #define P_TIMEOUT_STATUS_REG_OFFSET 0x4001
77 #define P_TS_TIM 0x80
78
79 #define P_TS_ARM_DRQ_INT 0x08
80
81
82
83
84
85
86
87 #define P_TS_ENABLE_TO_ERR_INTERRUPT
88 #define P_TS_ENABLE_WAIT
89
90 #define P_TS_CT 0x01
91
92
93
94
95
96
97
98
99
100 #define P_DATA_REG_OFFSET 0x5c00
101
102 #define P_STATUS_REG_OFFSET 0x5c01
103 #define P_ST_RDY 0x80
104
105 #define P_IRQ_STATUS 0x5c03
106 #define P_IS_IRQ 0x80
107
108 #define PCB_CONFIG 0x803
109 #define MASTER_ADDRESS_PTR 0x9a01
110 #define SYS_CONFIG_4 0x8003
111 #define WAIT_STATE 0xbc00
112 #define OPERATION_MODE_1 0xec03
113 #define IO_CONFIG_3 0xf002
114
115
116 #ifndef ASM
117 int pas16_abort(Scsi_Cmnd *);
118 int pas16_biosparam(Disk *, kdev_t, int*);
119 int pas16_detect(Scsi_Host_Template *);
120 int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
121 int pas16_reset(Scsi_Cmnd *);
122
123 #ifndef NULL
124 #define NULL 0
125 #endif
126
127 #ifndef CMD_PER_LUN
128 #define CMD_PER_LUN 2
129 #endif
130
131 #ifndef CAN_QUEUE
132 #define CAN_QUEUE 32
133 #endif
134
135
136
137
138
139
140
141 #if defined(HOSTS_C) || defined(MODULE)
142
143 #define MV_PAS16 {NULL, NULL, NULL, NULL, \
144 "Pro Audio Spectrum-16 SCSI", \
145 pas16_detect, NULL, NULL, \
146 NULL, pas16_queue_command, pas16_abort, pas16_reset, NULL, \
147 pas16_biosparam, \
148 CAN_QUEUE, 7, SG_ALL, \
149 CMD_PER_LUN , 0, 0, DISABLE_CLUSTERING}
150
151 #endif
152 #ifndef HOSTS_C
153
154 #define NCR5380_implementation_fields \
155 volatile unsigned short io_port
156
157 #define NCR5380_local_declare() \
158 volatile unsigned short io_port
159
160 #define NCR5380_setup(instance) \
161 io_port = (instance)->io_port
162
163 #define PAS16_io_port(reg) ( io_port + pas16_offset[(reg)] )
164
165 #if !(PDEBUG & PDEBUG_TRANSFER)
166 #define NCR5380_read(reg) ( inb(PAS16_io_port(reg)) )
167 #define NCR5380_write(reg, value) ( outb((value),PAS16_io_port(reg)) )
168 #else
169 #define NCR5380_read(reg) \
170 (((unsigned char) printk("scsi%d : read register %d at io_port %04x\n"\
171 , instance->hostno, (reg), PAS16_io_port(reg))), inb( PAS16_io_port(reg)) )
172
173 #define NCR5380_write(reg, value) \
174 (printk("scsi%d : write %02x to register %d at io_port %04x\n", \
175 instance->hostno, (value), (reg), PAS16_io_port(reg)), \
176 outb( (value),PAS16_io_port(reg) ) )
177
178 #endif
179
180
181 #define NCR5380_intr pas16_intr
182 #define NCR5380_queue_command pas16_queue_command
183 #define NCR5380_abort pas16_abort
184 #define NCR5380_reset pas16_reset
185
186
187
188
189 #define PAS16_IRQS 0xd4a8
190
191 #endif
192 #endif
193 #endif