2 * DTC controller, taken from T128 driver by...
3 * Copyright 1993, Drew Eckhardt
5 * (Unix and Linux consulting and custom programming)
9 * DISTRIBUTION RELEASE 2.
11 * For more information, please consult
18 * SCSI Protocol Controller
21 * NCR Microelectronics
22 * 1635 Aeroplaza Drive
23 * Colorado Springs, CO 80916
31 static int dtc_abort(Scsi_Cmnd
*);
32 static int dtc_biosparam(struct scsi_device
*, struct block_device
*,
34 static int dtc_detect(Scsi_Host_Template
*);
35 static int dtc_queue_command(Scsi_Cmnd
*, void (*done
)(Scsi_Cmnd
*));
36 static int dtc_bus_reset(Scsi_Cmnd
*);
37 static int dtc_device_reset(Scsi_Cmnd
*);
38 static int dtc_host_reset(Scsi_Cmnd
*);
48 #define NCR5380_implementation_fields \
51 #define NCR5380_local_declare() \
54 #define NCR5380_setup(instance) \
55 base = ((struct NCR5380_hostdata *)(instance)->hostdata)->base
57 #define DTC_address(reg) (base + DTC_5380_OFFSET + reg)
59 #define dbNCR5380_read(reg) \
60 (rval=readb(DTC_address(reg)), \
61 (((unsigned char) printk("DTC : read register %d at addr %p is: %02x\n"\
62 , (reg), DTC_address(reg), rval)), rval ) )
64 #define dbNCR5380_write(reg, value) do { \
65 printk("DTC : write %02x to register %d at address %p\n", \
66 (value), (reg), DTC_address(reg)); \
67 writeb(value, DTC_address(reg));} while(0)
70 #if !(DTCDEBUG & DTCDEBUG_TRANSFER)
71 #define NCR5380_read(reg) (readb(DTC_address(reg)))
72 #define NCR5380_write(reg, value) (writeb(value, DTC_address(reg)))
74 #define NCR5380_read(reg) (readb(DTC_address(reg)))
75 #define xNCR5380_read(reg) \
76 (((unsigned char) printk("DTC : read register %d at address %p\n"\
77 , (reg), DTC_address(reg))), readb(DTC_address(reg)))
79 #define NCR5380_write(reg, value) do { \
80 printk("DTC : write %02x to register %d at address %p\n", \
81 (value), (reg), DTC_address(reg)); \
82 writeb(value, DTC_address(reg));} while(0)
85 #define NCR5380_intr dtc_intr
86 #define NCR5380_queue_command dtc_queue_command
87 #define NCR5380_abort dtc_abort
88 #define NCR5380_bus_reset dtc_bus_reset
89 #define NCR5380_device_reset dtc_device_reset
90 #define NCR5380_host_reset dtc_host_reset
91 #define NCR5380_proc_info dtc_proc_info
94 1001 1100 0000 0000 */
96 #define DTC_IRQS 0x9c00
99 #endif /* DTC3280_H */