OpenCloudOS-Kernel/arch/arm/mach-omap2
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
..
Kconfig ARM OMAP3: Initial support for Nokia RX-51, v3 2009-03-23 20:52:48 -07:00
Makefile OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
Makefile.boot [ARM] 3145/1: OMAP 3a/5: Add support for omap24xx 2005-11-10 14:26:51 +00:00
board-2430sdp.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel 2009-03-25 18:31:35 +00:00
board-3430sdp.c [ARM] OMAP: Fix compile for omap2_init_common_hw() 2009-03-25 19:51:46 +00:00
board-apollon.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel 2009-03-25 18:31:35 +00:00
board-generic.c [ARM] OMAP2 SDRC: add SDRAM timing parameter infrastructure 2009-02-08 17:50:39 +00:00
board-h4.c ARM: OMAP: Remove old dead gpio expander code 2009-04-23 11:10:40 -07:00
board-ldp.c arm: convert omap ldp platform to use smsc911x 2009-04-02 18:26:17 +01:00
board-omap3beagle.c OMAP2/3 GPTIMER: allow system tick GPTIMER to be changed in board-*.c files 2009-04-23 21:11:10 -06:00
board-omap3pandora.c [ARM] OMAP: Fix compile for omap2_init_common_hw() 2009-03-25 19:51:46 +00:00
board-overo.c ARM: Add SMSC911X support to Overo platform (V2) 2009-04-02 18:32:28 +01:00
board-rx51-peripherals.c ARM OMAP3: Initial support for Nokia RX-51, v3 2009-03-23 20:52:48 -07:00
board-rx51.c ARM: OMAP3: remove duplicated #include 2009-04-23 11:10:49 -07:00
clock.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
clock.h [ARM] omap: add support for bypassing DPLLs 2009-02-19 17:28:30 +00:00
clock24xx.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
clock24xx.h ARM: OMAP2/3: Remove OMAP_CM_REGADDR 2009-05-25 11:26:46 -07:00
clock34xx.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
clock34xx.h ARM: OMAP2/3: Remove OMAP_CM_REGADDR 2009-05-25 11:26:46 -07:00
clockdomain.c [ARM] omap: ensure that failing power domain lookups produce errors 2009-02-23 14:55:34 +00:00
clockdomains.h [ARM] OMAP3: update ES level flags to discriminate between post-ES2 revisions 2009-02-23 14:52:51 +00:00
cm-regbits-24xx.h [ARM] OMAP2 PRCM: clean up CM_IDLEST bits 2009-02-08 17:50:37 +00:00
cm-regbits-34xx.h [ARM] OMAP2 PRCM: clean up CM_IDLEST bits 2009-02-08 17:50:37 +00:00
cm.h ARM: OMAP2/3: Remove OMAP_CM_REGADDR 2009-05-25 11:26:46 -07:00
control.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
devices.c ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config 2009-05-12 11:20:30 -07:00
gpmc.c ARM: OMAP: Fix compiler warnings in gpmc.c 2008-11-04 13:35:06 -08:00
id.c [ARM] OMAP3: update ES level flags to discriminate between post-ES2 revisions 2009-02-23 14:52:51 +00:00
io.c [ARM] OMAP2 SDRC: add SDRAM timing parameter infrastructure 2009-02-08 17:50:39 +00:00
irq.c OMAP: Add new function to check wether there is irq pending 2009-05-28 10:59:04 -07:00
mailbox.c omap mailbox: add save_/restore_ctx() for PM 2009-03-23 18:07:26 -07:00
mcbsp.c [ARM] omap: mcbsp: convert to use fck/ick clocks directly 2009-02-08 17:50:19 +00:00
mmc-twl4030.c ARM: OMAP3: mmc-twl4030 allow arbitrary slot names, v3 2009-03-23 18:51:23 -07:00
mmc-twl4030.h ARM: OMAP3: mmc-twl4030 allow arbitrary slot names, v3 2009-03-23 18:51:23 -07:00
mux.c ARM: OMAP3: Add more GPIO mux options 2009-03-23 18:51:21 -07:00
pm-debug.c OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
pm.h OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
pm24xx.c OMAP3: PM: UART: disable clocks when idle and off-mode support 2009-05-28 10:59:06 -07:00
pm34xx.c OMAP3: PM: UART: disable clocks when idle and off-mode support 2009-05-28 10:59:06 -07:00
powerdomain.c [ARM] OMAP3 pwrdm: add hardware save-and-restore (SAR) support 2008-08-21 21:26:39 +01:00
powerdomains.h [ARM] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond 2009-02-23 14:52:51 +00:00
powerdomains24xx.h ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains 2008-08-19 11:08:42 +03:00
powerdomains34xx.h [ARM] OMAP3 powerdomains: make USBTLL SAR only available on ES3.1 and beyond 2009-02-23 14:52:51 +00:00
prcm-common.h OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
prcm.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
prm-regbits-24xx.h ARM: OMAP2: Powerdomain: Add OMAP2 powerdomains 2008-08-19 11:08:42 +03:00
prm-regbits-34xx.h ARM: OMAP3: Fix HW SAVEANDRESTORE shift define 2009-05-16 08:28:17 -07:00
prm.h ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE 2009-05-25 11:26:42 -07:00
sdrc.c OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
sdrc.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
sdrc2xxx.c ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE 2009-05-25 11:26:42 -07:00
serial.c OMAP3: PM: UART: disable clocks when idle and off-mode support 2009-05-28 10:59:06 -07:00
sleep24xx.S OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
sleep34xx.S OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
sram34xx.S OMAP3 clock: only unlock SDRC DLL if SDRC clk < 83MHz 2009-05-12 17:27:10 -06:00
sram242x.S ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE 2009-05-25 11:26:42 -07:00
sram243x.S ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE 2009-05-25 11:26:42 -07:00
timer-gp.c Merge branch 'omap-clock-fixes' into omap-fixes 2009-04-24 09:56:16 -07:00
usb-musb.c OMAP2/3: PM: push core PM code from linux-omap 2009-05-28 10:58:50 -07:00
usb-tusb6010.c ARM: OMAP2: Fix tusb6010 init error and compilation warning 2009-05-12 11:20:02 -07:00