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
24 #define __STRVAL(x) #x
25 #define STRVAL(x) __STRVAL(x)
27 #ifndef SCSI_G_NCR5380_MEM
28 #define DRV_MODULE_NAME "g_NCR5380"
30 #define NCR5380_map_type int
31 #define NCR5380_map_name port
33 #ifdef CONFIG_SCSI_GENERIC_NCR53C400
34 #define NCR5380_region_size 16
36 #define NCR5380_region_size 8
39 #define NCR5380_read(reg) \
40 inb(instance->io_port + (reg))
41 #define NCR5380_write(reg, value) \
42 outb(value, instance->io_port + (reg))
44 #define NCR5380_implementation_fields \
45 int c400_ctl_status; \
51 /* therefore SCSI_G_NCR5380_MEM */
52 #define DRV_MODULE_NAME "g_NCR5380_mmio"
54 #define NCR5380_map_type unsigned long
55 #define NCR5380_map_name base
56 #define NCR53C400_mem_base 0x3880
57 #define NCR53C400_host_buffer 0x3900
58 #define NCR5380_region_size 0x3a00
60 #define NCR5380_read(reg) \
61 readb(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
62 NCR53C400_mem_base + (reg))
63 #define NCR5380_write(reg, value) \
64 writeb(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
65 NCR53C400_mem_base + (reg))
67 #define NCR5380_implementation_fields \
68 void __iomem *iomem; \
69 int c400_ctl_status; \
75 #define NCR5380_dma_xfer_len(instance, cmd, phase) \
76 generic_NCR5380_dma_xfer_len(cmd)
78 #define NCR5380_intr generic_NCR5380_intr
79 #define NCR5380_queue_command generic_NCR5380_queue_command
80 #define NCR5380_abort generic_NCR5380_abort
81 #define NCR5380_bus_reset generic_NCR5380_bus_reset
82 #define NCR5380_pread generic_NCR5380_pread
83 #define NCR5380_pwrite generic_NCR5380_pwrite
84 #define NCR5380_info generic_NCR5380_info
85 #define NCR5380_show_info generic_NCR5380_show_info
87 #define BOARD_NCR5380 0
88 #define BOARD_NCR53C400 1
89 #define BOARD_NCR53C400A 2
90 #define BOARD_DTC3181E 3
91 #define BOARD_HP_C2502 4
93 #endif /* GENERIC_NCR5380_H */