kernel-ark/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 ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
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 ARM: OMAP: Add some extra #defines for Amstrad Delta 2006-09-25 12:41:31 +03:00
board-apollon.h ARM: OMAP1: Make omap1 use MMC multislot structures 2008-02-08 10:38:01 -08:00
board-fsample.h ARM: OMAP: Add core fsample support 2006-06-26 16:16:03 -07:00
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 ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
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 [ARM] 3433/1: ARM: OMAP: 8/8 Update board files 2006-04-02 17:46:30 +01:00
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 ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
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 ARM: OMAP: Sync framebuffer headers with N800 tree 2007-05-09 10:39:03 +01:00
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 [PATCH] OMAP: Add keypad driver 2006-09-29 09:18:07 -07:00
lcd_mipid.h ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
led.h ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
mailbox.h [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02:00
mcbsp.h ARM: OMAP: McBSP: Prepare for splitting into omap1 and omap2 code 2008-07-03 12:24:39 +03:00
mcspi.h ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
memory.h ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
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 ARM: OMAP: Sync headers with linux-omap 2007-05-08 20:36:25 +01:00
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 [ARM] 3143/1: OMAP 4/5: Update omap include files 2005-11-10 14:26:53 +00:00
omap-alsa.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
omapfb.h ARM: OMAP: Sync framebuffer headers with N800 tree 2007-05-09 10:39:03 +01:00
onenand.h ARM: OMAP: Merge driver headers from N800 tree 2007-09-20 09:59:26 -07:00
param.h [ARM] 3427/1: ARM: OMAP: 2/8 Update timers 2006-04-02 17:46:21 +01:00
pm.h fix file specification in comments 2006-10-03 23:01:26 +02:00
prcm.h [ARM] 3426/1: ARM: OMAP: 1/8 Update clock framework 2006-04-02 17:46:20 +01:00
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 Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
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 [ARM] 3143/1: OMAP 4/5: Update omap include files 2005-11-10 14:26:53 +00:00
uncompress.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
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