aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/generic.h
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2011-04-04 10:06:12 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-04-12 03:48:02 -0400
commitf61b9fc27e5b61dbc330696f040cc66ba1dbcbaa (patch)
tree96ed9c645dd14f70548601c9717875d651bb27df /arch/arm/mach-pxa/generic.h
parent32a90b6e65792260d6212ac52e8f5be140b6f5be (diff)
ARM: mxs/clock-mx28: fix up name##_set_rate
For the lcdif clock get_rate looks as follows: read div from HW_CLKCTRL_DIS_LCDIF.DIV return clk_get_rate(clk->parent) / div with clk->parent being ref_pix_clk on my system. ref_pix_clk's rate depends on HW_CLKCTRL_FRAC1.PIXFRAC. The set_rate function for lcdif does: parent_rate = clk_get_rate(clk->parent); based on that calculate frac and div such that parent_rate * 18 / frac / div is near the requested rate. HW_CLKCTRL_FRAC1.PIXFRAC is updated with frac HW_CLKCTRL_DIS_LCDIF.DIV is updated with div For this calculation to be correct parent_rate needs to be initialized not with the clock rate of lcdif's parent (i.e. ref_pix) but that of its grandparent (i.e. ref_pix' parent == pll0_clk). The obvious downside of this patch is that now set_rate(lcdif) changes its parent's rate, too. Still this is better than a wrong rate. Acked-by: Shawn Guo <shawn.guo@freescale.com> LAKML-Reference: 20110225084950.GA13684@S2101-09.ap.freescale.net Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-pxa/generic.h')
0 files changed, 0 insertions, 0 deletions