1. 19 Dec, 2007 7 commits
    • Paul Mackerras's avatar
      [POWERPC] Fix sleep on powerbook 3400 · 887ef35a
      Paul Mackerras authored
      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: default avatarPaul Mackerras <paulus@samba.org>
      887ef35a
    • Paul Mackerras's avatar
      [POWERPC] Convert therm_windtunnel.c to use the kthread API · 98f6740e
      Paul Mackerras authored
      This is fairly straightforward, and lets us get rid of x.completion
      as well.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      98f6740e
    • Paul Mackerras's avatar
      [POWERPC] Convert therm_pm72.c to use the kthread API · 39d183d8
      Paul Mackerras authored
      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: default avatarPaul Mackerras <paulus@samba.org>
      39d183d8
    • Paul Mackerras's avatar
      [POWERPC] Convert adb.c to use kthread API and not spin on ADB requests · c61dace9
      Paul Mackerras authored
      This converts adb.c to use the kthread API.
      
      It also changes adb_request so that if the ADBREQ_SYNC flag is
      specified, we now sleep waiting for the request to finish using an
      on-stack completion rather than spinning.  To implement this, we now
      require that if the ADBREQ_SYNC flag is set, the `done' parameter must
      be NULL.  All of the existing callers of adb_request that pass
      ADBREQ_SYNC appear to be in process context and have done == NULL.
      Doing this allows us to get rid of an awful hack in adb_request()
      where we used to test whether the request was coming from the adb
      probe task and use a completion if it was, and otherwise spin.
      
      This also gets rid of a static request block that was used if the req
      parameter to adb_request was NULL.  None of the callers do that any
      more, so the static request block is no longer necessary.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c61dace9
    • Paul Mackerras's avatar
      [POWERPC] Convert media-bay.c to use the kthread API · 33f6e794
      Paul Mackerras authored
      We aren't supposed to use kernel_thread directly in drivers any more,
      and in fact using kthread_run is a bit simpler.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      33f6e794
    • Johannes Berg's avatar
      [POWERPC] via-pmu: Kill sleep notifiers completely · b819a9bf
      Johannes Berg authored
      This kills off the remnants of the old sleep notifiers now that they
      are no longer used.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      b819a9bf
    • Johannes Berg's avatar
      [POWERPC] adb: Replace sleep notifier with platform driver suspend/resume hooks · c9f6d3d5
      Johannes Berg authored
      This replaces the pmu sleep notifier that adb had with suspend/resume
      hooks in a new platform driver/device.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c9f6d3d5
  2. 14 Dec, 2007 7 commits
  3. 12 Dec, 2007 4 commits
  4. 11 Dec, 2007 22 commits