linux-kernel-test/arch/arm/plat-omap
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
..
include/plat OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies 2010-01-26 20:13:02 -07:00
clock.c OMAP clock: make the fixed divisor clock code available for all OMAPs 2010-01-26 20:12:57 -07:00
common.c OMAP: timekeeping: time should not stop during suspend 2010-01-20 18:16:08 -08:00
cpu-omap.c OMAP clock/CPUFreq: add clk_exit_cpufreq_table() 2010-01-08 15:23:16 -07:00
debug-devices.c omap: use smc91x_platdata to setup smc91x 2009-12-11 16:16:33 -08:00
debug-leds.c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
devices.c omap: arch/arm/plat-omap/devices.c - sort alphabetically 2009-12-11 16:16:36 -08:00
dma.c OMAP: dma_chan[lch_head].flag & OMAP_DMA_ACTIVE tested twice in omap_dma_unlink_lch() 2010-01-19 18:17:38 -08:00
dmtimer.c OMAP2/3: DMTIMER: Clear pending interrupts when stopping a timer 2010-01-21 18:30:10 -08:00
fb.c OMAP: DSS2: omapfb driver 2009-12-09 12:12:44 +02:00
gpio.c omap: Remove uninitialized warning for gpio.c 2010-01-08 10:29:05 -08:00
i2c.c omap: Split i2c platform init for mach-omap1 and mach-omap2 2009-12-11 16:16:32 -08:00
io.c OMAP2xxx IO mapping: mark DSP mappings as being 2420-only 2010-01-08 15:23:05 -07:00
iommu-debug.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
iommu.c omap: &&/|| confusion in iommu_put() 2010-01-08 10:29:05 -08:00
iopgtable.h omap iommu: tlb and pagetable primitives 2009-05-05 14:52:39 +03:00
iovmm.c arch/arm/plat-omap: Drop an unnecessary NULL test 2009-11-22 10:24:32 -08:00
Kconfig ARM: OMAP4: PM: Add dummy hooks for OMAP4 dpll api's 2009-12-11 17:00:46 -07:00
mailbox.c omap: mailbox: OMAP4 Mailbox-driver Patch to support tasklet implementation 2009-11-22 10:24:33 -08:00
Makefile OMAP2/3/4 core: create omap_device layer 2009-09-03 20:14:05 +03:00
mcbsp.c omap: McBSP: Fix possible port lockout 2010-01-08 10:29:04 -08:00
mux.c omap: mux: Add new style pin multiplexing code for omap3 2009-12-11 16:16:32 -08:00
ocpi.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
omap_device.c OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies 2010-01-26 20:13:02 -07:00
omap-pm-noop.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
sram.c OMAP4: Fix SRAM base and size 2009-12-11 16:16:35 -08:00
usb.c omap1: Add omap7xx USB support 2009-12-11 16:16:34 -08:00