X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fg_NCR5380.c;h=45756fa907772c94a068064e031bfcb6e4a067c2;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=e6bcfe949340a58837df06151803e1f5bcd69db9;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index e6bcfe949..45756fa90 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c @@ -127,7 +127,7 @@ static int ncr_53c400a = NCR_NOT_SET; static int dtc_3181e = NCR_NOT_SET; static struct override { - NCR5380_map_type NCR5380_map_name; + NCR5380_implementation_fields; int irq; int dma; int board; /* Use NCR53c400, Ricoh, etc. extensions ? */ @@ -299,10 +299,6 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) }; int flags = 0; struct Scsi_Host *instance; -#ifdef CONFIG_SCSI_G_NCR5380_MEM - unsigned long base; - void __iomem *iomem; -#endif if (ncr_irq != NCR_NOT_SET) overrides[0].irq = ncr_irq; @@ -428,22 +424,15 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) region_size = NCR5380_region_size; } #else - base = overrides[current_override].NCR5380_map_name; - if (!request_mem_region(base, NCR5380_region_size, "ncr5380")) - continue; - iomem = ioremap(base, NCR5380_region_size); - if (!iomem) { - release_mem_region(base, NCR5380_region_size); + if(!request_mem_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size, "ncr5380")) continue; - } #endif instance = scsi_register(tpnt, sizeof(struct NCR5380_hostdata)); if (instance == NULL) { #ifndef CONFIG_SCSI_G_NCR5380_MEM release_region(overrides[current_override].NCR5380_map_name, region_size); #else - iounmap(iomem); - release_mem_region(base, NCR5380_region_size); + release_mem_region(overrides[current_override].NCR5380_map_name, NCR5380_region_size); #endif continue; } @@ -451,8 +440,6 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) instance->NCR5380_instance_name = overrides[current_override].NCR5380_map_name; #ifndef CONFIG_SCSI_G_NCR5380_MEM instance->n_io_port = region_size; -#else - ((struct NCR5380_hostdata *)instance->hostdata).iomem = iomem; #endif NCR5380_init(instance, flags); @@ -522,7 +509,6 @@ int generic_NCR5380_release_resources(struct Scsi_Host *instance) #ifndef CONFIG_SCSI_G_NCR5380_MEM release_region(instance->NCR5380_instance_name, instance->n_io_port); #else - iounmap(((struct NCR5380_hostdata *)instance->hostdata).iomem); release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size); #endif @@ -600,7 +586,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, } #else /* implies CONFIG_SCSI_G_NCR5380_MEM */ - memcpy_fromio(dst + start, iomem + NCR53C400_host_buffer, 128); + isa_memcpy_fromio(dst + start, NCR53C400_host_buffer + NCR5380_map_name, 128); #endif start += 128; blocks--; @@ -620,7 +606,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, } #else /* implies CONFIG_SCSI_G_NCR5380_MEM */ - memcpy_fromio(dst + start, iomem + NCR53C400_host_buffer, 128); + isa_memcpy_fromio(dst + start, NCR53C400_host_buffer + NCR5380_map_name, 128); #endif start += 128; blocks--; @@ -685,7 +671,7 @@ static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, } #else /* implies CONFIG_SCSI_G_NCR5380_MEM */ - memcpy_toio(iomem + NCR53C400_host_buffer, src + start, 128); + isa_memcpy_toio(NCR53C400_host_buffer + NCR5380_map_name, src + start, 128); #endif start += 128; blocks--; @@ -701,7 +687,7 @@ static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, } #else /* implies CONFIG_SCSI_G_NCR5380_MEM */ - memcpy_toio(iomem + NCR53C400_host_buffer, src + start, 128); + isa_memcpy_toio(NCR53C400_host_buffer + NCR5380_map_name, src + start, 128); #endif start += 128; blocks--;