powerpc/mpc512x: improve DIU related clock setup
authorGerhard Sittig <gsi@denx.de>
Sat, 30 Nov 2013 22:51:36 +0000 (23:51 +0100)
committerAnatolij Gustschin <agust@denx.de>
Sun, 12 Jan 2014 17:53:06 +0000 (18:53 +0100)
commitba2181271fc9e1ab0873299264fe7edd6e256c56
treefb2cc03ba7224de398589c3919e5f4d4e69e5f0b
parent7b19f3bcefd0eba677e5cb3e5c88de38cd5c95c8
powerpc/mpc512x: improve DIU related clock setup

adapt the DIU clock initialization to the COMMON_CLK approach:
device tree based clock lookup, prepare and unprepare for clocks,
work with frequencies not dividers, call the appropriate clk_*()
routines and don't access CCM registers

the "best clock" determination now completely relies on the
platform's clock driver to pick a frequency close to what the
caller requests, and merely checks whether the desired frequency
was met (fits the tolerance of the monitor)

this approach shall succeed upon first try in the usual case,
will test a few less desirable yet acceptable frequencies in
edge cases, and will fallback to "best effort" if none of the
previously tried frequencies pass the test

provide a fallback clock lookup approach in case the OF based clock
lookup for the DIU fails, this allows for successful operation in
the presence of an outdated device tree which lacks clock specs

Cc: Anatolij Gustschin <agust@denx.de>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Gerhard Sittig <gsi@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/powerpc/platforms/512x/mpc512x_shared.c
This page took 0.024249 seconds and 5 git commands to generate.