1. 03 Sep, 2012 13 commits
    • Rafael J. Wysocki's avatar
      sh: CMT: Basic runtime PM support · bad81383
      Rafael J. Wysocki authored
      Modify the SH CMT clock source/clock event device driver to support
      runtime PM at a basic level (i.e. device clocks can be disabled and
      enabled, but domain power must be on, because the devices have to
      be marked as "irq safe").
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      bad81383
    • Rafael J. Wysocki's avatar
      sh: TMU: Basic runtime PM support · 61a53bfa
      Rafael J. Wysocki authored
      Modify the SH TMU clock source/clock event device driver to support
      runtime PM at a basic level (i.e. device clocks can be disabled and
      enabled, but domain power must be on, because the devices have to
      be marked as "irq safe").
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      61a53bfa
    • Rafael J. Wysocki's avatar
      PM / Domains: Do not measure start time for "irq safe" devices · e2e3e4e5
      Rafael J. Wysocki authored
      The genpd_start_dev() routine used by pm_genpd_runtime_resume()
      to put "irq safe" devices into the full power state measures the
      time necessary to "start" the device and updates its PM QoS timing
      data if necessary.  This may lead to a deadlock if the given device
      is a clock source and genpd_start_dev() is invoked from within the
      clock source's .enable() routine, which will happen if that routine
      uses pm_runtime_get_sync(), for example, to ensure that the device
      is operational.
      
      For this reason, introduce a special routine analogous to
      genpd_start_dev(), called genpd_start_dev_no_timing(), that doesn't
      carry out the time measurement, and make pm_genpd_runtime_resume()
      use it instead of genpd_start_dev() to power up "irq safe" devices.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      e2e3e4e5
    • Rafael J. Wysocki's avatar
      PM / Domains: Move syscore flag from subsys data to struct device · dbf37414
      Rafael J. Wysocki authored
      The syscore device PM flag is used to mark the devices (belonging to
      a PM domain) that should never be turned off, except for the system
      core (syscore) suspend/hibernation and resume stages.  That flag is
      stored in the device's struct pm_subsys_data object whose address is
      available from struct device.  However, in some situations it may be
      convenient to set that flag before the device is added to a PM
      domain, so it is better to move it directly to the "power" member of
      struct device.  Then, it can be checked by the routines in
      drivers/base/power/runtime.c and drivers/base/power/main.c, which is
      more straightforward.
      
      This also reduces the number of dev_gpd_data() invocations in the
      generic PM domains framework, so the overhead related to the syscore
      flag is slightly smaller.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      dbf37414
    • Rafael J. Wysocki's avatar
      PM / Domains: Rename the always_on device flag to syscore · 6fb28bad
      Rafael J. Wysocki authored
      The always_on device flag is used to mark the devices (belonging to
      a PM domain) that should never be turned off, except for the system
      core (syscore) suspend/hibernation and resume stages.  Change name
      of that flag to "syscore" to better reflect its purpose.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      6fb28bad
    • Rafael J. Wysocki's avatar
      PM / Runtime: Allow helpers to be called by early platform drivers · bed2b42d
      Rafael J. Wysocki authored
      Runtime PM helper functions, like pm_runtime_get_sync(), cannot be
      called by early platform device drivers, because the devices' power
      management locks are not initialized at that time.  This is quite
      inconvenient, so modify early_platform_add_devices() to initialize
      the devices power management locks as appropriate and make sure that
      they won't be initialized more than once if an early platform
      device is going to be used as a regular one later.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      bed2b42d
    • Rafael J. Wysocki's avatar
      PM: Reorganize device PM initialization · e91c11b1
      Rafael J. Wysocki authored
      Make the device power management initialization more straightforward
      by moving the initialization of common (i.e. used by both runtime PM
      and system suspend) fields to a separate routine.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      e91c11b1
    • Rafael J. Wysocki's avatar
      sh: MTU2: Introduce clock events suspend/resume routines · cc7ad456
      Rafael J. Wysocki authored
      Introduce suspend/resume routines for SH MTU2 clock event devices
      such that if those devices belong to a PM domain, the generic PM
      domains framework will be notified that the given domain may be
      turned off (during system suspend) or that it has to be turned on
      (during system resume).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      cc7ad456
    • Rafael J. Wysocki's avatar
      sh: CMT: Introduce clocksource/clock events suspend/resume routines · 9bb5ec88
      Rafael J. Wysocki authored
      Introduce suspend/resume routines for SH CMT clock event devices and
      modify the suspend/resume routines for SH CMT clock sources such that
      if those devices belong to a PM domain, the generic PM domains
      framework will be notified that the given domain may be turned off
      (during system suspend) or that it has to be turned on (during system
      resume).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      9bb5ec88
    • Rafael J. Wysocki's avatar
      sh: TMU: Introduce clocksource/clock events suspend/resume routines · eaa49a8c
      Rafael J. Wysocki authored
      Introduce suspend/resume routines for SH TMU clock source and
      clock event device such that if those devices belong to a PM domain,
      the generic PM domains framework will be notified that the given
      domain may be turned off (during system suspend) or that it has to
      be turned on (during system resume).
      
      This change allows the A4R domain on SH7372 to be turned off during
      system suspend (tested on the Mackerel board) if the TMU clock source
      and/or clock event device is in use.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarMagnus Damm <damm@opensource.se>
      eaa49a8c
    • Rafael J. Wysocki's avatar
      timekeeping: Add suspend and resume of clock event devices · adc78e6b
      Rafael J. Wysocki authored
      Some clock event devices, for example such that belong to PM domains,
      need to be handled in a spcial way during the timekeeping suspend
      and resume (which takes place in the system core, or "syscore",
      stages of system power transitions) in analogy with clock sources.
      
      Introduce .suspend() and .resume() callbacks for clock event devices
      that will be executed by timekeeping_suspend/_resume(), respectively,
      next the the clock sources' .suspend() and .resume() callbacks.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      adc78e6b
    • Rafael J. Wysocki's avatar
      PM / Domains: Add power off/on function for system core suspend stage · 77f827de
      Rafael J. Wysocki authored
      Introduce function pm_genpd_syscore_switch() and two wrappers around
      it, pm_genpd_syscore_poweroff() and pm_genpd_syscore_poweron(),
      allowing the callers to let the generic PM domains framework know
      that the given device is not necessary any more and its PM domain
      can be turned off (the former) or that the given device will be
      required immediately, so its PM domain has to be turned on (the
      latter) during the system core (syscore) stage of system suspend
      (or hibernation) and resume.
      
      These functions will be used for handling devices registered as
      clock sources and clock event devices that belong to PM domains.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      77f827de
    • Rafael J. Wysocki's avatar
      PM / Domains: Introduce simplified power on routine for system resume · 802d8b49
      Rafael J. Wysocki authored
      Introduce function pm_genpd_sync_poweron() for restoring domain power
      during resume from system suspend and hibernation.  It can be much
      simpler than pm_genpd_poweron(), because it doesn't have to care
      about locking and it can skip many checks done by the latter.
      
      Modify pm_genpd_resume_noirq() and pm_genpd_restore_noirq() to use
      the new function.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      802d8b49
  2. 01 Sep, 2012 5 commits
  3. 30 Aug, 2012 5 commits
  4. 29 Aug, 2012 17 commits