summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /drivers/macintosh/via-pmu.c
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 4dd82fef9..3b027da3f 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -523,7 +523,7 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
int intr;
int nloop = 0;
- while ((intr = (in_8(&via[IFR]) & (SR_INT | CB1_INT))) != 0) {
+ while ((intr = in_8(&via[IFR])) != 0) {
if (++nloop > 1000) {
printk(KERN_DEBUG "PMU: stuck in intr loop, "
"intr=%x pmu_state=%d\n", intr, pmu_state);
@@ -534,6 +534,12 @@ via_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
else if (intr & CB1_INT) {
adb_int_pending = 1;
out_8(&via[IFR], CB1_INT);
+ } else
+ {
+ /* -- Disabled printk, will happen _really_ often on
+ PowerBooks ((CB2 interrupts) --
+ printk(KERN_DEBUG "PMU: spurrious interrupt intr=%x\n", intr); */
+ out_8(&via[IFR], intr);
}
}
if (pmu_state == idle) {
@@ -750,7 +756,8 @@ pmu_restart(void)
_disable_interrupts();
- pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, CB1_INT);
+ pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, PMU_INT_ADB |
+ PMU_INT_TICK );
while(!req.complete)
pmu_poll();
@@ -768,7 +775,8 @@ pmu_shutdown(void)
_disable_interrupts();
- pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, CB1_INT);
+ pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, PMU_INT_ADB |
+ PMU_INT_TICK );
while(!req.complete)
pmu_poll();
@@ -886,7 +894,7 @@ int powerbook_sleep(void)
pmu_enable_backlight(0);
/* Give the disks a little time to actually finish writing */
- for (wait = jiffies + (HZ/4); jiffies < wait; )
+ for (wait = jiffies + (HZ/4); time_before(jiffies, wait); )
mb();
/* Disable all interrupts except pmu */