diff options
| author | tsubai <tsubai@NetBSD.org> | 2000-04-02 12:36:38 +0000 |
|---|---|---|
| committer | tsubai <tsubai@NetBSD.org> | 2000-04-02 12:36:38 +0000 |
| commit | 7df13bfec7d3cfab4f08c0d194d247911ffcc535 (patch) | |
| tree | d7cd783250f6d878c9bcbb1b33d0a7adce7d1fe9 /sys/arch/macppc/dev | |
| parent | e352cada4b72969ec7ab5148827760e2754fc49f (diff) | |
Enable wdc1 (needed on StarMax).
Diffstat (limited to 'sys/arch/macppc/dev')
| -rw-r--r-- | sys/arch/macppc/dev/wdc_obio.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/wdc_obio.c b/sys/arch/macppc/dev/wdc_obio.c index 2c3067cf9b2..69d47347b84 100644 --- a/sys/arch/macppc/dev/wdc_obio.c +++ b/sys/arch/macppc/dev/wdc_obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_obio.c,v 1.6 2000/01/21 18:45:14 tsubai Exp $ */ +/* $NetBSD: wdc_obio.c,v 1.7 2000/04/02 12:36:38 tsubai Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -119,6 +119,7 @@ wdc_obio_attach(parent, self, aux) struct channel_softc *chp = &sc->wdc_channel; int intr; int use_dma = 0; + char path[80]; if (sc->sc_wdcdev.sc_dev.dv_cfdata->cf_flags & WDC_OPTIONS_DMA) { if (ca->ca_nreg >= 16 || ca->ca_nintr == -1) @@ -183,6 +184,19 @@ wdc_obio_attach(parent, self, aux) return; } +#define OHARE_FEATURE_REG 0xf3000038 + + /* XXX Enable wdc1 by feature reg. */ + bzero(path, sizeof(path)); + OF_package_to_path(ca->ca_node, path, sizeof(path)); + if (strcmp(path, "/bandit@F2000000/ohare@10/ata@21000") == 0) { + u_int x; + + x = in32rb(OHARE_FEATURE_REG); + x |= 8; + out32rb(OHARE_FEATURE_REG, x); + } + wdcattach(chp); } |
