ncr5380: Move NCR53C400-specific code

Move board-specific code like this,
	NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE);
from the core driver to the board driver. Eliminate the NCR53C400 macro
from the core driver. Removal of all macros like this one will be
necessary in order to have one core driver that can support all kinds of
boards.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
这个提交包含在:
Finn Thain
2016-01-03 16:05:09 +11:00
提交者 Martin K. Petersen
父节点 b6488f97d3
当前提交 4d8c08c71e
修改 3 个文件,包含 18 行新增27 行删除

查看文件

@@ -653,9 +653,6 @@ static void prepare_info(struct Scsi_Host *instance)
#endif
#ifdef UNSAFE
"UNSAFE "
#endif
#ifdef NCR53C400
"NCR53C400 "
#endif
"");
}
@@ -782,15 +779,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
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;
@@ -824,12 +812,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
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;
}