1
linux/include/asm-arm/arch-omap
Paul Walmsley 88b8ba9057 ARM: OMAP2: Clock: New OMAP2/3 DPLL rate rounding algorithm
This patch adds a new rate rounding algorithm for DPLL clocks on the
OMAP2/3 architecture.

For a desired DPLL target rate, there may be several
multiplier/divider (M, N) values which will generate a sufficiently
close rate.  Lower N values result in greater power economy.  However,
lower N values can cause the difference between the rounded rate and
the target rate ("rate error") to be larger than it would be with a
higher N.  This can cause downstream devices to run more slowly than
they otherwise would.

This DPLL rate rounding algorithm:

- attempts to find the lowest possible N (DPLL divider) to reach the
  target_rate (since, according to Richard Woodruff <r-woodruff@ti.com>,
  lower N values save more power than higher N values).

- allows developers to set an upper bound on the error between the
  rounded rate and the desired target rate ("rate tolerance"), so an
  appropriate balance between rate fidelity and power savings can be
  set.  This maximum rate error tolerance is set via
  omap2_set_dpll_rate_tolerance().

- never returns a rounded rate higher than the target rate.

The rate rounding algorithm caches the last rounded M, N, and rate
computation to avoid rounding the rate twice for each clk_set_rate()
call.  (This patch does not yet implement set_rate for DPLLs; that
follows in a future patch.)

The algorithm trades execution speed for rate accuracy.  It will find
the (M, N) set that results in the least rate error, within a
specified rate tolerance.  It does this by evaluating each divider
setting - on OMAP3, this involves 128 steps.  Another approach to DPLL
rate rounding would be to bail out as soon as a valid rate is found
within the rate tolerance, which would trade rate accuracy for
execution speed.  Alternate implementations welcome.

This code is not yet used by the OMAP24XX DPLL clock, since it
is currently defined as a composite clock, fusing the DPLL M,N and the
M2 output divider.  This patch also renames the existing OMAP24xx DPLL
programming functions to highlight that they program both the DPLL and
the DPLL's output multiplier.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-07-03 12:24:46 +03:00
..
aic23.h
blizzard.h ARM: OMAP: Merge driver headers from N800 tree 2007-09-20 09:59:26 -07:00
board-2430sdp.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
board-ams-delta.h
board-apollon.h ARM: OMAP1: Make omap1 use MMC multislot structures 2008-02-08 10:38:01 -08:00
board-fsample.h
board-h2.h ARM: OMAP1: Make omap1 use MMC multislot structures 2008-02-08 10:38:01 -08:00
board-h3.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
board-h4.h
board-innovator.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
board-nokia.h
board-osk.h ARM: OMAP: Use gpiolib with tps65010 for OSK 5912 2008-04-14 09:57:06 -07:00
board-palmte.h [ARM] fix OMAP include loops 2008-05-23 15:38:07 +01:00
board-palmtt.h ARM: OMAP: Palm Tungsten|T support 2007-09-20 18:34:50 -07:00
board-palmz71.h ARM: OMAP: PalmZ71 support 2007-09-20 18:34:50 -07:00
board-perseus2.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
board-sx1.h ARM: OMAP1: Use MMC multislot structures for Siemens SX1 board 2008-02-08 10:38:01 -08:00
board-voiceblue.h
board.h ARM: OMAP: abstract debug card setup (smc, leds) 2007-09-20 09:59:20 -07:00
clock.h ARM: OMAP2: Clock: New OMAP2/3 DPLL rate rounding algorithm 2008-07-03 12:24:46 +03:00
common.h ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap 2008-07-03 12:24:44 +03:00
control.h ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap 2008-07-03 12:24:44 +03:00
cpu.h ARM: OMAP: Add OMAP chip type structure; clean up mach-omap2/id.c 2008-07-03 12:24:45 +03:00
debug-macro.S
dma.h ARM: OMAP: DMA: Clean-up code 2008-07-03 12:24:37 +03:00
dmtimer.h ARM: OMAP: DMTimer: Optimize by adding load and start 2008-07-03 12:24:30 +03:00
dsp_common.h [ARM] 4869/1: ARM: OMAP: Fix compile for mcbsp 2008-03-20 15:59:31 +00:00
eac.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
entry-macro.S [ARM] fix OMAP include loops 2008-05-23 15:38:07 +01:00
fpga.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
gpio-switch.h
gpio.h [ARM] fix OMAP include loops 2008-05-23 15:38:07 +01:00
gpioexpander.h ARM: OMAP1: Fix compile for boards depending on old gpio expander 2008-03-05 10:23:20 +02:00
gpmc.h ARM: OMAP: Merge gpmc changes from N800 tree 2007-09-20 09:59:26 -07:00
hardware.h ARM: OMAP: Add OMAP3430 base defines 2008-07-03 12:24:31 +03:00
hwa742.h
io.h ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap 2008-07-03 12:24:44 +03:00
irda.h ARM: OMAP: H3 workqueue fixes 2007-08-22 00:42:51 -07:00
irqs.h ARM: OMAP: Clean up interrupt lines to fix warnings for multi-omap 2008-07-03 12:24:41 +03:00
keypad.h
lcd_mipid.h
led.h
mailbox.h
mcbsp.h ARM: OMAP: McBSP: Prepare for splitting into omap1 and omap2 code 2008-07-03 12:24:39 +03:00
mcspi.h
memory.h
menelaus.h ARM: OMAP: Merge driver headers from N800 tree 2007-09-20 09:59:26 -07:00
mmc.h ARM: OMAP: Update MMC header to fix compile 2008-05-09 10:24:47 -07:00
mtd-xip.h
mux.h ARM: OMAP2: Clean-up mux code 2008-04-14 09:57:13 -07:00
nand.h ARM: OMAP1: Make omap1 boards to use omap_nand_platform_data 2008-02-08 10:38:00 -08:00
omap16xx.h
omap24xx.h ARM: OMAP2: Change 24xx to use new register access 2008-04-14 10:29:37 -07:00
omap34xx.h ARM: OMAP: Add OMAP3430 base defines 2008-07-03 12:24:31 +03:00
omap730.h
omap1510.h
omap-alsa.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
omapfb.h
onenand.h ARM: OMAP: Merge driver headers from N800 tree 2007-09-20 09:59:26 -07:00
param.h
pm.h
prcm.h
sdrc.h ARM: OMAP2: Add common register access for 24xx and 34xx 2008-04-14 10:27:25 -07:00
serial.h
sram.h ARM: OMAP: SRAM: Split sram24xx.S into sram242x.S and sram243x.S 2008-07-03 12:24:38 +03:00
system.h
tc.h ARM: OMAP: Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG 2008-07-03 12:24:41 +03:00
timex.h
uncompress.h
usb.h ARM: OMAP: USB: Change omap USB code to use omap_read/write instead of __REG 2008-07-03 12:24:43 +03:00
vmalloc.h