-#ifdef CONFIG_53C700_BOTH_MAPPED
-
-static inline __u8
-NCR_700_readb(struct Scsi_Host *host, __u32 reg)
-{
- __u8 val;
-
- const struct NCR_700_Host_Parameters *hostdata __attribute__((unused))
- = (struct NCR_700_Host_Parameters *)host->hostdata[0];
-
- if(hostdata->mem_mapped)
- val = NCR_700_mem_readb(host, reg);
- else
- val = NCR_700_io_readb(host, reg);
-
- return val;
-}
-
-static inline __u32
-NCR_700_readl(struct Scsi_Host *host, __u32 reg)
-{
- __u32 val;
-
- const struct NCR_700_Host_Parameters *hostdata __attribute__((unused))
- = (struct NCR_700_Host_Parameters *)host->hostdata[0];
-
- if(hostdata->mem_mapped)
- val = NCR_700_mem_readl(host, reg);
- else
- val = NCR_700_io_readl(host, reg);
-
- return val;
-}
-
-static inline void
-NCR_700_writeb(__u8 value, struct Scsi_Host *host, __u32 reg)
-{
- const struct NCR_700_Host_Parameters *hostdata __attribute__((unused))
- = (struct NCR_700_Host_Parameters *)host->hostdata[0];
-
- if(hostdata->mem_mapped)
- NCR_700_mem_writeb(value, host, reg);
- else
- NCR_700_io_writeb(value, host, reg);
-}
-
-static inline void
-NCR_700_writel(__u32 value, struct Scsi_Host *host, __u32 reg)
-{
- const struct NCR_700_Host_Parameters *hostdata __attribute__((unused))
- = (struct NCR_700_Host_Parameters *)host->hostdata[0];
-
- if(hostdata->mem_mapped)
- NCR_700_mem_writel(value, host, reg);
- else
- NCR_700_io_writel(value, host, reg);
-}
-
-static inline void
-NCR_700_set_mem_mapped(struct NCR_700_Host_Parameters *hostdata)
-{
- hostdata->mem_mapped = 1;
-}
-
-static inline void
-NCR_700_set_io_mapped(struct NCR_700_Host_Parameters *hostdata)
-{
- hostdata->mem_mapped = 0;
-}
-
-
-#elif defined(CONFIG_53C700_IO_MAPPED)
-
-#define NCR_700_readb NCR_700_io_readb
-#define NCR_700_readl NCR_700_io_readl
-#define NCR_700_writeb NCR_700_io_writeb
-#define NCR_700_writel NCR_700_io_writel
-
-#define NCR_700_set_io_mapped(x)
-#define NCR_700_set_mem_mapped(x) error I/O mapped only
-
-#elif defined(CONFIG_53C700_MEM_MAPPED)
-
-#define NCR_700_readb NCR_700_mem_readb
-#define NCR_700_readl NCR_700_mem_readl
-#define NCR_700_writeb NCR_700_mem_writeb
-#define NCR_700_writel NCR_700_mem_writel
-
-#define NCR_700_set_io_mapped(x) error MEM mapped only
-#define NCR_700_set_mem_mapped(x)
-
-#else
-#error neither CONFIG_53C700_MEM_MAPPED nor CONFIG_53C700_IO_MAPPED is set
-#endif
-