linux/arch/arm/plat-omap
Kevin Hilman 4af4016c53 OMAP3: PM: UART: disable clocks when idle and off-mode support
This patch allows the UART clocks to be disabled when the OMAP UARTs
are inactive, thus permitting the chip to hit retention in idle.
After the expiration of an activity timer, each UART is allowed to
disable its clocks so the system can enter retention.  The activity
timer is (re)activated on any UART interrupt, UART wake event or any
IO pad wakeup.  The actual disable of the UART clocks is done in the
'prepare_idle' hook called from the OMAP idle loop.

While the activity timer is active, the smart-idle mode of the UART is
also disabled.  This is due to a "feature" of the UART module that
after a UART wakeup, the smart-idle mode may be entered before the
UART has communicated the interrupt, or upon TX, an idle mode may be
entered before the TX FIFOs are emptied.

Upon suspend, the 'prepare_suspend' hook cancels any pending activity
timers and allows the clocks to be disabled immediately.

In addition, upon disabling clocks the UART state is saved in case
of an off-mode transition while clocks are off.

Special thanks to Tero Kristo for the initial ideas and first versions
of UART idle support, and to Jouni Hogander for extra testing and
bugfixes.

Tested on OMAP3 (Beagle, RX51, SDP, EVM) and OMAP2 (n810)

Cc: Tero Kristo <tero.kristo@nokia.com>
Cc: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-05-28 10:59:06 -07:00
..
include/mach OMAP3: PM: UART: disable clocks when idle and off-mode support 2009-05-28 10:59:06 -07:00
clock.c OMAP2xxx clock: rename clk_init_one() to clk_preinit() 2009-05-12 17:50:30 -06:00
common.c OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
cpu-omap.c
debug-devices.c
debug-leds.c
devices.c ARM: OMAP3: mmc-twl4030 init passes device nodes back, v2 2009-03-23 18:51:22 -07:00
dma.c ARM: OMAP: Fix for possible race condition in omap_free_dma() 2009-04-23 11:10:40 -07:00
dmtimer.c ARM: OMAP: Remove unwanted type casts and fix the compiler warning. 2009-05-25 11:26:47 -07:00
fb.c ARM: OMAP: Fix printing of reserved memory for frambuffer 2009-05-11 09:58:19 -07:00
gpio.c ARM: OMAP3: Fix number of GPIO lines for 34xx 2009-05-16 08:28:16 -07:00
i2c.c ARM: OMAP: Add method to register additional I2C busses on the command line, v2 2009-03-23 18:51:20 -07:00
io.c
Kconfig OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
mailbox.c omap mailbox: remove unnecessary header file inclusion 2009-03-23 18:07:32 -07:00
Makefile
mcbsp.c
mux.c
ocpi.c
sram.c Merge branch 'omap-clock-upstream' of git://git.pwsan.com/linux-2.6 into for-next 2009-05-26 14:41:35 -07:00
usb.c ARM: OMAP: get rid of OMAP_TAG_USB, v2 2009-03-23 18:51:20 -07:00