summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/a2091.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/a2091.c')
-rw-r--r--drivers/scsi/a2091.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 2302d39a8..319f961f4 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -188,9 +188,8 @@ int __init a2091_detect(Scsi_Host_Template *tpnt)
{
static unsigned char called = 0;
struct Scsi_Host *instance;
- caddr_t address;
- unsigned int key;
- const struct ConfigDev *cd;
+ unsigned long address;
+ struct zorro_dev *z = NULL;
if (!MACH_IS_AMIGA || called)
return 0;
@@ -199,14 +198,19 @@ int __init a2091_detect(Scsi_Host_Template *tpnt)
tpnt->proc_name = "A2091";
tpnt->proc_info = &wd33c93_proc_info;
- while ((key = zorro_find(ZORRO_PROD_CBM_A590_A2091_1, 0, 0)) ||
- (key = zorro_find(ZORRO_PROD_CBM_A590_A2091_2, 0, 0))) {
- cd = zorro_get_board(key);
- address = cd->cd_BoardAddr;
+ while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
+ if (z->id != ZORRO_PROD_CBM_A590_A2091_1 &&
+ z->id != ZORRO_PROD_CBM_A590_A2091_2)
+ continue;
+ address = z->resource.start;
+ if (!request_mem_region(address, 256, "wd33c93"))
+ continue;
+ strcpy(z->name, "A590/A2091 SCSI Host Adapter");
+
instance = scsi_register (tpnt, sizeof (struct WD33C93_hostdata));
- instance->base = (unsigned char *)ZTWO_VADDR(address);
+ instance->base = ZTWO_VADDR(address);
instance->irq = IRQ_AMIGA_PORTS;
- instance->unique_id = key;
+ instance->unique_id = z->slotaddr;
DMA(instance)->DAWR = DAWR_A2091;
wd33c93_init(instance, (wd33c93_regs *)&(DMA(instance)->SASR),
dma_setup, dma_stop, WD33C93_FS_8_10);
@@ -217,7 +221,6 @@ int __init a2091_detect(Scsi_Host_Template *tpnt)
a2091_intr);
}
DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN;
- zorro_config_board(key, 0);
}
return num_a2091;
@@ -239,7 +242,7 @@ int a2091_release(struct Scsi_Host *instance)
{
#ifdef MODULE
DMA(instance)->CNTR = 0;
- zorro_unconfig_board(instance->unique_id, 0);
+ release_mem_region(ZTWO_PADDR(instance->base), 256);
if (--num_a2091 == 0)
free_irq(IRQ_AMIGA_PORTS, a2091_intr);
wd33c93_release();