diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-03 05:46:44 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-03-03 05:46:44 +0000 |
commit | b819906b9ae40459b49c8b45c90542198eed4246 (patch) | |
tree | de43b51ab1a605d13ec407cec0da437037c087c8 /sys/arch | |
parent | 4c0f07e3925a807fc67822ab724a7b6289c29d09 (diff) |
Force the ADB bus to configure. This change was found in NetBSD, but they
have since removed it. It is probably not the correct solution, but makes
it closer to working.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc/mac/pm_direct.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/arch/powerpc/mac/pm_direct.c b/sys/arch/powerpc/mac/pm_direct.c index 1fe916d8b7b..2bf0dfc7373 100644 --- a/sys/arch/powerpc/mac/pm_direct.c +++ b/sys/arch/powerpc/mac/pm_direct.c @@ -831,6 +831,26 @@ pm_intr_pm2() s = splhigh(); + for (;;) { + u_int ifr; + ifr = read_via_reg(VIA1, vIFR); + + if (ifr == 0) + break; + + if (ifr & V1IF_ADBRDY) { + write_via_reg(VIA1, vIFR, V1IF_ADBRDY); + ifr &= ~V1IF_ADBRDY; + delay(120000); /* XXX */ + } else if (ifr & V1IF_ADBCLK) { + write_via_reg(VIA1, vIFR, V1IF_ADBCLK); + ifr &= ~V1IF_ADBCLK; + } + + if (ifr) + write_via_reg(VIA1, vIFR, ifr); + } + PM_VIA_CLR_INTR(); /* clear VIA1 interrupt */ /* ask PM what happend */ pmdata.command = 0x78; |