1. 20 12月, 2007 36 次提交
  2. 19 12月, 2007 4 次提交
    • J
      [POWERPC] powermac: Use generic suspend code · f91266ed
      Johannes Berg 提交于
      This adds platform_suspend_ops for PMU based machines, directly in
      the PMU driver.  This allows suspending via /sys/power/state
      on powerbooks.
      
      The patch also replaces the PMU ioctl with a simple call to
      pm_suspend(PM_SUSPEND_MEM).
      
      Additionally, it cleans up some debug code.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f91266ed
    • P
      [POWERPC] Fix sleep on powerbook 3400 · 887ef35a
      Paul Mackerras 提交于
      Sleep on the powerbook 3400 has been broken since the change that made
      powerbook_sleep_3400 call pmac_suspend_devices(), which disables
      interrupts.  There are a couple of loops in powerbook_sleep_3400 that
      depend on interrupts being enabled, and in fact it has to have
      interrupts enabled at the point of going to sleep since it is an
      interrupt from the PMU that wakes it up.
      
      This fixes it by using pmu_wait_complete() instead of a spinloop, and
      by explicitly enabling interrupts before putting the CPU into sleep
      mode (which is OK since all interrupts except the PMU interrupt have
      been disabled at the interrupt controller by this stage).
      
      This changes the logic so that it keeps putting the CPU into sleep mode
      until the completion of the interrupt transaction from the PMU that
      signals the end of sleep.  Also, we now call pmu_unlock() before sleep
      so that the via_pmu_interrupt() code can process the interrupt event
      from the PMU properly.
      
      Now that generic code saves and restores PCI state, it is no longer
      necessary to do that here.  Thus pbook_pci_save/restore and related
      functions are no longer necessary, so this removes them.
      
      Lastly, this moves the ioremap of the memory controller to init code
      rather than doing it on every sleep/wakeup cycle.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      887ef35a
    • P
      [POWERPC] Convert therm_windtunnel.c to use the kthread API · 98f6740e
      Paul Mackerras 提交于
      This is fairly straightforward, and lets us get rid of x.completion
      as well.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      98f6740e
    • P
      [POWERPC] Convert therm_pm72.c to use the kthread API · 39d183d8
      Paul Mackerras 提交于
      This converts the therm_pm72.c driver to use the kthread API.  I
      thought about making it use kthread_stop() instead of the `state'
      variable and the `ctrl_complete' completion, but that isn't simple and
      will require changing the way that `state' is used.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      39d183d8