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
32 int dtc_abort(Scsi_Cmnd *);
33 int dtc_biosparam(Disk *, kdev_t, int*);
34 int dtc_detect(Scsi_Host_Template *);
35 int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
36 int dtc_reset(Scsi_Cmnd *, unsigned int reset_flags);
37 int dtc_proc_info (char *buffer, char **start, off_t offset,
38 int length, int hostno, int inout);
53 * I hadn't thought of this with the earlier drivers - but to prevent
54 * macro definition conflicts, we shouldn't define all of the internal
55 * macros when this is being used solely for the host stub.
59 name: "DTC 3180/3280 ", \
61 queuecommand: dtc_queue_command, \
64 bios_param: dtc_biosparam, \
65 can_queue: CAN_QUEUE, \
67 sg_tablesize: SG_ALL, \
68 cmd_per_lun: CMD_PER_LUN , \
69 use_clustering: DISABLE_CLUSTERING}
71 #define NCR5380_implementation_fields \
72 volatile unsigned int base
74 #define NCR5380_local_declare() \
75 volatile unsigned int base
77 #define NCR5380_setup(instance) \
78 base = (unsigned int)(instance)->base
80 #define DTC_address(reg) (base + DTC_5380_OFFSET + reg)
82 #define dbNCR5380_read(reg) \
83 (rval=isa_readb(DTC_address(reg)), \
84 (((unsigned char) printk("DTC : read register %d at addr %08x is: %02x\n"\
85 , (reg), (int)DTC_address(reg), rval)), rval ) )
87 #define dbNCR5380_write(reg, value) do { \
88 printk("DTC : write %02x to register %d at address %08x\n", \
89 (value), (reg), (int)DTC_address(reg)); \
90 isa_writeb(value, DTC_address(reg));} while(0)
93 #if !(DTCDEBUG & DTCDEBUG_TRANSFER)
94 #define NCR5380_read(reg) (isa_readb(DTC_address(reg)))
95 #define NCR5380_write(reg, value) (isa_writeb(value, DTC_address(reg)))
97 #define NCR5380_read(reg) (isa_readb(DTC_address(reg)))
98 #define xNCR5380_read(reg) \
99 (((unsigned char) printk("DTC : read register %d at address %08x\n"\
100 , (reg), DTC_address(reg))), isa_readb(DTC_address(reg)))
102 #define NCR5380_write(reg, value) do { \
103 printk("DTC : write %02x to register %d at address %08x\n", \
104 (value), (reg), (int)DTC_address(reg)); \
105 isa_writeb(value, DTC_address(reg));} while(0)
108 #define NCR5380_intr dtc_intr
109 #define do_NCR5380_intr do_dtc_intr
110 #define NCR5380_queue_command dtc_queue_command
111 #define NCR5380_abort dtc_abort
112 #define NCR5380_reset dtc_reset
113 #define NCR5380_proc_info dtc_proc_info
116 1001 1100 0000 0000 */
118 #define DTC_IRQS 0x9c00
121 #endif /* ndef ASM */
122 #endif /* DTC3280_H */