linux/arch/arm/plat-omap/include/plat
Kevin Hilman 9799aca203 OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies
First, this patch adds new worst-case latency values to the
omap_device_pm_latency struct.  Here the worst-case measured latencies
for the activate and deactivate hooks are stored.

In addition, add an option to auto-adjust the latency values used for
device activate/deactivate.

By setting a new 'OMAP_DEVICE_LATENCY_AUTO_ADJUST' flag in the
omap_device_pm_latency struct, the omap_device layer automatically
adjusts the activate/deactivate latencies to the worst-case measured
values.

Anytime a new worst-case value is found, it is printed to the console.
Here is an example log during boot using UART2 s an example.  After
boot, the OPP is manually changed to the 125MHz OPP:

[...]
Freeing init memory: 128K
omap_device: serial8250.2: new worst case deactivate latency 0: 30517
omap_device: serial8250.2: new worst case activate latency 0: 30517
omap_device: serial8250.2: new worst case activate latency 0: 218139648
omap_device: serial8250.2: new worst case deactivate latency 0: 61035
omap_device: serial8250.2: new worst case activate latency 0: 278076171
omap_device: serial8250.2: new worst case activate latency 0: 298614501
omap_device: serial8250.2: new worst case activate latency 0: 327331542

/ # echo 125000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

omap_device: serial8250.2: new worst case deactivate latency 0: 91552

Motivation: this can be used as a technique to automatically determine
the worst case latency values.  The current method of printing a
warning on every violation is too noisy to actually interact the
console in order to set low OPP to discover latencies.

Another motivation for this patch is that the activate/deactivate
latenices can vary depending on the idlemode of the device.  While
working on the UARTs, I noticed that when using no-idle, the activate
latencies were as high as several hundred msecs as shown above.  When
the UARTs are in smart-idle, the max latency is well under 100 usecs.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-26 20:13:02 -07:00
..
blizzard.h
board-ams-delta.h
board-sx1.h
board-voiceblue.h
board.h omap1: Fix compile for omap1_bl.c 2010-01-08 10:29:06 -08:00
clkdev_omap.h OMAP3 clock: reorganize CK_* platform flags 2010-01-26 20:12:56 -07:00
clkdev.h
clock.h OMAP clock: make the fixed divisor clock code available for all OMAPs 2010-01-26 20:12:57 -07:00
clockdomain.h OMAP clockdomain/powerdomain: improve documentation 2010-01-26 20:13:02 -07:00
common.h omap: Split i2c platform init for mach-omap1 and mach-omap2 2009-12-11 16:16:32 -08:00
control.h AM35xx: Add AM35xx specific control module registers 2010-01-26 20:12:56 -07:00
cpu.h ARM: OMAP4: PM: OMAP4 essential basic initialisations. 2010-01-26 20:12:51 -07:00
display.h OMAP: DSS2: Display Subsystem Driver core 2009-12-09 12:04:34 +02:00
dma.h omap1: DMA: move LCD related code from plat-omap to mach-omap1 2009-12-11 16:16:33 -08:00
dmtimer.h
dsp_common.h
fpga.h
gpio-switch.h
gpio.h OMAP3: PM: GPIO context save/restore 2009-11-11 14:40:12 -08:00
gpmc-smc91x.h
gpmc.h omap: Correcting GPMC_CONFIG1_DEVICETYPE_NAND 2009-12-11 16:16:35 -08:00
hardware.h
hwa742.h
i2c.h omap: Split i2c platform init for mach-omap1 and mach-omap2 2009-12-11 16:16:32 -08:00
io.h OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space 2010-01-08 15:23:06 -07:00
iommu2.h
iommu.h
iovmm.h
irda.h
irqs.h OMAP3: PM: Disable interrupt controller AUTOIDLE before WFI 2010-01-20 18:16:00 -08:00
keypad.h
lcd_mipid.h
led.h
mailbox.h omap: mailbox: OMAP4 Mailbox-driver Patch to support tasklet implementation 2009-11-22 10:24:33 -08:00
mcbsp.h
mcspi.h
memory.h Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2009-12-08 08:15:29 -08:00
menelaus.h
mmc.h
mux.h omap1: Add 7xx clocks and pin muxes for SPI 2010-01-08 10:29:05 -08:00
nand.h
omap7xx.h omap1: Add 7xx clocks and pin muxes for SPI 2010-01-08 10:29:05 -08:00
omap16xx.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
omap24xx.h
omap34xx.h omap3: drop all IVA-related address base definitions 2009-11-22 10:24:32 -08:00
omap44xx.h ARM: OMAP4: PM: Fix the PRM and CM base addresses 2009-12-11 17:00:44 -07:00
omap730.h
omap850.h
omap1510.h
omap_device.h OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies 2010-01-26 20:13:02 -07:00
omap_hwmod.h OMAP3: hwmod: Adding flag to prevent caching of sysconfig register. 2010-01-19 17:30:51 -07:00
omap-alsa.h
omap-pm.h
onenand.h
param.h
powerdomain.h OMAP clockdomain/powerdomain: improve documentation 2010-01-26 20:13:02 -07:00
prcm.h OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm 2010-01-26 20:12:59 -07:00
sdrc.h OMAP2: Add funcs for writing SMS_ROT_* registers 2009-12-09 11:44:32 +02:00
serial.h OMAP3: serial - allow platforms specify which UARTs to initialize 2009-12-11 16:16:35 -08:00
smp.h OMAP4: AuxCoreBoot registers only accessible in secure mode 2009-12-11 16:16:35 -08:00
sram.h OMAP3: PM: CORE domain off-mode support 2009-11-11 14:42:25 -08:00
system.h
tc.h
timer-gp.h
timex.h
uncompress.h omap: introduce OMAP_LL_DEBUG_NONE DEBUG_LL config 2009-11-22 10:24:32 -08:00
usb.h omap: update plat/usb.h to allow ehci driver to build 2009-11-22 10:24:32 -08:00
vram.h OMAP: Add VRAM manager 2009-12-09 12:04:33 +02:00
vrfb.h OMAP: Add support for VRFB rotation engine 2009-12-09 12:04:33 +02:00