summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/pm_runtime.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: sh: Generalize runtime PM platform stub.Paul Mundt2011-11-111-67/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime PM platform support stub in use by ARM-based SH/R-Mobile platforms contains nothing that's specifically ARM-related and instead of wholly generic to anything using the clock framework. The recent runtime PM changes interact rather badly with the lazy disabling of clocks late in the boot process through the clock framework, leading to situations where the runtime suspend/resume paths are entered without a clock being actively driven due to having been lazily gated off. In order to correct this we can trivially tie in the aforementioned stub as a general fallback for all SH platforms that don't presently have their own runtime PM implementations (the corner case being SH-based SH-Mobile platforms, which have their own stub through the hwblk API -- which in turn has bitrotted and will be subsequently adapted to use the same stub as everyone else), regardless of whether the platforms choose to define power domains of their own or not. This fixes up regressions for clock framework users who also build in runtime PM support without any specific power domains of their own, which was previously causing the serial console to be lost when warring with lazy clock disabling. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* PM: Move clock-related definitions and headers to separate fileRafael J. Wysocki2011-08-251-0/+1
| | | | | | | | | | Since the PM clock management code in drivers/base/power/clock_ops.c is used for both runtime PM and system suspend/hibernation, the definitions of data structures and headers related to it should not be located in include/linux/pm_rumtime.h. Move them to a separate header file. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* ARM / shmobile: Use pm_genpd_poweroff_unused()Rafael J. Wysocki2011-07-131-4/+2
| | | | | | | | Make shmobile use pm_genpd_poweroff_unused() instead of the open-coded powering off PM domains without devices in use. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
* ARM: mach-shmobile: Runtime PM late init callbackMagnus Damm2011-07-101-0/+10
| | | | | | | | | Add a mach-shmobile specific callback for SoC-specific code to hook into. By having the late_initcall() in a common place we can have multi-SoC/board support in the same kernel binary. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* PM: Rename clock management functionsRafael J. Wysocki2011-07-021-3/+3
| | | | | | | | | | | The common PM clock management functions may be used for system suspend/resume as well as for runtime PM, so rename them accordingly. Modify kerneldoc comments describing these functions and kernel messages printed by them, so that they refer to power management in general rather that to runtime PM. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Kevin Hilman <khilman@ti.com>
* PM / Domains: Rename struct dev_power_domain to struct dev_pm_domainRafael J. Wysocki2011-07-021-4/+4
| | | | | | | | | | | | | | | | | | The naming convention used by commit 7538e3db6e015e890825fbd9f86599b (PM: Add support for device power domains), which introduced the struct dev_power_domain type for representing device power domains, evidently confuses some developers who tend to think that objects of this type must correspond to "power domains" as defined by hardware, which is not the case. Namely, at the kernel level, a struct dev_power_domain object can represent arbitrary set of devices that are mutually dependent power management-wise and need not belong to one hardware power domain. To avoid that confusion, rename struct dev_power_domain to struct dev_pm_domain and rename the related pointers in struct device and struct pm_clk_notifier_block from pwr_domain to pm_domain. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Kevin Hilman <khilman@ti.com>
* PM / Runtime: Generic clock manipulation rountines for runtime PM (v6)Rafael J. Wysocki2011-04-301-131/+9
| | | | | | | | | | | | Many different platforms and subsystems may want to disable device clocks during suspend and enable them during resume which is going to be done in a very similar way in all those cases. For this reason, provide generic routines for the manipulation of device clocks during suspend and resume. Convert the ARM shmobile platform to using the new routines. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* PM / Runtime: Add subsystem data field to struct dev_pm_infoRafael J. Wysocki2011-04-291-17/+17
| | | | | | | | | | | | Some subsystems need to attach PM-related data to struct device and they need to use devres for this purpose. For their convenience and to make code more straightforward, add a new field called subsys_data to struct dev_pm_info and let subsystems use it for attaching PM-related information to devices. Convert the ARM shmobile platform to using the new field. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* shmobile: Use power domains for platform runtime PMRafael J. Wysocki2011-04-291-7/+18
| | | | | | | | | | | | | | | | | | | | | shmobile platforms replace the runtime PM callbacks of the platform bus type with their own routines, but this means that the callbacks are replaced system-wide. This may not be the right approach if the platform devices on the system are not of the same type (e.g. some of them belong to an SoC and the others are located in separate chips), because in those cases they may require different handling. Thus it is better to use power domains to override the platform bus type's PM handling, as it generally is possible to use different power domains for devices with different PM requirements. Define a default power domain for shmobile in both the SH and ARM falvors and use it to override the platform bus type's PM callbacks. Since the suspend and hibernate callbacks of the new "default" power domains need to be the same and the platform bus type's suspend and hibernate callbacks for the time being, export those callbacks so that can be used outside of the platform bus type code. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* ARM: mach-shmobile: Runtime PM V3Magnus Damm2010-08-161-0/+169
This is the SH-Mobile ARM Runtime PM implementation V3. Only clocks are managed at this point. If Runtime PM is disabled then the clocks will be enabled before ->probe() and disabled after ->remove(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud