#endif
 #ifdef UNSAFE
                 "UNSAFE "
-#endif
-#ifdef NCR53C400
-                "NCR53C400 "
 #endif
                 "");
 }
 
        if(in_interrupt())
                printk(KERN_ERR "NCR5380_init called with interrupts off!\n");
-       /* 
-        * On NCR53C400 boards, NCR5380 registers are mapped 8 past 
-        * the base address.
-        */
-
-#ifdef NCR53C400
-       if (flags & FLAG_NCR53C400)
-               instance->io_port += NCR53C400_address_adjust;
-#endif
 
        hostdata->aborted = 0;
        hostdata->id_mask = 1 << instance->this_id;
        NCR5380_write(MODE_REG, MR_BASE);
        NCR5380_write(TARGET_COMMAND_REG, 0);
        NCR5380_write(SELECT_ENABLE_REG, 0);
-
-#ifdef NCR53C400
-       if (hostdata->flags & FLAG_NCR53C400) {
-               NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE);
-       }
-#endif
        return 0;
 }
 
 
 #define AUTOPROBE_IRQ
 
 #ifdef CONFIG_SCSI_GENERIC_NCR53C400
-#define NCR53C400_PSEUDO_DMA 1
 #define PSEUDO_DMA
-#define NCR53C400
 #endif
 
 #include <asm/io.h>
        static unsigned int __initdata dtc_3181e_ports[] = {
                0x220, 0x240, 0x280, 0x2a0, 0x2c0, 0x300, 0x320, 0x340, 0
        };
-       int flags = 0;
+       int flags;
        struct Scsi_Host *instance;
 #ifdef SCSI_G_NCR5380_MEM
        unsigned long base;
                        continue;
 
                ports = NULL;
+               flags = 0;
                switch (overrides[current_override].board) {
                case BOARD_NCR5380:
                        flags = FLAG_NO_PSEUDO_DMA;
                        break;
                case BOARD_NCR53C400:
+#ifdef PSEUDO_DMA
                        flags = FLAG_NCR53C400;
+#endif
                        break;
                case BOARD_NCR53C400A:
                        flags = FLAG_NO_PSEUDO_DMA;
 #ifndef SCSI_G_NCR5380_MEM
                instance->io_port = overrides[current_override].NCR5380_map_name;
                instance->n_io_port = region_size;
+
+               /*
+                * On NCR53C400 boards, NCR5380 registers are mapped 8 past
+                * the base address.
+                */
+               if (overrides[current_override].board == BOARD_NCR53C400)
+                       instance->io_port += 8;
 #else
                instance->base = overrides[current_override].NCR5380_map_name;
                ((struct NCR5380_hostdata *)instance->hostdata)->iomem = iomem;
 
                NCR5380_init(instance, flags);
 
+               if (overrides[current_override].board == BOARD_NCR53C400)
+                       NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE);
+
                NCR5380_maybe_reset_bus(instance);
 
                if (overrides[current_override].irq != IRQ_AUTO)
 }
 #endif
 
-#ifdef NCR53C400_PSEUDO_DMA
+#ifdef PSEUDO_DMA
 
 /**
  *     NCR5380_pread           -       pseudo DMA read
                ;       // TIMEOUT
        return 0;
 }
-#endif                         /* PSEUDO_DMA */
+#endif /* PSEUDO_DMA */
 
 /*
  *     Include the NCR5380 core code that we build our driver around   
 
 #ifndef GENERIC_NCR5380_H
 #define GENERIC_NCR5380_H
 
-#ifdef NCR53C400
+#ifdef CONFIG_SCSI_GENERIC_NCR53C400
 #define BIOSPARAM
 #define NCR5380_BIOSPARAM generic_NCR5380_biosparam
 #else
 #define NCR5380_map_type int
 #define NCR5380_map_name port
 #define NCR53C400_register_offset 0
-#define NCR53C400_address_adjust 8
 
-#ifdef NCR53C400
+#ifdef CONFIG_SCSI_GENERIC_NCR53C400
 #define NCR5380_region_size 16
 #else
 #define NCR5380_region_size 8
 #define NCR5380_map_type unsigned long
 #define NCR5380_map_name base
 #define NCR53C400_register_offset 0x108
-#define NCR53C400_address_adjust 0
 #define NCR53C400_mem_base 0x3880
 #define NCR53C400_host_buffer 0x3900
 #define NCR5380_region_size 0x3a00