summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev/xlights.c
diff options
context:
space:
mode:
authorGordon Willem Klok <gwk@cvs.openbsd.org>2007-05-30 03:03:55 +0000
committerGordon Willem Klok <gwk@cvs.openbsd.org>2007-05-30 03:03:55 +0000
commit5472bd4d562247a0e2802cb0030c2092ec6f51e1 (patch)
tree742d151bf568f093484f1f1dd63ecb77756abe5b /sys/arch/macppc/dev/xlights.c
parent6c88806af8a925c3d71b4864ecfea3ad7f248c17 (diff)
Make xlights(4) probe correctly on the Xserve G5, still does not correct
the i2s timeout. ok drahn
Diffstat (limited to 'sys/arch/macppc/dev/xlights.c')
-rw-r--r--sys/arch/macppc/dev/xlights.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/macppc/dev/xlights.c b/sys/arch/macppc/dev/xlights.c
index 9bc340e2506..286e3d3a95e 100644
--- a/sys/arch/macppc/dev/xlights.c
+++ b/sys/arch/macppc/dev/xlights.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlights.c,v 1.1 2007/04/22 18:04:23 deraadt Exp $ */
+/* $OpenBSD: xlights.c,v 1.2 2007/05/30 03:03:54 gwk Exp $ */
/*
* Copyright (c) 2007 Gordon Willem Klok <gwk@openbsd,org>
*
@@ -86,11 +86,13 @@ xlights_match(struct device *parent, void *arg, void *aux)
return 0;
error = OF_getprop(soundchip, "virtual", compat, sizeof(compat));
- if (error == -1)
- error = OF_getprop(soundchip, "lightshow", compat,
+ if (error == -1) {
+ error = OF_getprop(soundchip, "name", compat,
sizeof(compat));
- if (error == -1)
- return 0;
+
+ if (error == -1 || (strcmp(compat, "lightshow")) != 0)
+ return 0;
+ }
/* we require at least 4 registers */
if (ca->ca_nreg / sizeof(int) < 4)
@@ -168,8 +170,8 @@ xlights_attach(struct device *parent, struct device *self, void *aux)
mac_intr_establish(parent, sc->sc_intr, intr[3] ? IST_LEVEL :
IST_EDGE, IPL_AUDIO, xlights_intr, sc, sc->sc_dev.dv_xname);
+ keylargo_fcr_enable(I2SClockOffset, I2S0EN);
out32rb(sc->sc_reg + I2S_INT, I2S_INT_CLKSTOPPEND);
-
keylargo_fcr_disable(I2SClockOffset, I2S0CLKEN);
for (error = 0; error < 1000; error++) {
if (in32rb(sc->sc_reg + I2S_INT) & I2S_INT_CLKSTOPPEND) {