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 #ifndef GENERIC_NCR5380_H
30 #define GENERIC_NCR5380_H
31
32 #define GENERIC_NCR5380_PUBLIC_RELEASE 1
33
34
35 #ifndef ASM
36 int generic_NCR5380_abort(Scsi_Cmnd *);
37 int generic_NCR5380_detect(Scsi_Host_Template *);
38 int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
39 int generic_NCR5380_reset(Scsi_Cmnd *);
40
41
42 #ifndef NULL
43 #define NULL 0
44 #endif
45
46 #ifndef CMD_PER_LUN
47 #define CMD_PER_LUN 2
48 #endif
49
50 #ifndef CAN_QUEUE
51 #define CAN_QUEUE 16
52 #endif
53
54 #ifdef HOSTS_C
55
56
57 #define GENERIC_NCR5380 {NULL, NULL, NULL, NULL, \
58 "Trantor T128/T128F/T228", \
59 generic_NCR5380_detect, NULL, NULL, NULL, \
60 generic_NCR5380_queue_command, generic_NCR5380_abort, \
61 generic_NCR5380_reset, NULL, \
62 NULL, CAN_QUEUE, 7, SG_ALL, \
63 CMD_PER_LUN , 0, 0, DISABLE_CLUSTERING}
64
65 #else
66 #define NCR5380_implementation_fields \
67 int port
68
69 #define NCR5380_local_declare() \
70 register int port
71
72 #define NCR5380_setup(instance) \
73 port = (instance)->io_port
74
75 #define NCR5380_read(reg) (inb(port + (reg)))
76 #define NCR5380_write(reg, value) (outb((value), (port + (reg))))
77
78 #define NCR5380_intr generic_NCR5380_intr
79 #define NCR5380_queue_command generic_NCR5380_queue_command
80 #define NCR5380_abort generic_NCR5380_abort
81 #define NCR5380_reset generic_NCR5380_reset
82
83 #define BOARD_NORMAL 0
84 #define BOARD_NCR53C400 1
85
86 #endif
87 #endif
88 #endif
89