diff options
| author | bjh21 <bjh21@NetBSD.org> | 2001-07-04 15:01:08 +0000 |
|---|---|---|
| committer | bjh21 <bjh21@NetBSD.org> | 2001-07-04 15:01:08 +0000 |
| commit | e02efcb8ccb78e78d487da30f510e18e71ca118d (patch) | |
| tree | 689363640efeb27978d69089dffef9e3c63cab7e /sys/dev | |
| parent | fd74cdde9dd5a0eb1c80aea5463d63d06057dfc7 (diff) | |
Add support for Oak and HCCS SCSI cards fitted with PowerROMs. Since this
depends on podloader support, it won't work on arm32 yet.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/podulebus/files.podulebus | 6 | ||||
| -rw-r--r-- | sys/dev/podulebus/hcsc.c | 11 | ||||
| -rw-r--r-- | sys/dev/podulebus/oak.c | 15 | ||||
| -rw-r--r-- | sys/dev/podulebus/powerromreg.h | 64 |
4 files changed, 86 insertions, 10 deletions
diff --git a/sys/dev/podulebus/files.podulebus b/sys/dev/podulebus/files.podulebus index ff620b2ba6d..b711a96da82 100644 --- a/sys/dev/podulebus/files.podulebus +++ b/sys/dev/podulebus/files.podulebus @@ -1,15 +1,15 @@ -# $NetBSD: files.podulebus,v 1.12 2001/07/04 14:33:43 bjh21 Exp $ +# $NetBSD: files.podulebus,v 1.13 2001/07/04 15:01:08 bjh21 Exp $ device podulebus { [slot = -1] } define podloader # Oak SCSI -device oak: scsi, ncr5380sbc +device oak: scsi, ncr5380sbc, podloader attach oak at podulebus file dev/podulebus/oak.c oak # HCCS 8-bit SCSI -device hcsc: scsi, ncr5380sbc +device hcsc: scsi, ncr5380sbc, podloader attach hcsc at podulebus file dev/podulebus/hcsc.c hcsc diff --git a/sys/dev/podulebus/hcsc.c b/sys/dev/podulebus/hcsc.c index 080adf95c7a..ccec8896000 100644 --- a/sys/dev/podulebus/hcsc.c +++ b/sys/dev/podulebus/hcsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: hcsc.c,v 1.6 2001/06/12 11:52:03 bjh21 Exp $ */ +/* $NetBSD: hcsc.c,v 1.7 2001/07/04 15:01:08 bjh21 Exp $ */ /* * Copyright (c) 2001 Ben Harris @@ -75,7 +75,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.6 2001/06/12 11:52:03 bjh21 Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.7 2001/07/04 15:01:08 bjh21 Exp $"); #include <sys/systm.h> #include <sys/kernel.h> @@ -92,6 +92,7 @@ __KERNEL_RCSID(0, "$NetBSD: hcsc.c,v 1.6 2001/06/12 11:52:03 bjh21 Exp $"); #include <dev/podulebus/podulebus.h> #include <dev/podulebus/podules.h> +#include <dev/podulebus/powerromreg.h> #include <dev/podulebus/hcscreg.h> @@ -132,9 +133,15 @@ hcsc_match(struct device *parent, struct cfdata *cf, void *aux) { struct podulebus_attach_args *pa = aux; + /* Normal ROM */ if (pa->pa_product == PODULE_HCCS_IDESCSI && strncmp(pa->pa_descr, "SCSI", 4) == 0) return 1; + /* PowerROM */ + if (pa->pa_product == PODULE_ALSYSTEMS_SCSI && + podulebus_initloader(pa) == 0 && + podloader_callloader(pa, 0, 0) == PRID_HCCS_SCSI1) + return 1; return 0; } diff --git a/sys/dev/podulebus/oak.c b/sys/dev/podulebus/oak.c index 58034bea279..e9fce699a94 100644 --- a/sys/dev/podulebus/oak.c +++ b/sys/dev/podulebus/oak.c @@ -1,4 +1,4 @@ -/* $NetBSD: oak.c,v 1.2 2001/05/26 20:53:53 bjh21 Exp $ */ +/* $NetBSD: oak.c,v 1.3 2001/07/04 15:01:08 bjh21 Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: oak.c,v 1.2 2001/05/26 20:53:53 bjh21 Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oak.c,v 1.3 2001/07/04 15:01:08 bjh21 Exp $"); #include <sys/systm.h> #include <sys/kernel.h> @@ -98,10 +98,15 @@ oak_match(struct device *parent, struct cfdata *cf, void *aux) { struct podulebus_attach_args *pa = aux; - if (matchpodule(pa, MANUFACTURER_OAK, PODULE_OAK_SCSI, -1) == 0) - return(0); + if (matchpodule(pa, MANUFACTURER_OAK, PODULE_OAK_SCSI, -1)) + return 1; + + /* PowerROM */ + if (pa->pa_product == PODULE_ALSYSTEMS_SCSI && + podulebus_initloader(pa) == 0 && + podloader_callloader(pa, 0, 0) == PRID_OAK_SCSI1) + return 1; - return(1); } /* diff --git a/sys/dev/podulebus/powerromreg.h b/sys/dev/podulebus/powerromreg.h new file mode 100644 index 00000000000..e46ea1d6446 --- /dev/null +++ b/sys/dev/podulebus/powerromreg.h @@ -0,0 +1,64 @@ +/* $NetBSD: powerromreg.h,v 1.1 2001/07/04 15:01:08 bjh21 Exp $ */ + +/* + * This file is in the public domain. + */ + +/* + * PowerROM card types + */ + +/* + * The Partis PowerROM is a replacement ROM (or rather series of ROMs) + * for an assortment of SCSI cards for Acorn machines. It's awkward + * in that it replaces the podule ID with its own, which is the same + * for all PowerROMs (and for Power-tec SCSI cards). To find out the + * actual hardware underneath it, we have to call the podule loader in + * the ROM, and it will return one of the following constants. + * + * <URL:http://home.eunet.no/~kjetilbt/power-tec.mbox> + */ + +#define PRID_POWERTEC 0x00 /* Power-tec card, ID in hardware */ + +#define PRID_MORLEY_SCSI1 0x11 /* Morley 16 bit SCSI-1 */ +#define PRID_MORLEY_CACHED 0x12 /* Morley 16 bit Cached SCSI-1 */ +#define PRID_MORLEY_TURBO 0x13 /* Morley Turbo 16 bit SCSI-1 */ + +#define PRID_OAK_SCSI1 0x21 /* Oak 16 bit SCSI-1 */ + +#define PRID_CUMANA_SCSI1_8 0x31 /* Cumana 8 bit SCSI-1 */ +#define PRID_CUMANA_SCSI1_16 0x32 /* Cumana 16 bit SCSI-1 */ +#define PRID_CUMANA_SCSI2 0x33 /* Cumana 16/32 bit SCSI-2 */ +#define PRID_CUMANA_SCSI3 0x34 /* Cumana 32 bit Ultra SCSI-3 */ + +#define PRID_LINDIS_SCSI1 0x41 /* Lindis 8/16 bit SCSI-1 */ + +#define PRID_HCCS_SCSI1 0x51 /* HCCS 8 bit SCSI-1 */ +#define PRID_HCCS_REDSHIFT 0x52 /* HCCS RedShift 16 bit SCSI-1 */ + +#define PRID_TECHNO_SCSI1 0x61 /* Techno 16 bit SCSI-1 */ + +#define PRID_ARXE_SCSI1 0x71 /* Arxe/TSP 16 bit SCSI-1 */ +#define PRID_ARXE_SCSI1_2 0x72 /* Arxe/TSP 16 bit SCSI-1 */ +#define PRID_ARXE_TURBO 0x73 /* Arxe/TSP 8 bit Turbo SCSI-1 */ + +#define PRID_MCS_CONNECT32 0x81 /* MCS Connect 32 bit SCSI-2 */ + +#define PRID_CASTLE_SCSI2 0x91 /* Castle 16 bit SCSI-2 */ + +#define PRID_ACORN_SCSI1 0xa1 /* Acorn 16 bit SCSI-1 */ + +#define PRID_SYMBIOS_UWIDE 0xb1 /* Symbios 32 bit UltraWide SCSI-2 */ + +/* I don't think the ones below will ever appear on a podule */ + +#define PRID_PARALLEL_ATAPI 0xe1 /* Misc Parallel ATAPI */ +#define PRID_IOEB_ATAPI 0xe2 /* Misc ADFS IOEB ATAPI */ +#define PRID_IOMD_ATAPI 0xe3 /* Misc ADFS IOMD ATAPI */ + +#define PRID_PARALLEL_SCSI1 0xf1 /* Misc Parallel SCSI-1 */ +#define PRID_ECONET_SCSI1 0xf2 /* Misc Econet SCSI-1 */ +#define PRID_UPODULE_SCSI1 0xf3 /* Misc uPodule SCSI-1 */ +#define PRID_EPST_SCSI1 0xf4 /* Misc EPST SCSI-1 */ + |
