diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-01-11 05:17:31 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-01-11 05:17:31 +0000 |
commit | 74ebe1aa2f1110f779d8b0d187d89b4abbbe47de (patch) | |
tree | 483a17da654152a144eb6d068c2d2914ea675838 /sys | |
parent | 34b02bf9c3ada07378e9e8de4849d34ca999ae75 (diff) |
for the "Magma LC 2+1 Sp", we have to check the 'clock' property (it's
64Mhz vs. the "normal" 25Mhz). This (with the cs4231 patch) makes this
board work.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/magma.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c index 5571f99a977..a474ba5d421 100644 --- a/sys/arch/sparc/dev/magma.c +++ b/sys/arch/sparc/dev/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.8 2001/05/16 12:49:48 ho Exp $ */ +/* $OpenBSD: magma.c,v 1.9 2002/01/11 05:17:30 jason Exp $ */ /* * magma.c * @@ -383,12 +383,21 @@ void *base; /* init the cd1400 chips */ for( chip = 0 ; chip < card->mb_ncd1400 ; chip++ ) { - struct cd1400 *cd = &sc->ms_cd1400[chip]; + char *str; + struct cd1400 *cd = &sc->ms_cd1400[chip]; cd->cd_reg = base + card->mb_cd1400[chip]; - /* XXX getpropstring(ra->ra_node, "clock") */ - cd->cd_clock = 25; + str = getpropstring(ra->ra_node, "clock"); + if (strlen(str) == 0) + cd->cd_clock = 25; + else { + char *cp = str; + + cd->cd_clock = 0; + while (*cp != '\0') + cd->cd_clock = cd->cd_clock * 10 + *cp++ - '0'; + } /* getpropstring(ra->ra_node, "chiprev"); */ /* seemingly the Magma drivers just ignore the propstring */ |