diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-10-09 07:27:54 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-10-14 01:58:35 -0400 |
commit | 11a50873ef2b3c1c3fe99a661c22c08f35d93553 (patch) | |
tree | e40f2cf70c6193beb42994336ad3894e53004703 /arch/powerpc/platforms | |
parent | 80f506918fdaaca6b574ba931536a58ce015c7be (diff) |
powerpc/pmac: Fix issues with sleep on some powerbooks
Since the change of how interrupts are disabled during suspend,
certain PowerBook models started exhibiting various issues during
suspend or resume from sleep.
I finally tracked it down to the code that runs various "platform"
functions (kind of little scripts extracted from the device-tree),
which uses our i2c and PMU drivers expecting interrutps to work,
and at a time where with the new scheme, they have been disabled.
This causes timeouts internally which for some reason results in
the PMU being unable to see the trackpad, among other issues, really
it depends on the machine. Most of the time, we fail to properly adjust
some clocks for suspend/resume so the results are not always
predictable.
This patch fixes it by using IRQF_TIMER for both the PMU and the I2C
interrupts. I prefer doing it this way than moving the call sites since
I really want those platform functions to still be called after all
drivers (and before sysdevs).
We also do a slight cleanup to via-pmu.c driver to make sure the
ADB autopoll mask is handled correctly when doing bus resets
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 21226b74c9b2..414ca9849f23 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -540,8 +540,11 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np) | |||
540 | /* Make sure IRQ is disabled */ | 540 | /* Make sure IRQ is disabled */ |
541 | kw_write_reg(reg_ier, 0); | 541 | kw_write_reg(reg_ier, 0); |
542 | 542 | ||
543 | /* Request chip interrupt */ | 543 | /* Request chip interrupt. We set IRQF_TIMER because we don't |
544 | if (request_irq(host->irq, kw_i2c_irq, 0, "keywest i2c", host)) | 544 | * want that interrupt disabled between the 2 passes of driver |
545 | * suspend or we'll have issues running the pfuncs | ||
546 | */ | ||
547 | if (request_irq(host->irq, kw_i2c_irq, IRQF_TIMER, "keywest i2c", host)) | ||
545 | host->irq = NO_IRQ; | 548 | host->irq = NO_IRQ; |
546 | 549 | ||
547 | printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", | 550 | printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", |