diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-04-10 17:35:15 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-04-10 17:35:15 +0000 |
commit | 51d49bde71dedb2198915dfb9d56c40fddea99ec (patch) | |
tree | f7ae58fdec31e4c33abc5f9e0fe41826340207ee /sys/arch/macppc | |
parent | 9d9e4a4be88b906e2d0cc8f3829b16adc30fbff1 (diff) |
Handle all pending adb interrupts when searching for devices.
Adjust delays in the probe code. ok miod, matthieu, lebel, brad.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/dev/pm_direct.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/pm_direct.c b/sys/arch/macppc/dev/pm_direct.c index 58c22669d34..383f8b17ade 100644 --- a/sys/arch/macppc/dev/pm_direct.c +++ b/sys/arch/macppc/dev/pm_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pm_direct.c,v 1.5 2002/03/14 01:26:36 millert Exp $ */ +/* $OpenBSD: pm_direct.c,v 1.6 2002/04/10 17:35:14 drahn Exp $ */ /* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */ /* @@ -1044,7 +1044,7 @@ pm_adb_op(buffer, compRout, data, command) return 1; } - delay(10000); + delay (1000); adbWaiting = 1; adbWaitingCmd = command; @@ -1052,9 +1052,9 @@ pm_adb_op(buffer, compRout, data, command) PM_VIA_INTR_ENABLE(); /* wait until the PM interrupt is occurred */ - ndelay = 0x80000; + ndelay = 0x8000; while (adbWaiting == 1) { - if (read_via_reg(VIA1, vIFR) & 0x14) + if (read_via_reg(VIA1, vIFR) != 0) pm_intr(); #ifdef PM_GRAB_SI #if 0 @@ -1067,6 +1067,7 @@ pm_adb_op(buffer, compRout, data, command) splx(s); return 1; } + delay(10); } /* this command enables the interrupt by operating ADB devices */ |