linux_old1/arch/arm/mach-mxs
Uwe Kleine-König f61b9fc27e 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>
2011-04-12 09:48:02 +02:00
..
devices ARM: mxs: dynamically allocate mmc device 2011-03-25 08:36:55 +01:00
include/mach ARM: mxs: dynamically allocate mmc device 2011-03-25 08:36:55 +01:00
Kconfig ARM: mxs/mx28evk: add mmc device 2011-03-25 13:33:28 +01:00
Makefile ARM: mxs: Initial support for Ka-Ro TX28 2011-03-07 19:29:07 +01:00
Makefile.boot ARM: mxs: Add build configuration for mxs 2010-12-20 17:30:44 +01:00
clock-mx23.c ARM: mxs: dynamically allocate mmc device 2011-03-25 08:36:55 +01:00
clock-mx28.c ARM: mxs/clock-mx28: fix up name##_set_rate 2011-04-12 09:48:02 +02:00
clock.c ARM i.MX23/28: remove secondary field from struct clk. It's unused 2011-01-24 09:01:48 +01:00
devices-mx23.h ARM: mxs: dynamically allocate mmc device 2011-03-25 08:36:55 +01:00
devices-mx28.h ARM: mxs: dynamically allocate mmc device 2011-03-25 08:36:55 +01:00
devices.c ARM: mxs: free dma_mask in error path 2011-03-01 14:19:55 +01:00
gpio.c arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
gpio.h ARM: mxs: Add gpio support 2010-12-20 17:29:51 +01:00
icoll.c arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
iomux.c ARM: mxs: Add iomux support 2010-12-20 17:29:58 +01:00
mach-mx23evk.c ARM: mxs/mx23evk: add mmc device 2011-03-25 13:31:50 +01:00
mach-mx28evk.c ARM: mxs/mx28evk: add mmc device 2011-03-25 13:33:28 +01:00
mach-tx28.c arm: mxs: tx28: add i2c bus and connected RTC 2011-03-07 19:29:18 +01:00
mm-mx23.c ARM: mxs: Add static memory mapping 2010-12-20 17:30:23 +01:00
mm-mx28.c ARM: mxs: Add static memory mapping 2010-12-20 17:30:23 +01:00
module-tx28.c ARM: mxs: configure and register the second FEC device on TX28/STK5-V4 2011-03-23 15:08:14 +01:00
module-tx28.h ARM: mxs: configure and register the second FEC device on TX28/STK5-V4 2011-03-23 15:08:14 +01:00
ocotp.c ARM: mxs: add ocotp read function 2011-01-21 11:36:49 +01:00
pm.c ARM: mxs: add initial pm support 2011-01-26 08:30:49 +01:00
regs-clkctrl-mx23.h ARM i.MX23: remove reserved register defines 2011-01-28 08:28:52 +01:00
regs-clkctrl-mx28.h ARM i.MX28: remove reserved register defines 2011-01-28 08:28:57 +01:00
system.c ARM: mxs: Add missing EXPORT_SYMBOL for mxs_reset_block 2011-03-07 19:29:06 +01:00
timer.c ARM: mxs: Add timer support 2010-12-20 17:29:50 +01:00