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 #ifndef SCSI_G_NCR5380_MEM
18 #define DRV_MODULE_NAME "g_NCR5380"
20 #define NCR5380_read(reg) \
21 inb(instance->io_port + (reg))
22 #define NCR5380_write(reg, value) \
23 outb(value, instance->io_port + (reg))
25 #define NCR5380_implementation_fields \
26 int c400_ctl_status; \
32 /* therefore SCSI_G_NCR5380_MEM */
33 #define DRV_MODULE_NAME "g_NCR5380_mmio"
35 #define NCR53C400_mem_base 0x3880
36 #define NCR53C400_host_buffer 0x3900
37 #define NCR53C400_region_size 0x3a00
39 #define NCR5380_read(reg) \
40 readb(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
41 NCR53C400_mem_base + (reg))
42 #define NCR5380_write(reg, value) \
43 writeb(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
44 NCR53C400_mem_base + (reg))
46 #define NCR5380_implementation_fields \
47 void __iomem *iomem; \
48 resource_size_t iomem_size; \
49 int c400_ctl_status; \
55 #define NCR5380_dma_xfer_len(instance, cmd, phase) \
56 generic_NCR5380_dma_xfer_len(instance, cmd)
57 #define NCR5380_dma_recv_setup generic_NCR5380_pread
58 #define NCR5380_dma_send_setup generic_NCR5380_pwrite
59 #define NCR5380_dma_residual(instance) (0)
61 #define NCR5380_intr generic_NCR5380_intr
62 #define NCR5380_queue_command generic_NCR5380_queue_command
63 #define NCR5380_abort generic_NCR5380_abort
64 #define NCR5380_bus_reset generic_NCR5380_bus_reset
65 #define NCR5380_info generic_NCR5380_info
67 #define NCR5380_io_delay(x) udelay(x)
69 #define BOARD_NCR5380 0
70 #define BOARD_NCR53C400 1
71 #define BOARD_NCR53C400A 2
72 #define BOARD_DTC3181E 3
73 #define BOARD_HP_C2502 4
75 #endif /* GENERIC_NCR5380_H */