]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/scsi/dtc.h
ncr5380: Remove useless prototypes
[karo-tx-linux.git] / drivers / scsi / dtc.h
1 /*
2  * DTC controller, taken from T128 driver by...
3  * Copyright 1993, Drew Eckhardt
4  *      Visionary Computing
5  *      (Unix and Linux consulting and custom programming)
6  *      drew@colorado.edu
7  *      +1 (303) 440-4894
8  *
9  * DISTRIBUTION RELEASE 2. 
10  *
11  * For more information, please consult 
12  *
13  * 
14  * 
15  * and 
16  *
17  * NCR 5380 Family
18  * SCSI Protocol Controller
19  * Databook
20  *
21  * NCR Microelectronics
22  * 1635 Aeroplaza Drive
23  * Colorado Springs, CO 80916
24  * 1+ (719) 578-3400
25  * 1+ (800) 334-5454
26  */
27
28 #ifndef DTC3280_H
29 #define DTC3280_H
30
31 #define DTCDEBUG 0
32 #define DTCDEBUG_INIT   0x1
33 #define DTCDEBUG_TRANSFER 0x2
34
35 #ifndef CMD_PER_LUN
36 #define CMD_PER_LUN 2
37 #endif
38
39 #ifndef CAN_QUEUE
40 #define CAN_QUEUE 32 
41 #endif
42
43 #define NCR5380_implementation_fields \
44     void __iomem *base
45
46 #define NCR5380_local_declare() \
47     void __iomem *base
48
49 #define NCR5380_setup(instance) \
50     base = ((struct NCR5380_hostdata *)(instance)->hostdata)->base
51
52 #define DTC_address(reg) (base + DTC_5380_OFFSET + reg)
53
54 #define dbNCR5380_read(reg)                                              \
55     (rval=readb(DTC_address(reg)), \
56      (((unsigned char) printk("DTC : read register %d at addr %p is: %02x\n"\
57     , (reg), DTC_address(reg), rval)), rval ) )
58
59 #define dbNCR5380_write(reg, value) do {                                  \
60     printk("DTC : write %02x to register %d at address %p\n",         \
61             (value), (reg), DTC_address(reg));     \
62     writeb(value, DTC_address(reg));} while(0)
63
64
65 #if !(DTCDEBUG & DTCDEBUG_TRANSFER) 
66 #define NCR5380_read(reg) (readb(DTC_address(reg)))
67 #define NCR5380_write(reg, value) (writeb(value, DTC_address(reg)))
68 #else
69 #define NCR5380_read(reg) (readb(DTC_address(reg)))
70 #define xNCR5380_read(reg)                                              \
71     (((unsigned char) printk("DTC : read register %d at address %p\n"\
72     , (reg), DTC_address(reg))), readb(DTC_address(reg)))
73
74 #define NCR5380_write(reg, value) do {                                  \
75     printk("DTC : write %02x to register %d at address %p\n",   \
76             (value), (reg), DTC_address(reg));  \
77     writeb(value, DTC_address(reg));} while(0)
78 #endif
79
80 #define NCR5380_intr                    dtc_intr
81 #define NCR5380_queue_command           dtc_queue_command
82 #define NCR5380_abort                   dtc_abort
83 #define NCR5380_bus_reset               dtc_bus_reset
84 #define NCR5380_show_info               dtc_show_info 
85 #define NCR5380_write_info              dtc_write_info 
86
87 /* 15 12 11 10
88    1001 1100 0000 0000 */
89
90 #define DTC_IRQS 0x9c00
91
92
93 #endif /* DTC3280_H */