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