Staging: rdma: amso1100: Remove unnecessary cast on void pointer
[linux/fpc-iii.git] / drivers / scsi / g_NCR5380.h
blobbea1a3b9b862dfd4b944072af3fbab22344bd66c
1 /*
2 * Generic Generic NCR5380 driver defines
4 * Copyright 1993, Drew Eckhardt
5 * Visionary Computing
6 * (Unix and Linux consulting and custom programming)
7 * drew@colorado.edu
8 * +1 (303) 440-4894
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 NCR53C400
18 #define BIOSPARAM
19 #define NCR5380_BIOSPARAM generic_NCR5380_biosparam
20 #else
21 #define NCR5380_BIOSPARAM NULL
22 #endif
24 #ifndef ASM
26 #ifndef CMD_PER_LUN
27 #define CMD_PER_LUN 2
28 #endif
30 #ifndef CAN_QUEUE
31 #define CAN_QUEUE 16
32 #endif
34 #define __STRVAL(x) #x
35 #define STRVAL(x) __STRVAL(x)
37 #ifndef SCSI_G_NCR5380_MEM
39 #define NCR5380_map_config port
40 #define NCR5380_map_type int
41 #define NCR5380_map_name port
42 #define NCR5380_instance_name io_port
43 #define NCR53C400_register_offset 0
44 #define NCR53C400_address_adjust 8
46 #ifdef NCR53C400
47 #define NCR5380_region_size 16
48 #else
49 #define NCR5380_region_size 8
50 #endif
52 #define NCR5380_read(reg) (inb(NCR5380_map_name + (reg)))
53 #define NCR5380_write(reg, value) (outb((value), (NCR5380_map_name + (reg))))
55 #define NCR5380_implementation_fields \
56 NCR5380_map_type NCR5380_map_name
58 #define NCR5380_local_declare() \
59 register NCR5380_implementation_fields
61 #define NCR5380_setup(instance) \
62 NCR5380_map_name = (NCR5380_map_type)((instance)->NCR5380_instance_name)
64 #else
65 /* therefore SCSI_G_NCR5380_MEM */
67 #define NCR5380_map_config memory
68 #define NCR5380_map_type unsigned long
69 #define NCR5380_map_name base
70 #define NCR5380_instance_name base
71 #define NCR53C400_register_offset 0x108
72 #define NCR53C400_address_adjust 0
73 #define NCR53C400_mem_base 0x3880
74 #define NCR53C400_host_buffer 0x3900
75 #define NCR5380_region_size 0x3a00
77 #define NCR5380_read(reg) readb(iomem + NCR53C400_mem_base + (reg))
78 #define NCR5380_write(reg, value) writeb(value, iomem + NCR53C400_mem_base + (reg))
80 #define NCR5380_implementation_fields \
81 NCR5380_map_type NCR5380_map_name; \
82 void __iomem *iomem;
84 #define NCR5380_local_declare() \
85 register void __iomem *iomem
87 #define NCR5380_setup(instance) \
88 iomem = (((struct NCR5380_hostdata *)(instance)->hostdata)->iomem)
90 #endif
92 #define NCR5380_intr generic_NCR5380_intr
93 #define NCR5380_queue_command generic_NCR5380_queue_command
94 #define NCR5380_abort generic_NCR5380_abort
95 #define NCR5380_bus_reset generic_NCR5380_bus_reset
96 #define NCR5380_pread generic_NCR5380_pread
97 #define NCR5380_pwrite generic_NCR5380_pwrite
98 #define NCR5380_info generic_NCR5380_info
99 #define NCR5380_show_info generic_NCR5380_show_info
101 #define BOARD_NCR5380 0
102 #define BOARD_NCR53C400 1
103 #define BOARD_NCR53C400A 2
104 #define BOARD_DTC3181E 3
106 #endif /* ndef ASM */
107 #endif /* GENERIC_NCR5380_H */