summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'cleanup-initcall' of ↵Linus Torvalds2012-05-261-6/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull sweeping late_initcall cleanup for arm-soc from Olof Johansson: "This is a patch series from Shawn Guo that moves from individual late_initcalls() to using a member in the machine structure to invoke a platform's late initcalls. This cleanup is a step in the move towards multiplatform kernels since it would reduce the need to check for compatible platforms in each and every initcall." Fix up trivial conflicts in arch/arm/mach-{exynos/mach-universal_c210.c, imx/mach-cpuimx51.c, omap2/board-generic.c} due to changes nearby (and, in the case of cpuimx51.c the board support being deleted) * tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: ux500: use machine specific hook for late init ARM: tegra: use machine specific hook for late init ARM: shmobile: use machine specific hook for late init ARM: sa1100: use machine specific hook for late init ARM: s3c64xx: use machine specific hook for late init ARM: prima2: use machine specific hook for late init ARM: pnx4008: use machine specific hook for late init ARM: omap2: use machine specific hook for late init ARM: omap1: use machine specific hook for late init ARM: msm: use machine specific hook for late init ARM: imx: use machine specific hook for late init ARM: exynos: use machine specific hook for late init ARM: ep93xx: use machine specific hook for late init ARM: davinci: use machine specific hook for late init ARM: provide a late_initcall hook for platform initialization
| * ARM: omap2: use machine specific hook for late initShawn Guo2012-05-081-6/+1
| | | | | | | | | | Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com>
* | ARM: OMAP2+: clean up some cppcheck warningsPaul Walmsley2012-04-171-7/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve some warnings identified by cppcheck in arch/arm/mach-omap2: [arch/arm/mach-omap2/usb-tusb6010.c:129]: (style) Checking if unsigned variable 'tmp' is less than zero. [arch/arm/mach-omap2/prm_common.c:241]: (error) Possible null pointer dereference: irq_setup - otherwise it is redundant to check if irq_setup is null at line 247 [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'per_clkdm' is assigned a value that is never used [arch/arm/mach-omap2/pm34xx.c:790]: (style) Variable 'core_clkdm' is assigned a value that is never used [arch/arm/mach-omap2/pm24xx.c:185]: (style) Variable 'only_idle' is assigned a value that is never used [arch/arm/mach-omap2/mux.c:254]: (error) Possible null pointer dereference: mux [arch/arm/mach-omap2/mux.c:258]: (error) Possible null pointer dereference: mux [arch/arm/mach-omap2/gpmc-onenand.c:178]: (style) Variable 'tick_ns' is assigned a value that is never used [arch/arm/mach-omap2/gpio.c:56]: (error) Possible null pointer dereference: pdata - otherwise it is redundant to check if pdata is null at line 57 [arch/arm/mach-omap2/devices.c:45]: (style) Variable 'l' is assigned a value that is never used [arch/arm/mach-omap2/board-omap3evm.c:641] -> [arch/arm/mach-omap2/board-omap3evm.c:639]: (style) Found duplicate branches for if and else. [arch/arm/mach-omap2/am35xx-emac.c:95]: (style) Variable 'regval' is assigned a value that is never used [arch/arm/mach-omap2/devices.c:74]: (style) Variable 'l' is assigned a value that is never used [arch/arm/mach-omap2/pm34xx.c:277]: (style) Variable 'per_prev_state' is assigned a value that is never used [arch/arm/plat-omap/dmtimer.c:352]: (error) Possible null pointer dereference: timer - otherwise it is redundant to check if timer is null at line 354 [arch/arm/plat-omap/omap_device.c:478]: (style) Variable 'c' is assigned a value that is never used [arch/arm/plat-omap/usb.c:42]: (style) Variable 'status' is assigned a value that is never used [arch/arm/mach-omap1/clock.c:197]: (style) Variable 'dpll1_rate' is assigned a value that is never used [arch/arm/mach-omap1/lcd_dma.c:60]: (style) struct or union member 'lcd_dma_info::size' is never used [arch/arm/mach-omap1/pm.c:572]: (style) Variable 'entry' is assigned a value that is never used Some of them are pretty good catches, such as gpio.c:56 and usb-tusb6010.c:129. Thanks to Jarkko Nikula for some comments on the sscanf() warnings. It seems that the kernel sscanf() ignores the field width anyway for the %d format, so those changes have been dropped from this second version. Thanks to Daniel Marjamäki <daniel.marjamaki@gmail.com> for pointing out that a variable was unnecessarily marked static in the board-omap3evm.c change. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@ti.com> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Charulatha Varadarajan <charu@ti.com> Cc: Daniel Marjamäki <daniel.marjamaki@gmail.com> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> Reviewed-by: Charulatha Varadarajan <charu@ti.com> # for gpio.c
* Merge branch 'for_3.4/fixes/pm' of ↵Tony Lindgren2012-04-031-18/+20
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into fixes
| * arm: omap3: pm34xx.c: Replace printk() with appropriate pr_*()Mark A. Greer2012-03-221-12/+10
| | | | | | | | | | | | | | | | | | Currently, pm34xx.c has a mix of printk() and pr_*() statements so replace the printk() statements with the equivalent pr_*() statements. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * arm: omap3: pm34xx.c: Fix omap3_pm_init() error out pathsMark A. Greer2012-03-221-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | It appears that the error paths were overlooked when the omap3_pm_init() routine had the prcm chain handler code added. Fix this by adding a goto target and reordering the error handling code. Also fix how the irq argument for free_irq() is determined. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | Merge tag 'split-asm_system_h-for-linus-20120328' of ↵Linus Torvalds2012-03-281-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system Pull "Disintegrate and delete asm/system.h" from David Howells: "Here are a bunch of patches to disintegrate asm/system.h into a set of separate bits to relieve the problem of circular inclusion dependencies. I've built all the working defconfigs from all the arches that I can and made sure that they don't break. The reason for these patches is that I recently encountered a circular dependency problem that came about when I produced some patches to optimise get_order() by rewriting it to use ilog2(). This uses bitops - and on the SH arch asm/bitops.h drags in asm-generic/get_order.h by a circuituous route involving asm/system.h. The main difficulty seems to be asm/system.h. It holds a number of low level bits with no/few dependencies that are commonly used (eg. memory barriers) and a number of bits with more dependencies that aren't used in many places (eg. switch_to()). These patches break asm/system.h up into the following core pieces: (1) asm/barrier.h Move memory barriers here. This already done for MIPS and Alpha. (2) asm/switch_to.h Move switch_to() and related stuff here. (3) asm/exec.h Move arch_align_stack() here. Other process execution related bits could perhaps go here from asm/processor.h. (4) asm/cmpxchg.h Move xchg() and cmpxchg() here as they're full word atomic ops and frequently used by atomic_xchg() and atomic_cmpxchg(). (5) asm/bug.h Move die() and related bits. (6) asm/auxvec.h Move AT_VECTOR_SIZE_ARCH here. Other arch headers are created as needed on a per-arch basis." Fixed up some conflicts from other header file cleanups and moving code around that has happened in the meantime, so David's testing is somewhat weakened by that. We'll find out anything that got broken and fix it.. * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits) Delete all instances of asm/system.h Remove all #inclusions of asm/system.h Add #includes needed to permit the removal of asm/system.h Move all declarations of free_initmem() to linux/mm.h Disintegrate asm/system.h for OpenRISC Split arch_align_stack() out from asm-generic/system.h Split the switch_to() wrapper out of asm-generic/system.h Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h Create asm-generic/barrier.h Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h Disintegrate asm/system.h for Xtensa Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] Disintegrate asm/system.h for Tile Disintegrate asm/system.h for Sparc Disintegrate asm/system.h for SH Disintegrate asm/system.h for Score Disintegrate asm/system.h for S390 Disintegrate asm/system.h for PowerPC Disintegrate asm/system.h for PA-RISC Disintegrate asm/system.h for MN10300 ...
| * | Disintegrate asm/system.h for ARMDavid Howells2012-03-281-0/+1
| |/ | | | | | | | | | | | | | | Disintegrate asm/system.h for ARM. Signed-off-by: David Howells <dhowells@redhat.com> cc: Russell King <linux@arm.linux.org.uk> cc: linux-arm-kernel@lists.infradead.org
* | Merge branch 'cleanup-pm' of ↵Olof Johansson2012-03-101-71/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup * 'cleanup-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: PM: share some suspend-related functions across OMAP2, 3, 4 ARM: OMAP2+: omap_device: call all suspend, resume callbacks when OMAP_DEVICE_NO_IDLE_ON_SUSPEND is set ARM: OMAP: omap_device: remove omap_device_parent ARM: OMAP2+: PM debug: fix the use of debugfs_create_* API ARM: OMAP2+: PM: share clkdms_setup() across OMAP2, 3, 4 ARM: OMAP2+: PM: clean up omap_set_pwrdm_state() ARM: OMAP3: PM: remove superfluous calls to pwrdm_clear_all_prev_pwrst() ARM: OMAP: convert omap_device_build() and callers to __init ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init ARM: OMAP2+: Split omap2_hsmmc_init() to properly support I2C GPIO pins ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} ARM: OMAP: Fix build error when mmc_omap is built as module ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module
| * | ARM: OMAP2+: PM: share some suspend-related functions across OMAP2, 3, 4Paul Walmsley2012-03-051-50/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform_suspend_ops can be shared across OMAP2, 3, and 4, along with all of the functions referenced in that structure. This patch shares them. It also removes the suspend_state file-scoped variable in the OMAP2 and 3 PM code; it does not appear to be actually needed by anything. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> [khilman@ti.com: minor rework needed due to rebase/merge with conflicting changes] Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | ARM: OMAP2+: PM: share clkdms_setup() across OMAP2, 3, 4Paul Walmsley2012-03-051-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clkdms_setup() is identical across OMAP2, 3, and 4, so share it. Signed-off-by: Paul Walmsley <paul@pwsan.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | ARM: OMAP3: PM: remove superfluous calls to pwrdm_clear_all_prev_pwrst()Paul Walmsley2012-03-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some superfluous calls to pwrdm_clear_all_prev_pwrst(). pwrdm_pre_transition(), which appears a few lines after these calls, invokes pwrdm_clear_all_prev_pwrst() on each powerdomain -- there's no need to do it twice. N.B.: some of us have observed that accesses to the previous powerstate registers seem to be quite slow. Although the writes removed by this patch should be buffered by the write buffer, there is a read to a PRM register immediately afterwards. That will block the OMAP3 MPU until all of those writes complete. So this patch should result in a minor performance improvement during idle entry. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Tero Kristo <t-kristo@ti.com> [khilman@ti.com: removed a couple more for OMAP4] Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | | Merge branch 'depends/omap/gpio/runtime-pm-cleanup' into next/cleanupArnd Bergmann2012-03-021-14/+0
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-omap1/gpio16xx.c drivers/gpio/gpio-omap.c Merge in the runtime-pm-cleanup branch from the gpio tree into next/cleanup, this resolves a nonobvious merge conflict between the two branches. Both branches move parts of the gpio-omap driver into platform code, this takes the superset of both changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | gpio/omap: handle save/restore context in GPIO driverTarun Kanti DebBarma2012-02-061-14/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify omap_gpio_prepare_for_idle() & omap_gpio_resume_after_idle() functions to handle save context & restore context respectively in the OMAP GPIO driver itself instead of calling these functions from pm specific files. For this, in gpio_prepare_for_idle(), call *_get_context_loss_count() and in gpio_resume_after_idle() call it again. If the count is different, do restore context. Signed-off-by: Charulatha V <charu@ti.com> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | ARM: OMAP: convert idle handlers from pm_idle to arm_pm_idleNicolas Pitre2012-01-201-4/+2
|/ | | | | Signed-off-by: Nicolas Pitre <nico@linaro.org> Tested-by: Tony Lindgren <tony@atomide.com>
* Merge branch 'for_3.3/uart/runtime-pm' of ↵Tony Lindgren2011-12-161-43/+0
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into uart Conflicts: arch/arm/mach-omap2/pm34xx.c
| * ARM: OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qosGovindraj.R2011-12-141-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omap_uart_can_sleep function blocks system wide low power state until uart is active remove this func and add qos requests to prevent MPU from transitioning. Keep qos request to default value which will allow MPU to transition and while uart baud rate is available calculate the latency value from the baudrate and use the same to hold constraint while uart clocks are enabled, and if uart is auto-idled the constraint is updated with default constraint value allowing MPU to transition. Qos requests are blocking notifier calls so put these requests to work queue, also the driver uses irq_safe version of runtime API's and callbacks can be called in interrupt disabled context. So to avoid warn on slow path warning while using qos update API's from runtime callbacks use the qos_work_queue. During bootup the runtime_resume call backs might not be called and runtime callback gets called only after uart is idled by setting the autosuspend timeout. So qos_request from runtime resume callback might not activated during boot if uart baudrate is calculated during bootup for console uart, so schedule the qos_work queue once we calc_latency while configuring the uart port. Flush and complete any pending qos jobs in work queue while suspending. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes) Signed-off-by: Kevin Hilman <khilman@ti.com>
| * ARM: OMAP2+: UART: cleanup + remove uart pm specific APIGovindraj.R2011-12-141-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to UART runtime conversion remove uart specific calls from pm24xx/34xx files and their definition from serial.c These func calls will no more be used with upcoming uart runtime design. 1.) omap_uart_prepare_suspend :- can be taken care with driver suspend hooks. 2.) omap_uart_enable_irqs :- Used to enable/disable uart irq's in suspend path from PM code, this is removed as same is handled by uart_suspend_port/uart_resume_port in omap-serial driver which will do an port_shutdown on suspend freeing irq and port_startup on resume enabling back irq. 3.) Remove prepare_idle/resume_idle calls used to gate uart clocks. UART clocks can be gated within driver using runtime funcs and be woken up using irq_chaining from omap_prm driver. 4.) Remove console_locking from idle path as clock gating is done withing driver itself with runtime API. Remove is_suspending check used to acquire console_lock. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | Merge branch 'tk_prm_chain_handler_devel_3.3' of ↵Tony Lindgren2011-12-161-71/+44
|\ \ | |/ |/| | | | | | | | | git://git.pwsan.com/linux-2.6 into prcm Conflicts: arch/arm/mach-omap2/Makefile
| * ARM: OMAP3: pm: use prcm chain handlerTero Kristo2011-12-161-71/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PM interrupt handling is now done through the PRCM chain handler. The interrupt handling logic is also split in two parts, to serve IO and WKUP events separately. This allows us to handle IO chain events in a clean way. Core event code is also changed in accordance to this, as PRCM interrupt handling is done by independent handlers, and the core handler should not clear the IO events anymore. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> [paul@pwsan.com: use pr_err(); combined with portions of earlier patches and the "do not enable PRCM MPU interrupts manually" patch] Signed-off-by: Paul Walmsley <paul@pwsan.com>
* | ARM: 7159/1: OMAP: Introduce local common.h filesTony Lindgren2011-11-171-0/+1
|/ | | | | | | | | | | As suggested by Russell King - ARM Linux <linux@arm.linux.org.uk>, there's no need to keep local prototypes in non-local headers. Add mach-omap1/common.h and mach-omap2/common.h and move the local prototypes there from plat/common.h and mach/omap4-common.h. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge branch 'for_3.2/pm-cleanup-2' of ↵Tony Lindgren2011-11-041-33/+37
|\ | | | | | | git://github.com/khilman/linux-omap-pm into fixes
| * ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 onlyPaul Walmsley2011-10-071-9/+11
| | | | | | | | | | | | | | | | | | | | | | Based on the documents that I have here, there doesn't appear to be an equivalent to erratum i443 for OMAP3630, so restrict this one to OMAP34xx chips. Also, explicitly restrict this erratum to EMU and HS devices. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detectionPaul Walmsley2011-10-071-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that we detect which OMAP3 chips support I/O wakeup and software I/O chain clock control is broken. Currently, I/O wakeup is marked as present for all OMAP3 SoCs other than the AM3505/3517. The TI81xx family of SoCs are at present considered to be OMAP3 SoCs, but don't support I/O wakeup. To resolve this, convert the existing blacklist approach to an explicit, whitelist support, in which only SoCs which are known to support I/O wakeup are listed. (At present, this only includes OMAP34xx, OMAP3503, OMAP3515, OMAP3525, OMAP3530, and OMAP36xx.) Also, the current code incorrectly detects the presence of a software-controllable I/O chain clock on several chips that don't support it. This results in writes to reserved bitfields, unnecessary delays, and console messages on kernels running on those chips: http://www.spinics.net/lists/linux-omap/msg58735.html Convert this test to a feature test with a chip-by-chip whitelist. Thanks to Dave Hylands <dhylands@gmail.com> for reporting this problem and doing some testing to help isolate the cause. Thanks to Steve Sakoman <sakoman@gmail.com> for catching a bug in the first version of this patch. Thanks to Russell King <linux@arm.linux.org.uk> for comments. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Dave Hylands <dhylands@gmail.com> Cc: Steve Sakoman <sakoman@gmail.com> Tested-by: Steve Sakoman <sakoman@gmail.com> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * ARM: OMAP3: PM: fix pwrdm_post_transition call sequenceCharulatha V2011-10-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context lost count is modified in omap_sram_idle() path when pwrdm_post_transition() is called. But pwrdm_post_transition() is called only after omap_gpio_resume_after_idle() is called. Correct this so that context lost count is modified before calling omap_gpio_resume_after_idle(). This would be useful when OMAP GPIO save/restore context is called by the OMAP GPIO driver itself. Signed-off-by: Charulatha V <charu@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | OMAP3: PM: fix UART handling when using no_console_suspendKevin Hilman2011-09-161-1/+1
|/ | | | | | | | | | | | | | | | | During the idle/suspend path, we expect the console lock to be held so that no console output is done during/after the UARTs are idled. However, when using the no_console_suspend argument on the command-line, the console driver does not take the console lock. This allows the possibility of console activity after UARTs have been disabled. To fix, update the current is_suspending() to also check the console_suspend_enabled flag. Reported-by: Abhilash Koyamangalath <abhilash.kv@ti.com> Tested-by: Abhilash Koyamangalath <abhilash.kv@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* Merge branch 'next/cleanup' of ↵Linus Torvalds2011-07-251-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc * 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (133 commits) ARM: EXYNOS4: Change devname for FIMD clkdev ARM: S3C64XX: Cleanup mach/regs-fb.h from mach-s3c64xx ARM: S5PV210: Cleanup mach/regs-fb.h from mach-s5pv210 ARM: S5PC100: Cleanup mach/regs-fb.h from mach-s5pc100 ARM: S3C24XX: Use generic s3c_set_platdata for devices ARM: S3C64XX: Use generic s3c_set_platdata for OneNAND ARM: SAMSUNG: Use generic s3c_set_platdata for NAND ARM: SAMSUNG: Use generic s3c_set_platdata for USB OHCI ARM: SAMSUNG: Use generic s3c_set_platdata for HWMON ARM: SAMSUNG: Use generic s3c_set_platdata for FB ARM: SAMSUNG: Use generic s3c_set_platdata for TS ARM: S3C64XX: Add PWM backlight support on SMDK6410 ARM: S5P64X0: Add PWM backlight support on SMDK6450 ARM: S5P64X0: Add PWM backlight support on SMDK6440 ARM: S5PC100: Add PWM backlight support on SMDKC100 ARM: S5PV210: Add PWM backlight support on SMDKV210 ARM: EXYNOS4: Add PWM backlight support on SMDKC210 ARM: EXYNOS4: Add PWM backlight support on SMDKV310 ARM: SAMSUNG: Create a common infrastructure for PWM backlight support clocksource: convert 32-bit down counting clocksource on S5PV210/S5P64X0 ... Fix up trivial conflict in arch/arm/mach-imx/mach-scb9328.c
| * Merge branch 'for_3.1/pm-misc' of ↵Tony Lindgren2011-06-291-2/+0
| |\ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into devel-cleanup Conflicts: arch/arm/mach-omap2/pm-debug.c arch/arm/mach-omap2/pm.h
| | * OMAP3: PM debug: remove sleep_while_idle featureKevin Hilman2011-06-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the OMAP-specific PM debug 'sleep_while_idle' feature which is currently available as an OMAP-specific debugfs entry. This duplicates existing ARM-generic functionality available as a boot-time option using the boot cmdline option 'hohlt'. If runtime configuration of this is needed, then adding a debugfs entry for the ARM-generic hlt/nohlt interface should be added. Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | omap2+: Remove gptimer_wakeup for nowTony Lindgren2011-06-201-4/+0
| |/ | | | | | | | | | | | | | | | | | | This removes the support for setting the wake-up timer for debugging. Later on we can reserve gptimer1 for PM code only and have similar functionality. Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Kevin Hilman <khilman@ti.com>
* | ARM: pm: allow suspend finisher to return error codesRussell King2011-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are SoCs where attempting to enter a low power state is ignored, and the CPU continues executing instructions with all state preserved. It is over-complex at that point to disable the MMU just to call the resume path. Instead, allow the suspend finisher to return error codes to abort suspend in this circumstance, where the cpu_suspend internals will then unwind the saved state on the stack. Also omit the tlb flush as no changes to the page tables will have happened. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: pm: omap3: move saving of the auxiliary control registers to CRussell King2011-06-301-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Move the saving of the auxiliary control registers into C; there's no need for this to be in assembly code. This results in less assembly code to deal with in OMAP. Kevin tested full-chip retention and off on 3430/n900, 3530/Overo and 3630/Zoom3. Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: pm: omap3: run the ASM sleep code from DDRJean Pihet2011-06-291-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the ASM sleep code (in arch/arm/mach-omap2/sleep34xx.S) is copied to internal SRAM at boot and after wake-up from CORE OFF mode. However only a small part of the code really needs to run from internal SRAM. This fix lets most of the ASM idle code run from the DDR in order to minimize the SRAM usage and the overhead in the code copy. The only pieces of code that are mandatory in SRAM are: - the i443 erratum WA, - the i581 erratum WA, - the security extension code. SRAM usage: - original code: . 560 bytes for omap3_sram_configure_core_dpll (used by DVFS), . 852 bytes for omap_sram_idle (used by suspend/resume in RETention), . 124 bytes for es3_sdrc_fix (used by suspend/resume in OFF mode on ES3.x), . 108 bytes for save_secure_ram_context (used on HS parts only). With this fix the usage for suspend/resume in RETention goes down 288 bytes, so the gain in SRAM usage for suspend/resume is 564 bytes. Also fixed the SRAM initialization sequence to avoid an unnecessary copy to SRAM at boot time and for readability. Tested on Beagleboard (ES2.x) in idle with full RET and OFF modes. Kevin Hilman tested retention and off on 3430/n900, 3530/Overo and 3630/Zoom3 Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: pm: hide 1st and 2nd arguments to cpu_suspend from platform codeRussell King2011-06-241-2/+3
| | | | | | | | | | | | | | | | | | The first and second arguments shouldn't concern platform code, so hide them from each platforms caller. Tested-by: Kevin Hilman <khilman@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: pm: omap34xx: convert to generic suspend/resume supportRussell King2011-06-241-37/+10
|/ | | | | | | | | | Convert omap34xx to use the generic CPU suspend/resume support, rather than implementing its own version. Tested on 3430 LDP. Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Acked-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* OMAP3: PM: Boot message is not an error, and not helpful, remove itSanjeev Premi2011-05-201-2/+0
| | | | | | | | | | It shows up on the console despite using "silent" in the bootargs, and it's really just noise in the boot log since PM init is always called. Signed-off-by: Sanjeev Premi <premi@ti.com> Cc: jhnikula@gmail.com [khilman@ti.com: minor changelog edits] Signed-off-by: Kevin Hilman <khilman@ti.com>
* OMAP3: cpuidle: change the power domains modes determination logicJean Pihet2011-05-201-12/+0
| | | | | | | | | | | | | | The achievable power modes of the power domains in cpuidle depends on the system wide 'enable_off_mode' knob in debugfs. Upon changing enable_off_mode, do not change the C-states 'valid' field but instead dynamically restrict the power modes when entering idle. The C-states 'valid' field is just used to enable/disable some C-states at init and shall not be changed later on. Signed-off-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* Merge branch 'for_2.6.39/pm-integration' of ↵Tony Lindgren2011-03-111-0/+7
|\ | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
| * perf: add OMAP support for the new power eventsJean Pihet2011-03-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds the new power management trace points for the OMAP architecture. The trace points are for: - default idle handler. Since the cpuidle framework is instrumented in the generic way there is no need to add trace points in the OMAP specific cpuidle handler; - SoC clocks changes (enable, disable, set_rate), - power domain states: the desired target state and -if different- the actually hit state. Because of the generic nature of the changes, OMAP3 and OMAP4 are supported. Tested on OMAP3 with suspend/resume, cpuidle, basic DVFS. Signed-off-by: Jean Pihet <j-pihet@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | Merge branch 'integration-2.6.39-for-tony' of ↵Tony Lindgren2011-03-111-123/+4
|\ \ | |/ | | | | | | | | | | git://git.pwsan.com/linux-integration into omap-for-linus Conflicts: arch/arm/mach-omap2/pm34xx.c
| * OMAP2/3: PM: remove manual CM_AUTOIDLE bit setting in mach-omap2/pm*xx.cPaul Walmsley2011-03-071-104/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These CM_AUTOIDLE bits are now set by the clock code via the common PM code in mach-omap2/pm.c. N.B.: The pm24xx.c code that this patch removes didn't ensure that the CM_AUTOIDLE bits were set for several 2430-only modules, such as GPIO5, MDM_INTC, MMCHS1/2, the modem oscillator clock, and USBHS. Similarly, the pm34xx.c code that this patch removes didn't ensure that the CM_AUTOIDLE bits were set for USIM and the AM3517 UART4. Those cases should now be handled. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com>
| * OMAP2+: clock: autoidle as many clocks as possible if CONFIG_OMAP_RESET_CLOCKSPaul Walmsley2011-02-251-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to enable autoidle for as many clocks as possible in the OMAP2+-common CONFIG_OMAP_RESET_CLOCKS code. Currently, this only enables DPLL autoidle for OMAP3/4 DPLLs; but future patches will enable autoidle for other clocks and the OMAP2 DPLL/APLLs. In the long run, we should probably get rid of CONFIG_OMAP_RESET_CLOCKS, and unconditionally run the code that it selects. Otherwise, the state of the clock tree won't match the hardware state - this could result in clocks being enabled or disabled unpredictably. Based on a patch by Rajendra Nayak <rnayak@ti.com> that did this in the pm34xx.c/pm44xx.c code. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Rajendra Nayak <rnayak@ti.com>
| * OMAP: clockdomain: Arch specific funcs for hwsup control of clkdmRajendra Nayak2011-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the following architecture specific funtions for omap2/3/4 .clkdm_allow_idle .clkdm_deny_idle Convert the platform-independent framework to call these functions. Also rename the api's by removing the omap2_ preamble. Hence call omap2_clkdm_allow_idle as clkdm_allow_idle and omap2_clkdm_deny_idle as clkdm_deny_idle. Make the _clkdm_add_autodeps and _clkdm_del_autodeps as non-static so they can be accessed from OMAP2/3 platform specific code. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
| * OMAP: clockdomain: Arch specific funcs for sleep/wakeup of clkdmRajendra Nayak2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the following architecture specific funtions for omap2/3/4 .clkdm_sleep .clkdm_wakeup Convert the platform-independent framework to call these functions. Also rename the api's by removing the omap2_ preamble. Hence call omap2_clkdm_wakeup as clkdm_wakeup and omap2_clkdm_sleep as clkdm_sleep. Signed-off-by: Rajendra Nayak <rnayak@ti.com> [paul@pwsan.com: fixed omap3_clkdm_clear_all_sleepdeps() and omap2_clkdm_clear_all_wkdeps() to test against the correct loop termination condition; thanks to Kevin Hilman for finding and helping fix] Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
* | omap3: pm: Use exported set_cr() instead of a custom one.Santosh Shilimkar2011-03-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | Remove the custom restore_control_register() and use the exported set_cr() instead to set the system control register(SCTRL) value. No functional change. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | OMAP2/3: PM: remove unnecessary wakeup/sleep dependency clearPaul Walmsley2011-03-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | The OMAP2 and OMAP3 PM code clears clockdomain wakeup and sleep dependencies. This is unnecessary after commit 6f7f63cc9adf3192e6fcac4e8bed5cc10fd924aa ("OMAP clockdomain: initialize clockdomain registers when the clockdomain layer starts") which clears these dependencies during clockdomain init. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | OMAP3630: PM: don't warn the user with a trace in case of PM34XX_ERRATUMRicardo Salveti de Araujo2011-03-091-2/+1
|/ | | | | | | | | | In case in user has a OMAP3630 < ES1.2 the kernel should warn the user about the ERRATUM, but using pr_warn instead of WARN_ON is already enough, as there is nothing else the user can do besides changing the board. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* Merge branch 'for_2.6.38/pm-fixes' of ↵Tony Lindgren2011-01-311-3/+4
|\ | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into devel-fixes
| * OMAP3: PM: fix save secure RAM to restore MPU power stateKevin Hilman2011-01-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, on HS/EMU devices, MPU power state forced to on during PM init by the save secure RAM code. Rather than forcing the state of MPU powerdomain to on, simply read the current value and restore it after the ROM code has run. This only affects the !CPUidle case since when CPUidle is enabled, the MPU power state is dynamically changed by CPUidle. In the !CPUidle case, MPU power state is initialized once at init and never touched. Acked-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
* | console: rename acquire/release_console_sem() to console_lock/unlock()Torben Hohn2011-01-261-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | The -rt patches change the console_semaphore to console_mutex. As a result, a quite large chunk of the patches changes all acquire/release_console_sem() to acquire/release_console_mutex() This commit makes things use more neutral function names which dont make implications about the underlying lock. The only real change is the return value of console_trylock which is inverted from try_acquire_console_sem() This patch also paves the way to switching console_sem from a semaphore to a mutex. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert] Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: Thomas Gleixner <tglx@tglx.de> Cc: Greg KH <gregkh@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud