linux-kernel-test/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 [ARM] OMAP2: Implement CPUfreq frequency table based on PRCM table 2009-02-08 17:50:28 +00:00
debug-devices.c ARM: OMAP: Switch to gpio_request/free calls 2008-12-10 17:35:30 -08:00
debug-leds.c ARM: OMAP: switch to standard gpio get/set calls 2008-12-10 17:35:25 -08:00
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 ARM: OMAP3: Add minimal omap3430 support 2008-10-09 17:51:41 +03:00
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 ARM: OMAP: Allow I2C bus driver to be compiled as a module 2009-03-04 10:07:41 -08:00
mcbsp.c [ARM] omap: mcbsp: convert to use fck/ick clocks directly 2009-02-08 17:50:19 +00:00
mux.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
ocpi.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
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