summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/shmobile
Commit message (Collapse)AuthorAgeFilesLines
* sh: SH-Mobile R-standby register save/restoreMagnus Damm2010-02-262-3/+121
| | | | | | | | Add code to save/restore registers during R-standby sleep on SH-Mobile processors. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: allow runtime pm without suspend/resume callbacksMagnus Damm2009-12-041-6/+11
| | | | | | | | | This patch updates the Runtime PM code for SuperH Mobile to allow drivers to have NULL as pm or callback value. With this in place there is no need for no-op functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add R-standby sleep mode supportMagnus Damm2009-10-302-7/+18
| | | | | | | Add R-standby specific bits to the SuperH Mobile sleep code. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use RSMEM for sleep code on sh7724Magnus Damm2009-10-301-4/+8
| | | | | | | | Use RSMEM instead of ILMEM for sleep mode code storage on SH7724. This allows us to use R-standby mode on SH7724. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add MMU and Cache handling sleep mode codeMagnus Damm2009-10-302-0/+107
| | | | | | | | | | | | Add MMU and cache handling functionality to the SuperH Mobile sleep code. The MMU and cache registers are saved and restored. The MMU is disabled and the cache is flushed and disabled before entering sleep modes if the SUSP_SH_MMU flag is set. This flag should be set in the case of R-standby and most likely for future U-standby support as well. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Keep track of allowed sleep modesMagnus Damm2009-10-302-18/+31
| | | | | | | | | | Add code to keep track of supported sleep modes. This to only export cpuidle modes that are backed by board support code. Also, do not allow suspend-to-ram if sdram board code is missing. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rework SuperH Mobile sleep mode codeMagnus Damm2009-10-302-164/+134
| | | | | | | | | | Rework the SuperH Mobile sleep code from including board specific code to allowing each board to provide pre/post code snippets. These snippets should contain sdram management code to enter and leave self-refresh. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Allow boards to register memory pre/post sleep codeMagnus Damm2009-10-301-0/+6
| | | | | | | | | | | Add code to allow boards registering self-contained functions for going to/from self-refresh. At this point the board code is unused. When all supported boards have been converted then the new sleep code will make use of these functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add notifiers chains for cpu/board codeMagnus Damm2009-10-301-0/+12
| | | | | | | | | | This patch adds atomic notifier chains for pre/post sleep events. Useful for cpu code and boards that need to save and restore register state before and after entering a sleep mode. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branches 'sh/hwblk' and 'sh/pm-runtime'Paul Mundt2009-08-232-0/+304
|\
| * sh: Fix section mismatch in platform bus notifier.Paul Mundt2009-08-231-3/+2
| | | | | | | | | | | | | | | | The runtime PM for SH-Mobile code had platform_bus_notify() as __devinit, which is rather bogus. Kill off the annotation, which subsequently silences the section mismatch warnings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Runtime PM for SuperH Mobile platform bus devicesMagnus Damm2009-08-232-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is V3 of the SuperH Mobile Runtime PM platform bus implentation matching Rafael's Runtime PM v16. The code gets invoked from the SuperH specific Runtime PM platform bus functions that override the weak symbols for: - platform_pm_runtime_suspend() - platform_pm_runtime_resume() - platform_pm_runtime_idle() This Runtime PM implementation performs two levels of power management. At the time of platform bus runtime suspend the clock to the device is stopped instantly. Later on if all devices within the power domain has their clocks stopped then the device driver ->runtime_suspend() callbacks are used to save hardware register state for each device. Device driver ->runtime_suspend() calls are scheduled from cpuidle context using platform_pm_runtime_suspend_idle(). When all devices have been fully suspended the processor is allowed to enter deep sleep from cpuidle. The runtime resume operation turns on clocks and also restores registers if needed. It is worth noting that the devices start in a suspended state and the device driver is responsible for calling runtime resume before accessing the actual hardware. In this particular platform bus implementation runtime resume is not allowed from interrupt context. Runtime suspend is however allowed from interrupt context as long as the synchronous functions are avoided. [ updated for v17 -- PFM. ] Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: SuperH Mobile Software Standby support for cpuidleMagnus Damm2009-08-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds "SuperH Mobile Standby Mode [SF]" to the list of cpuidle sleep modes. If the software latency requirements from cpuidle are met together with fulfilled hardware requirements then deep sleep modes can be entered. Tested on sh7722 and sh7724 with "Sleep Mode", "Sleep Mode + SF" and "Software Standby Mode + SF" together with a multimedia work load and flood ping without packet drop. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: rework SuperH Mobile sleep code exception handlingMagnus Damm2009-08-182-64/+107
|/ | | | | | | | | | | | | | This patch updates the exception handling in the sleep code for SuperH Mobile. With the patch applied the sleep code always rewrites the VBR and resumes from the exception vector, re-initializes hardware and jumps straight to the original interrupt vector. Tested on sh7722 and sh7724 with "Sleep Mode", "Sleep Mode + SF" and "Software Standby Mode + SF" with CONFIG_SUSPEND. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'sh/stable-updates'Paul Mundt2009-08-151-2/+68
|\
| * sh: sh7724 ddr self-refresh changesMagnus Damm2009-08-151-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the SuperH Mobile sleep assembly code with support for DBSC memory controller found in the sh7724 processor. Without this fix the memory hooked up to the sh7724 processor will never enter self-refresh mode before suspending to ram. The effect of this is that the memory contents most likeley will be lost upon resume which may or may not be what you want. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: cpuidle for SuperH Mobile using hwblkMagnus Damm2009-07-053-13/+116
|/ | | | | | | | | | | | | | | | | | | This patch adds cpuidle support for SuperH Mobile. The sleep mode selected by cpuidle is compared with the mode selected by the hwblk sleep code and the best allowed mode is entered. At this point "Sleep mode" and "Sleep mode + SF" are supported. This code can easily be extended to support "Software suspend mode", but the assembly code must first be updated to avoid loosing interrupts. Also, update the code to only copy the assembly snippet into internal memory once at bootup. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Consolidate SH-Mobile CPU code in arch/sh/kernel/cpu/shmobile/.Paul Mundt2009-03-163-0/+223
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud