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.
16 #define DTCDEBUG_INIT 0x1
17 #define DTCDEBUG_TRANSFER 0x2
27 #define NCR5380_implementation_fields \
30 #define NCR5380_local_declare() \
33 #define NCR5380_setup(instance) \
34 base = ((struct NCR5380_hostdata *)(instance)->hostdata)->base
36 #define DTC_address(reg) (base + DTC_5380_OFFSET + reg)
38 #define dbNCR5380_read(reg) \
39 (rval=readb(DTC_address(reg)), \
40 (((unsigned char) printk("DTC : read register %d at addr %p is: %02x\n"\
41 , (reg), DTC_address(reg), rval)), rval ) )
43 #define dbNCR5380_write(reg, value) do { \
44 printk("DTC : write %02x to register %d at address %p\n", \
45 (value), (reg), DTC_address(reg)); \
46 writeb(value, DTC_address(reg));} while(0)
49 #if !(DTCDEBUG & DTCDEBUG_TRANSFER)
50 #define NCR5380_read(reg) (readb(DTC_address(reg)))
51 #define NCR5380_write(reg, value) (writeb(value, DTC_address(reg)))
53 #define NCR5380_read(reg) (readb(DTC_address(reg)))
54 #define xNCR5380_read(reg) \
55 (((unsigned char) printk("DTC : read register %d at address %p\n"\
56 , (reg), DTC_address(reg))), readb(DTC_address(reg)))
58 #define NCR5380_write(reg, value) do { \
59 printk("DTC : write %02x to register %d at address %p\n", \
60 (value), (reg), DTC_address(reg)); \
61 writeb(value, DTC_address(reg));} while(0)
64 #define NCR5380_intr dtc_intr
65 #define NCR5380_queue_command dtc_queue_command
66 #define NCR5380_abort dtc_abort
67 #define NCR5380_bus_reset dtc_bus_reset
68 #define NCR5380_info dtc_info
69 #define NCR5380_show_info dtc_show_info
70 #define NCR5380_write_info dtc_write_info
73 1001 1100 0000 0000 */
75 #define DTC_IRQS 0x9c00
78 #endif /* DTC3280_H */