aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/g_NCR5380.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/g_NCR5380.h')
-rw-r--r--drivers/scsi/g_NCR5380.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
index 656fbe2f91f6..d60a89cb8052 100644
--- a/drivers/scsi/g_NCR5380.h
+++ b/drivers/scsi/g_NCR5380.h
@@ -82,6 +82,15 @@ static const char* generic_NCR5380_info(struct Scsi_Host *);
82#define NCR5380_read(reg) (inb(NCR5380_map_name + (reg))) 82#define NCR5380_read(reg) (inb(NCR5380_map_name + (reg)))
83#define NCR5380_write(reg, value) (outb((value), (NCR5380_map_name + (reg)))) 83#define NCR5380_write(reg, value) (outb((value), (NCR5380_map_name + (reg))))
84 84
85#define NCR5380_implementation_fields \
86 NCR5380_map_type NCR5380_map_name
87
88#define NCR5380_local_declare() \
89 register NCR5380_implementation_fields
90
91#define NCR5380_setup(instance) \
92 NCR5380_map_name = (NCR5380_map_type)((instance)->NCR5380_instance_name)
93
85#else 94#else
86/* therefore CONFIG_SCSI_G_NCR5380_MEM */ 95/* therefore CONFIG_SCSI_G_NCR5380_MEM */
87 96
@@ -95,18 +104,20 @@ static const char* generic_NCR5380_info(struct Scsi_Host *);
95#define NCR53C400_host_buffer 0x3900 104#define NCR53C400_host_buffer 0x3900
96#define NCR5380_region_size 0x3a00 105#define NCR5380_region_size 0x3a00
97 106
98#define NCR5380_read(reg) isa_readb(NCR5380_map_name + NCR53C400_mem_base + (reg)) 107#define NCR5380_read(reg) readb(iomem + NCR53C400_mem_base + (reg))
99#define NCR5380_write(reg, value) isa_writeb(value, NCR5380_map_name + NCR53C400_mem_base + (reg)) 108#define NCR5380_write(reg, value) writeb(value, iomem + NCR53C400_mem_base + (reg))
100#endif
101 109
102#define NCR5380_implementation_fields \ 110#define NCR5380_implementation_fields \
103 NCR5380_map_type NCR5380_map_name 111 NCR5380_map_type NCR5380_map_name; \
112 void __iomem *iomem;
104 113
105#define NCR5380_local_declare() \ 114#define NCR5380_local_declare() \
106 register NCR5380_implementation_fields 115 register void __iomem *iomem
107 116
108#define NCR5380_setup(instance) \ 117#define NCR5380_setup(instance) \
109 NCR5380_map_name = (NCR5380_map_type)((instance)->NCR5380_instance_name) 118 iomem = (((struct NCR5380_hostdata *)(instance)->hostdata).iomem)
119
120#endif
110 121
111#define NCR5380_intr generic_NCR5380_intr 122#define NCR5380_intr generic_NCR5380_intr
112#define NCR5380_queue_command generic_NCR5380_queue_command 123#define NCR5380_queue_command generic_NCR5380_queue_command