From 74ebe1aa2f1110f779d8b0d187d89b4abbbe47de Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Fri, 11 Jan 2002 05:17:31 +0000 Subject: 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. --- sys/arch/sparc/dev/magma.c | 17 +++++++++++++---- 1 file 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 */ -- cgit v1.2.3