android_kernel_xiaomi_sm8350/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
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
board-fsample.h
board-h2.h
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
board-palmte.h
board-palmtt.h
board-palmz71.h
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
board-voiceblue.h
board.h
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
dsp_common.h
eac.h
entry-macro.S
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
gpioexpander.h
gpmc.h
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
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
mmc.h
mtd-xip.h
mux.h
nand.h
omap16xx.h
omap24xx.h
omap34xx.h ARM: OMAP: Add OMAP3430 base defines 2008-07-03 12:24:31 +03:00
omap730.h
omap1510.h
omap-alsa.h
omapfb.h
onenand.h
param.h
pm.h
prcm.h
sdrc.h
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