Commit 01d7cc52 authored by James Bottomley's avatar James Bottomley

Amiga NCR53c710: Coalesce all configuration options into one

From: Geert Uytterhoeven <geert@linux-m68k.org>

Amiga NCR53c710: Coalesce all Amiga NCR53c710 SCSI host adapter configuration
options into one config option, as suggested by Matthew Wilcox.
parent 62d9fcff
...@@ -1473,12 +1473,6 @@ config A3000_SCSI ...@@ -1473,12 +1473,6 @@ config A3000_SCSI
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called wd33c93. module will be called wd33c93.
config A4000T_SCSI
bool "A4000T SCSI support (EXPERIMENTAL)"
depends on AMIGA && SCSI && EXPERIMENTAL && BROKEN
help
Support for the NCR53C710 SCSI controller on the Amiga 4000T.
config A2091_SCSI config A2091_SCSI
tristate "A2091/A590 WD33C93A support" tristate "A2091/A590 WD33C93A support"
depends on ZORRO && SCSI depends on ZORRO && SCSI
...@@ -1541,28 +1535,24 @@ config FASTLANE_SCSI ...@@ -1541,28 +1535,24 @@ config FASTLANE_SCSI
If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
one in the near future, say Y to this question. Otherwise, say N. one in the near future, say Y to this question. Otherwise, say N.
config A4091_SCSI config SCSI_AMIGA7XX
bool "A4091 SCSI support (EXPERIMENTAL)" bool "Amiga NCR53c710 SCSI support (EXPERIMENTAL)"
depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN depends on AMIGA && SCSI && EXPERIMENTAL && BROKEN
help
Support for the NCR53C710 chip on the Amiga 4091 Z3 SCSI2 controller
(1993). Very obscure -- the 4091 was part of an Amiga 4000 upgrade
plan at the time the Amiga business was sold to DKB.
config WARPENGINE_SCSI
bool "WarpEngine SCSI support (EXPERIMENTAL)"
depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN
help
Support for MacroSystem Development's WarpEngine Amiga SCSI-2
controller. Info at
<http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>.
config BLZ603EPLUS_SCSI
bool "Blizzard PowerUP 603e+ SCSI (EXPERIMENTAL)"
depends on ZORRO && SCSI && EXPERIMENTAL && BROKEN
help help
If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+ Support for various NCR53c710-based SCSI controllers on the Amiga.
accelerator, say Y. Otherwise, say N. This includes:
- the builtin SCSI controller on the Amiga 4000T,
- the Amiga 4091 Zorro III SCSI-2 controller,
- the MacroSystem Development's WarpEngine Amiga SCSI-2 controller
(info at
<http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5>),
- the SCSI controller on the Phase5 Blizzard PowerUP 603e+
accelerator card for the Amiga 1200,
- the SCSI controller on the GVP Turbo 040/060 accelerator.
Note that all of the above SCSI controllers, except for the builtin
SCSI controller on the Amiga 4000T, reside on the Zorro expansion
bus, so you also have to enable Zorro bus support if you want to use
them.
config OKTAGON_SCSI config OKTAGON_SCSI
tristate "BSC Oktagon SCSI support (EXPERIMENTAL)" tristate "BSC Oktagon SCSI support (EXPERIMENTAL)"
...@@ -1660,7 +1650,7 @@ config BVME6000_SCSI ...@@ -1660,7 +1650,7 @@ config BVME6000_SCSI
config SCSI_NCR53C7xx_FAST config SCSI_NCR53C7xx_FAST
bool "allow FAST-SCSI [10MHz]" bool "allow FAST-SCSI [10MHz]"
depends on A4000T_SCSI || A4091_SCSI || BLZ603EPLUS_SCSI || WARPENGINE_SCSI || MVME16x_SCSI || BVME6000_SCSI depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI
help help
This will enable 10MHz FAST-SCSI transfers with your host This will enable 10MHz FAST-SCSI transfers with your host
adapter. Some systems have problems with that speed, so it's safest adapter. Some systems have problems with that speed, so it's safest
...@@ -1706,7 +1696,6 @@ config WD33C93_PIO ...@@ -1706,7 +1696,6 @@ config WD33C93_PIO
default y default y
# bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI # bool 'Cyberstorm Mk III SCSI support (EXPERIMENTAL)' CONFIG_CYBERSTORMIII_SCSI
# bool 'GVP Turbo 040/060 SCSI support (EXPERIMENTAL)' CONFIG_GVP_TURBO_SCSI
config ZFCP config ZFCP
tristate "IBM z900 OpenFCP/SCSI support" tristate "IBM z900 OpenFCP/SCSI support"
......
...@@ -22,10 +22,7 @@ subdir-$(CONFIG_PCMCIA) += pcmcia ...@@ -22,10 +22,7 @@ subdir-$(CONFIG_PCMCIA) += pcmcia
obj-$(CONFIG_SCSI) += scsi_mod.o obj-$(CONFIG_SCSI) += scsi_mod.o
obj-$(CONFIG_A4000T_SCSI) += amiga7xx.o 53c7xx.o obj-$(CONFIG_SCSI_AMIGA7XX) += amiga7xx.o 53c7xx.o
obj-$(CONFIG_A4091_SCSI) += amiga7xx.o 53c7xx.o
obj-$(CONFIG_BLZ603EPLUS_SCSI) += amiga7xx.o 53c7xx.o
obj-$(CONFIG_WARPENGINE_SCSI) += amiga7xx.o 53c7xx.o
obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o
obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o
obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o
......
/* /*
* Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux. * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
* Amiga MacroSystemUS WarpEngine SCSI controller. * Amiga MacroSystemUS WarpEngine SCSI controller.
* Amiga Technologies A4000T SCSI controller. * Amiga Technologies A4000T SCSI controller.
* Amiga Technologies/DKB A4091 SCSI controller. * Amiga Technologies/DKB A4091 SCSI controller.
* *
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
#include <linux/version.h> #include <linux/version.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/zorro.h> #include <linux/zorro.h>
#include <linux/stat.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/amigaints.h> #include <asm/amigaints.h>
#include <asm/amigahw.h> #include <asm/amigahw.h>
#include <asm/dma.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "scsi.h" #include "scsi.h"
...@@ -28,104 +29,83 @@ ...@@ -28,104 +29,83 @@
#include "53c7xx.h" #include "53c7xx.h"
#include "amiga7xx.h" #include "amiga7xx.h"
#include<linux/stat.h>
int __init amiga7xx_detect(Scsi_Host_Template *tpnt) static int amiga7xx_register_one(Scsi_Host_Template *tpnt,
unsigned long address)
{ {
static unsigned char called = 0;
int num = 0, clock;
long long options; long long options;
struct zorro_dev *z = NULL; int clock;
unsigned long address;
if (called || !MACH_IS_AMIGA) if (!request_mem_region(address, 0x1000, "ncr53c710"))
return 0; return 0;
tpnt->proc_name = "Amiga7xx"; address = (unsigned long)z_ioremap(address, 0x1000);
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 | OPTION_INTFLY |
OPTION_SYNCHRONOUS | OPTION_ALWAYS_SYNCHRONOUS |
OPTION_DISCONNECT;
clock = 50000000; /* 50 MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, address, 0, IRQ_AMIGA_PORTS, DMA_NONE,
options, clock);
return 1;
}
#ifdef CONFIG_A4000T_SCSI
if (AMIGAHW_PRESENT(A4000_SCSI)) { #ifdef CONFIG_ZORRO
address = 0xdd0040;
if (request_mem_region(address, 0x1000, "ncr53c710")) { static struct {
address = ZTWO_VADDR(address); zorro_id id;
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 | unsigned long offset;
OPTION_INTFLY | OPTION_SYNCHRONOUS | int absolute; /* offset is absolute address */
OPTION_ALWAYS_SYNCHRONOUS | OPTION_DISCONNECT; } amiga7xx_table[] = {
clock = 50000000; /* 50MHz SCSI Clock */ { .id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, .offset = 0xf40000,
ncr53c7xx_init(tpnt, 0, 710, address, 0, IRQ_AMIGA_PORTS, DMA_NONE, .absolute = 1 },
options, clock); { .id = ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx, .offset = 0x40000 },
num++; { .id = ZORRO_PROD_CBM_A4091_1, .offset = 0x800000 },
} { .id = ZORRO_PROD_CBM_A4091_2, .offset = 0x800000 },
} { .id = ZORRO_PROD_GVP_GFORCE_040_060, .offset = 0x40000 },
#endif { 0 }
};
static int __init amiga7xx_zorro_detect(Scsi_Host_Template *tpnt)
{
int num = 0, i;
struct zorro_dev *z = NULL;
unsigned long address;
while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { while ((z = zorro_find_device(ZORRO_WILDCARD, z))) {
unsigned long address = z->resource.start; for (i = 0; amiga7xx_table[i].id; i++)
unsigned long size = z->resource.end-z->resource.start+1; if (z->id == amiga7xx_table[i].id)
switch (z->id) {
#ifdef CONFIG_BLZ603EPLUS_SCSI
case ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS:
address = 0xf40000;
if (request_mem_region(address, 0x1000, "ncr53c710")) {
address = ZTWO_VADDR(address);
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
OPTION_INTFLY | OPTION_SYNCHRONOUS |
OPTION_ALWAYS_SYNCHRONOUS | OPTION_DISCONNECT;
clock = 50000000; /* 50MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, address, 0, IRQ_AMIGA_PORTS,
DMA_NONE, options, clock);
num++;
}
break; break;
#endif if (!amiga7xx_table[i].id)
continue;
if (amiga7xx_table[i].absolute)
address = amiga7xx_table[i].offset;
else
address = z->resource.start + amiga7xx_table[i].offset;
num += amiga7xx_register_one(tpnt, address);
}
return num;
}
#ifdef CONFIG_WARPENGINE_SCSI #endif /* CONFIG_ZORRO */
case ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx:
if (request_mem_region(address+0x40000, 0x1000, "ncr53c710")) {
address = (unsigned long)z_ioremap(address, size);
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
OPTION_INTFLY | OPTION_SYNCHRONOUS |
OPTION_ALWAYS_SYNCHRONOUS | OPTION_DISCONNECT;
clock = 50000000; /* 50MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, address+0x40000, 0,
IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
num++;
}
break;
#endif
#ifdef CONFIG_A4091_SCSI
case ZORRO_PROD_CBM_A4091_1:
case ZORRO_PROD_CBM_A4091_2:
if (request_mem_region(address+0x800000, 0x1000, "ncr53c710")) {
address = (unsigned long)z_ioremap(address, size);
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
OPTION_INTFLY | OPTION_SYNCHRONOUS |
OPTION_ALWAYS_SYNCHRONOUS | OPTION_DISCONNECT;
clock = 50000000; /* 50MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, address+0x800000, 0,
IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
num++;
}
break;
#endif
#ifdef CONFIG_GVP_TURBO_SCSI int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
case ZORRO_PROD_GVP_GFORCE_040_060: {
if (request_mem_region(address+0x40000, 0x1000, "ncr53c710")) { static unsigned char called = 0;
address = ZTWO_VADDR(address); int num = 0;
options = OPTION_MEMORY_MAPPED | OPTION_DEBUG_TEST1 |
OPTION_INTFLY | OPTION_SYNCHRONOUS | if (called || !MACH_IS_AMIGA)
OPTION_ALWAYS_SYNCHRONOUS | OPTION_DISCONNECT; return 0;
clock = 50000000; /* 50MHz SCSI Clock */
ncr53c7xx_init(tpnt, 0, 710, address+0x40000, 0, tpnt->proc_name = "Amiga7xx";
IRQ_AMIGA_PORTS, DMA_NONE, options, clock);
num++; if (AMIGAHW_PRESENT(A4000_SCSI))
} num += amiga7xx_register_one(tpnt, 0xdd0040);
#ifdef CONFIG_ZORRO
num += amiga7xx_zorro_detect(tpnt);
#endif #endif
}
}
called = 1; called = 1;
return num; return num;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment