linux/drivers/tty/serial
Paul Walmsley 43cf7c0beb tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip
It seems that when the transmit FIFO threshold is reached on OMAP
UARTs, it does not result in a PRCM wakeup.  This appears to be a
silicon bug.  This means that if the MPU powerdomain is in a low-power
state, the MPU will not be awakened to refill the FIFO until the next
interrupt from another device.

The best solution, at least for the short term, would be for the OMAP
serial driver to call a OMAP subarchitecture function to prevent the
MPU powerdomain from entering a low power state while the FIFO has
data to transmit.  However, we no longer have a clean way to do this,
since patches that add platform_data function pointers have been
deprecated by the OMAP maintainer.  So we attempt to work around this
as well.  The workarounds depend on the setting of CONFIG_CPU_IDLE.

When CONFIG_CPU_IDLE=n, the driver will now only transmit one byte at
a time.  This causes the transmit FIFO threshold interrupt to stay
active until there is no more data to be sent.  Thus, the MPU
powerdomain stays on during transmits.  Aside from that energy
consumption penalty, each transmitted byte results in a huge number of
UART interrupts -- about five per byte.  This wastes CPU time and is
quite inefficient, but is probably the most expedient workaround in
this case.

When CONFIG_CPU_IDLE=y, there is a slightly more direct workaround:
the PM QoS constraint can be abused to keep the MPU powerdomain on.
This results in a normal number of interrupts, but, similar to the
above workaround, wastes power by preventing the MPU from entering
WFI.

Future patches are planned for the 3.4 merge window to implement more
efficient, but also more disruptive, workarounds to these problems.

DMA operation is unaffected by this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Govindraj Raja <govindraj.r@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:11:07 -08:00
..
8250 serial: group all the 8250 related code together 2012-01-24 11:23:59 -08:00
cpm_uart TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
jsm jsm: Fixed EEH recovery error 2012-01-24 12:55:36 -08:00
21285.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
68328serial.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
68328serial.h TTY: serial, remove dead code from 68328 2011-09-22 15:47:54 -07:00
Kconfig serial: group all the 8250 related code together 2012-01-24 11:23:59 -08:00
Makefile serial: group all the 8250 related code together 2012-01-24 11:23:59 -08:00
altera_jtaguart.c Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6 2011-10-27 08:35:41 +02:00
altera_uart.c Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6 2011-10-27 08:35:41 +02:00
amba-pl010.c serial: pl010: Enable module alias autogeneration for AMBA drivers 2011-11-22 10:58:32 +00:00
amba-pl011.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
apbuart.c apbuart: fix section mismatch warning 2011-12-27 16:33:13 -05:00
apbuart.h
ar933x_uart.c SERIAL: AR933X: Add driver for the built-in UART of the SoC 2011-12-07 22:02:46 +00:00
atmel_serial.c atmel_serial: fix spinlock lockup in RS485 code 2012-01-04 16:19:34 -08:00
bcm63xx_uart.c serial: bcm63xx_uart: fix irq storm after rx fifo overrun. 2011-06-16 12:01:58 -07:00
bfin_sport_uart.c serial: bfin-sport-uart: Add tty ASYNC_CTS_FLOW flag to do CTS flow control. 2011-12-09 19:05:33 -08:00
bfin_sport_uart.h tty: bfin-sport-uart: Rx interrupt is not called always with irq disabled. 2011-12-09 19:05:33 -08:00
bfin_uart.c serial: bfin-uart: Remove ASYNC_CTS_FLOW flag for hardware automatic CTS. 2011-12-13 09:50:15 -08:00
clps711x.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
crisv10.c RS485: fix inconsistencies in the meaning of some variables 2011-11-15 12:13:44 -08:00
crisv10.h
dz.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
dz.h
icom.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
icom.h
ifx6x60.c TTY: Remove redundant spi driver bus initialization 2011-11-26 20:19:21 -08:00
ifx6x60.h
imx.c tty: serial: imx: move del_timer_sync() to avoid potential deadlock 2012-01-04 16:30:36 -08:00
ioc3_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ioc4_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ip22zilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ip22zilog.h
kgdboc.c tty: Add module.h to drivers/tty users who just expect it there. 2011-10-31 19:31:27 -04:00
lantiq.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty 2011-10-26 15:11:09 +02:00
max3100.c TTY: Remove redundant spi driver bus initialization 2011-11-26 20:19:21 -08:00
max3107-aava.c TTY: Remove redundant spi driver bus initialization 2011-11-26 20:19:21 -08:00
max3107.c TTY: Remove redundant spi driver bus initialization 2011-11-26 20:19:21 -08:00
max3107.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mcf.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
mfd.c Merge 3.2-rc3 into tty-next to handle merge conflict in tty_ldisc.c 2011-11-26 20:07:25 -08:00
mpc52xx_uart.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
mpsc.c
mrst_max3110.c TTY: Remove redundant spi driver bus initialization 2011-11-26 20:19:21 -08:00
mrst_max3110.h max3110: add sysrq support 2011-08-26 11:01:15 -07:00
msm_serial.c Merge branch 'next/dt' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 21:02:35 -07:00
msm_serial.h tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
msm_serial_hs.c msm_serial_hs: Fix spinlock recursion in handling CTS 2011-12-09 19:10:04 -08:00
msm_smd_tty.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
mux.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
mxs-auart.c clock management changes for i.MX 2012-01-09 14:44:15 -08:00
netx-serial.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
nwpserial.c tty: Add export.h for EXPORT_SYMBOL/THIS_MODULE to exporters 2011-10-31 19:31:28 -04:00
of_serial.c drivercore: Add helper macro for platform_driver boilerplate 2011-10-25 00:35:47 +02:00
omap-serial.c tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip 2012-01-24 14:11:07 -08:00
pch_uart.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
pmac_zilog.c tty/serial/pmac_zilog: Fix suspend & resume 2011-12-16 11:10:01 +11:00
pmac_zilog.h tty/serial/pmac_zilog: Fix suspend & resume 2011-12-16 11:10:01 +11:00
pnx8xxx_uart.c
pxa.c serial: pxa: work around for errata #20 2011-09-22 15:47:53 -07:00
sa1100.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
samsung.c serial: samsung: Fix build for non-Exynos4210 devices 2011-12-23 10:07:01 +09:00
samsung.h serial: samsung: merge probe() function from all SoC specific extensions 2011-12-23 10:07:00 +09:00
sb1250-duart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sc26xx.c TTY: serial: convert drivers/tty/serial/* to use module_platform_driver() 2011-11-30 20:11:46 +09:00
serial_core.c serial: use DIV_ROUND_CLOSEST instead of open coding it 2012-01-04 16:18:54 -08:00
serial_ks8695.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
serial_txx9.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sh-sci.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
sh-sci.h ARM: mach-shmobile: R-Mobile A1 support. 2011-11-11 16:55:31 +09:00
sirfsoc_uart.c UART: add CSR SiRFprimaII SoC on-chip uart drivers 2011-11-17 11:46:04 -08:00
sirfsoc_uart.h UART: add CSR SiRFprimaII SoC on-chip uart drivers 2011-11-17 11:46:04 -08:00
sn_console.c TTY: irq: Remove IRQF_DISABLED 2011-09-22 16:08:57 -07:00
suncore.c
suncore.h
sunhv.c dt/serial: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:46 -07:00
sunsab.c dt/serial: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:46 -07:00
sunsab.h
sunsu.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
sunzilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sunzilog.h
timbuart.c TTY: serial: convert drivers/tty/serial/* to use module_platform_driver() 2011-11-30 20:11:46 +09:00
timbuart.h
uartlite.c Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6 2011-10-27 08:35:41 +02:00
ucc_uart.c drivers/serial/ucc_uart.c: Add missing call to init UCC UART port timeout 2011-11-24 02:23:45 -06:00
vr41xx_siu.c TTY: serial: convert drivers/tty/serial/* to use module_platform_driver() 2011-11-30 20:11:46 +09:00
vt8500_serial.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
xilinx_uartps.c tty: Add module.h to drivers/tty users who just expect it there. 2011-10-31 19:31:27 -04:00
zs.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
zs.h