linux/arch/arm
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
..
boot [ARM] 5062/1: pxa: remove unused definition of CONFIG_ARCH_COTULLA_IDP 2008-06-01 11:24:23 +01:00
common [ARM] Export dma_sync_sg_for_device() 2008-06-22 15:41:30 +01:00
configs Merge branches 'pxa' and 'orion-fixes1' 2008-04-29 21:31:06 +01:00
kernel Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2008-05-19 16:37:45 -07:00
lib [ARM] spelling fixes 2007-05-20 20:10:32 +01:00
mach-aaec2000 arch: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:14:49 -04:00
mach-at91 [ARM] 5052/1: export clock functions for the at91x40 2008-05-23 13:50:07 +01:00
mach-clps711x [ARM] Add initial sparsemem support 2008-04-19 11:36:48 +01:00
mach-clps7500 [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-davinci arm: use non-racy method for /proc/davinci_clocks creation 2008-04-29 08:06:21 -07:00
mach-ebsa110 [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-ep93xx [ARM] 5023/1: Fix broken gpio interrupts on ep93xx 2008-05-04 11:06:05 +01:00
mach-footbridge [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-h720x [ARM] replace remaining __FUNCTION__ occurrences 2008-03-06 12:18:18 +00:00
mach-imx [ARM] replace remaining __FUNCTION__ occurrences 2008-03-06 12:18:18 +00:00
mach-integrator [ARM] integrator: fix build warnings and errors 2008-05-23 19:35:52 +01:00
mach-iop13xx [ARM] replace remaining __FUNCTION__ occurrences 2008-03-06 12:18:18 +00:00
mach-iop32x i2c: Convert most new-style drivers to use module aliasing 2008-04-29 23:11:40 +02:00
mach-iop33x iop: unconditionally initialize the ATU on platforms known to be 'hosts' 2008-03-26 12:33:41 -07:00
mach-ixp4xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-30 08:45:48 -07:00
mach-ixp23xx [ARM] remove duplicate includes 2008-01-26 14:50:07 +00:00
mach-ixp2000 [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-ks8695 [ARM] 4981/1: [KS8695] Simple LED driver 2008-04-17 15:58:25 +01:00
mach-l7200
mach-lh7a40x [ARM] fix lh7a40x/kev7a400 build 2008-04-20 16:40:47 +01:00
mach-msm [ARM] msm: dma support for MSM7X00A 2008-01-26 14:39:14 +00:00
mach-mx3 [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-netx [ARM] replace remaining __FUNCTION__ occurrences 2008-03-06 12:18:18 +00:00
mach-ns9xxx Merge branch 'irq-fix' of git://www.modarm9.com/gitsrc/pub/people/ukleinek/linux-2.6.git 2008-05-07 21:55:01 +01:00
mach-omap1 ARM: OMAP: USB: Change omap USB code to use omap_read/write instead of __REG 2008-07-03 12:24:43 +03:00
mach-omap2 ARM: OMAP2: Clock: New OMAP2/3 DPLL rate rounding algorithm 2008-07-03 12:24:46 +03:00
mach-orion5x [ARM] 5037/1: Orion: fix DNS323/Kurobox Pro PCI initialisation 2008-05-17 22:55:15 +01:00
mach-pnx4008 arch: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:14:49 -04:00
mach-pxa [ARM] 5077/1: spi: fix list scan success verification in PXA ssp driver 2008-06-11 23:38:46 +01:00
mach-realview [ARM] 5131/1: Annotate platform_secondary_init with trace_hardirqs_off 2008-06-30 19:08:53 +01:00
mach-rpc Rename: linux/pata_platform.h to linux/ata_platform.h 2008-02-06 06:54:17 -05:00
mach-s3c2400
mach-s3c2410 [ARM] 5041/1: VR1000: Fix DM9000 IRQ flags initialisation 2008-05-22 14:10:37 +01:00
mach-s3c2412 [ARM] 4985/1: S3C2412: Fix ARMDIVN name in CLKDIVN definition. 2008-04-17 17:04:38 +01:00
mach-s3c2440 [ARM] 4986/1: S3C24XX: Simtec machines need UCLK as parent to DCLK 2008-04-17 17:04:40 +01:00
mach-s3c2442 [ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code 2008-01-28 13:20:52 +00:00
mach-s3c2443 Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
mach-sa1100 [ARM] 5025/2: fix collie cpu initialisation 2008-05-22 14:03:20 +01:00
mach-shark [ARM] Fix timer damage from d3d74453c3 2008-01-28 10:17:12 +00:00
mach-versatile arch: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:14:49 -04:00
mm [ARM] 5034/1: fix arm{925,926,940,946} dma_flush_range() in WT mode 2008-05-17 22:55:14 +01:00
nwfpe Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
oprofile [ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation 2008-04-28 17:03:34 +01:00
plat-iop iop: unconditionally initialize the ATU on platforms known to be 'hosts' 2008-03-26 12:33:41 -07:00
plat-mxc [ARM] 4887/1: i.MXC family: Separate current platform code 2008-04-17 16:15:17 +01:00
plat-omap ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap 2008-07-03 12:24:44 +03:00
plat-orion [ARM] 4954/1: Orion: fix some function section mismatch 2008-04-10 15:27:09 +01:00
plat-s3c [ARM] 4518/1: S3C: Rename watchdog configuration options 2007-07-22 16:44:38 +01:00
plat-s3c24xx [ARM] 5039/1: S3C244X: Rename SDI device if running on S3C244X. 2008-05-22 14:17:22 +01:00
tools [ARM] Update mach-types 2008-04-19 11:28:05 +01:00
vfp [ARM] 4583/1: ARMv7: Add VFPv3 support 2008-01-26 14:41:28 +00:00
Kconfig ARM: always select HAVE_IDE 2008-04-28 23:44:43 +02:00
Kconfig-nommu [ARM] 4532/1: allow configuration of processor ID 2007-10-12 23:43:02 +01:00
Kconfig.debug [ARM] CONFIG_DEBUG_STACK_USAGE 2008-01-26 14:50:06 +00:00
Makefile Merge branches 'arm', 'at91', 'ep93xx', 'iop', 'ks8695', 'misc', 'mxc', 'ns9x', 'orion', 'pxa', 'sa1100', 's3c' and 'sparsemem' into devel 2008-04-19 17:17:25 +01:00