diff options
| author | kiyohara <kiyohara@NetBSD.org> | 2008-06-11 02:09:16 +0000 |
|---|---|---|
| committer | kiyohara <kiyohara@NetBSD.org> | 2008-06-11 02:09:16 +0000 |
| commit | c3b43ec571ecbe8e122e739d641e1ffcbf757da5 (patch) | |
| tree | 080f014485989c33838664e56b5273274df334b6 /sys/dev/ic | |
| parent | fc8fd752ef480b179260a0a128249c0e6b7b274a (diff) | |
Support use PCI Clock(SF_CHIP_USEPCIC). We can set the value "use_pciclock"
by prop_dictionary_set_bool().
Diffstat (limited to 'sys/dev/ic')
| -rw-r--r-- | sys/dev/ic/siop_common.c | 13 | ||||
| -rw-r--r-- | sys/dev/ic/siopreg.h | 3 | ||||
| -rw-r--r-- | sys/dev/ic/siopvar_common.h | 3 |
3 files changed, 14 insertions, 5 deletions
diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c index 1d0ba95d1bd..1c7626ca88d 100644 --- a/sys/dev/ic/siop_common.c +++ b/sys/dev/ic/siop_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_common.c,v 1.45 2008/04/08 12:07:27 cegger Exp $ */ +/* $NetBSD: siop_common.c,v 1.46 2008/06/11 02:09:16 kiyohara Exp $ */ /* * Copyright (c) 2000, 2002 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.45 2008/04/08 12:07:27 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.46 2008/06/11 02:09:16 kiyohara Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -165,7 +165,7 @@ void siop_common_reset(sc) struct siop_common_softc *sc; { - u_int32_t stest3; + u_int32_t stest1, stest3; /* reset the chip */ bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_ISTAT, ISTAT_SRST); @@ -220,6 +220,13 @@ siop_common_reset(sc) } else { bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_STEST1, 0); } + + if (sc->features & SF_CHIP_USEPCIC) { + stest1 = bus_space_read_4(sc->sc_rt, sc->sc_rh, SIOP_STEST1); + stest1 |= STEST1_SCLK; + bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_STEST1, stest1); + } + if (sc->features & SF_CHIP_FIFO) bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST5, bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST5) | diff --git a/sys/dev/ic/siopreg.h b/sys/dev/ic/siopreg.h index 39d9c35dcad..8112476ce1c 100644 --- a/sys/dev/ic/siopreg.h +++ b/sys/dev/ic/siopreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: siopreg.h,v 1.19 2008/03/27 10:06:31 skrll Exp $ */ +/* $NetBSD: siopreg.h,v 1.20 2008/06/11 02:09:16 kiyohara Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -346,6 +346,7 @@ static const struct scf_period dt_scf_period[] __unused = { #define STEST1_DIGE 0x10 /* 1010 only */ #define STEST1_DBLEN 0x08 /* 875-only */ #define STEST1_DBLSEL 0x04 /* 875-only */ +#define STEST1_SCLK 0x80 #define SIOP_STEST2 0x4E /* SCSI test 2, RO, R/W on 875 */ #define STEST2_DIF 0x20 /* 875 only */ diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index 0b559dc50bb..b86bd6b2726 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,4 +1,4 @@ -/* $NetBSD: siopvar_common.h,v 1.35 2008/03/27 10:06:31 skrll Exp $ */ +/* $NetBSD: siopvar_common.h,v 1.36 2008/06/11 02:09:16 kiyohara Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -177,6 +177,7 @@ struct siop_common_softc { #define SF_CHIP_GEBUG 0x00080000 /* SCSI gross error bug */ #define SF_CHIP_AAIP 0x00100000 /* Always generate AIP regardless of SNCTL4*/ #define SF_CHIP_BE 0x00200000 /* big-endian */ +#define SF_CHIP_USEPCIC 0x00400000 /* use PCI clock */ #define SF_PCI_RL 0x01000000 /* PCI read line */ #define SF_PCI_RM 0x02000000 /* PCI read multiple */ |
