2 * Generic Generic NCR5380 driver defines
4 * Copyright 1993, Drew Eckhardt
6 * (Unix and Linux consulting and custom programming)
10 * NCR53C400 extensions (c) 1994,1995,1996, Kevin Lentin
11 * K.Lentin@cs.monash.edu.au
14 #ifndef GENERIC_NCR5380_H
15 #define GENERIC_NCR5380_H
17 #ifdef CONFIG_SCSI_GENERIC_NCR53C400
19 #define NCR5380_BIOSPARAM generic_NCR5380_biosparam
21 #define NCR5380_BIOSPARAM NULL
32 #define __STRVAL(x) #x
33 #define STRVAL(x) __STRVAL(x)
35 #ifndef SCSI_G_NCR5380_MEM
37 #define NCR5380_map_type int
38 #define NCR5380_map_name port
39 #define NCR53C400_register_offset 0
41 #ifdef CONFIG_SCSI_GENERIC_NCR53C400
42 #define NCR5380_region_size 16
44 #define NCR5380_region_size 8
47 #define NCR5380_read(reg) \
48 inb(instance->io_port + (reg))
49 #define NCR5380_write(reg, value) \
50 outb(value, instance->io_port + (reg))
52 #define NCR5380_implementation_fields /* none */
55 /* therefore SCSI_G_NCR5380_MEM */
57 #define NCR5380_map_type unsigned long
58 #define NCR5380_map_name base
59 #define NCR53C400_register_offset 0x108
60 #define NCR53C400_mem_base 0x3880
61 #define NCR53C400_host_buffer 0x3900
62 #define NCR5380_region_size 0x3a00
64 #define NCR5380_read(reg) \
65 readb(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
66 NCR53C400_mem_base + (reg))
67 #define NCR5380_write(reg, value) \
68 writeb(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
69 NCR53C400_mem_base + (reg))
71 #define NCR5380_implementation_fields \
76 #define NCR5380_dma_xfer_len(instance, cmd, phase) \
77 generic_NCR5380_dma_xfer_len(cmd)
79 #define NCR5380_intr generic_NCR5380_intr
80 #define NCR5380_queue_command generic_NCR5380_queue_command
81 #define NCR5380_abort generic_NCR5380_abort
82 #define NCR5380_bus_reset generic_NCR5380_bus_reset
83 #define NCR5380_pread generic_NCR5380_pread
84 #define NCR5380_pwrite generic_NCR5380_pwrite
85 #define NCR5380_info generic_NCR5380_info
86 #define NCR5380_show_info generic_NCR5380_show_info
88 #define BOARD_NCR5380 0
89 #define BOARD_NCR53C400 1
90 #define BOARD_NCR53C400A 2
91 #define BOARD_DTC3181E 3
93 #endif /* GENERIC_NCR5380_H */