88b8ba9057
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> |
||
---|---|---|
.. | ||
arch-aaec2000 | ||
arch-at91 | ||
arch-cl7500 | ||
arch-clps711x | ||
arch-davinci | ||
arch-ebsa110 | ||
arch-ebsa285 | ||
arch-ep93xx | ||
arch-h720x | ||
arch-imx | ||
arch-integrator | ||
arch-iop13xx | ||
arch-iop32x | ||
arch-iop33x | ||
arch-ixp4xx | ||
arch-ixp23xx | ||
arch-ixp2000 | ||
arch-ks8695 | ||
arch-l7200 | ||
arch-lh7a40x | ||
arch-msm | ||
arch-mxc | ||
arch-netx | ||
arch-ns9xxx | ||
arch-omap | ||
arch-orion5x | ||
arch-pnx4008 | ||
arch-pxa | ||
arch-realview | ||
arch-rpc | ||
arch-s3c2400 | ||
arch-s3c2410 | ||
arch-sa1100 | ||
arch-shark | ||
arch-versatile | ||
hardware | ||
mach | ||
plat-orion | ||
plat-s3c | ||
plat-s3c24xx | ||
.gitignore | ||
a.out-core.h | ||
a.out.h | ||
assembler.h | ||
atomic.h | ||
auxvec.h | ||
bitops.h | ||
bug.h | ||
bugs.h | ||
byteorder.h | ||
cache.h | ||
cacheflush.h | ||
checksum.h | ||
cnt32_to_63.h | ||
cpu-multi32.h | ||
cpu-single.h | ||
cpu.h | ||
cputime.h | ||
current.h | ||
delay.h | ||
device.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
domain.h | ||
dyntick.h | ||
ecard.h | ||
elf.h | ||
emergency-restart.h | ||
errno.h | ||
fb.h | ||
fcntl.h | ||
fiq.h | ||
flat.h | ||
floppy.h | ||
fpstate.h | ||
futex.h | ||
glue.h | ||
gpio.h | ||
hardirq.h | ||
hardware.h | ||
hw_irq.h | ||
hwcap.h | ||
ide.h | ||
io.h | ||
ioctl.h | ||
ioctls.h | ||
ipcbuf.h | ||
irq_regs.h | ||
irq.h | ||
irqflags.h | ||
Kbuild | ||
kdebug.h | ||
kexec.h | ||
kmap_types.h | ||
kprobes.h | ||
kvm.h | ||
leds.h | ||
limits.h | ||
linkage.h | ||
local.h | ||
locks.h | ||
mc146818rtc.h | ||
memory.h | ||
mman.h | ||
mmu_context.h | ||
mmu.h | ||
mmzone.h | ||
module.h | ||
msgbuf.h | ||
mtd-xip.h | ||
mutex.h | ||
namei.h | ||
nwflash.h | ||
page-nommu.h | ||
page.h | ||
param.h | ||
parport.h | ||
pci.h | ||
percpu.h | ||
pgalloc.h | ||
pgtable-hwdef.h | ||
pgtable-nommu.h | ||
pgtable.h | ||
poll.h | ||
posix_types.h | ||
proc-fns.h | ||
processor.h | ||
procinfo.h | ||
ptrace.h | ||
resource.h | ||
rtc.h | ||
scatterlist.h | ||
sections.h | ||
segment.h | ||
semaphore.h | ||
sembuf.h | ||
serial.h | ||
setup.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext.h | ||
siginfo.h | ||
signal.h | ||
sizes.h | ||
smp.h | ||
socket.h | ||
sockios.h | ||
sparsemem.h | ||
spinlock_types.h | ||
spinlock.h | ||
stat.h | ||
statfs.h | ||
string.h | ||
suspend.h | ||
system.h | ||
termbits.h | ||
termios.h | ||
therm.h | ||
thread_info.h | ||
thread_notify.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
traps.h | ||
types.h | ||
uaccess.h | ||
ucontext.h | ||
unaligned.h | ||
unistd.h | ||
user.h | ||
vfp.h | ||
vfpmacros.h | ||
vga.h | ||
xor.h |