diff options
| author | 2002-01-11 05:17:30 +0000 | |
|---|---|---|
| committer | 2002-01-11 05:17:30 +0000 | |
| commit | 7aa2453981b015f862a7248ed346ef59914629e0 (patch) | |
| tree | 3b5b31cd0f861f8669052a3821f888de72de4eb9 /sys/arch/sparc/dev/magma.c | |
| parent | Get order of operations correct so that we clear the wsmux array and (diff) | |
| download | wireguard-openbsd-7aa2453981b015f862a7248ed346ef59914629e0.tar.xz wireguard-openbsd-7aa2453981b015f862a7248ed346ef59914629e0.zip | |
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/arch/sparc/dev/magma.c')
| -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 */ |
