linux/drivers/clk
Shawn Guo 081c9025f4 clk: divider: do not propagate rate change request when unnecessary
If the current rate of parent clock is sufficient to provide child a
requested rate with a proper divider setting, the rate change request
should not be propagated.  Instead, changing the divider setting is good
enough to get child clock run at the requested rate.

On an imx6q clock configuration illustrated below,

  ahb --> ipg --> ipg_per
  132M    66M     66M

calling clk_set_rate(ipg_per, 22M) with the current
clk_divider_bestdiv() implementation will result in the rate change up
to ahb level like the following, because of the unnecessary/incorrect
rate change propagation.

  ahb --> ipg --> ipg_per
  66M     22M     22M

Fix the problem by trying to see if the requested rate can be achieved
by simply changing the divider value, and in that case return the
divider immediately from function clk_divider_bestdiv() as the best
one, so that all those unnecessary rate change propagation can be saved.

Reported-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2013-06-10 15:20:48 -07:00
..
mmp ARM: pxa: remove cpu_is_xxx in gpio driver 2013-04-11 09:59:23 +08:00
mvebu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
mxs Merge branch 'depends/clk-for-3.10' into next/cleanup 2013-04-11 03:38:03 -07:00
samsung clk: exynos5250: Add sclk_mpll to the parent list of mout_cpu clock 2013-05-29 15:39:28 -07:00
socfpga ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries 2013-04-14 20:18:13 -07:00
spear ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
sunxi clk: sunxi: "cpu_data" is defined in header files of some architectures 2013-05-29 15:48:23 -07:00
tegra clk: tegra114: Fix msenc clock register 2013-06-04 23:52:53 -07:00
ux500 clk: ux500: Clocks definition for u8540 2013-06-06 18:17:25 -07:00
versatile clk: vexpress: Add separate SP810 driver 2013-04-18 11:41:10 -07:00
x86 ACPI / LPSS: register clock device for Lynxpoint DMA properly 2013-05-14 10:23:58 +05:30
clk-axi-clkgen.c clk: Add axi-clkgen driver 2013-03-19 17:20:30 -07:00
clk-bcm2835.c clk: bcm2835: probe for fixed-clock in device tree 2013-01-14 21:46:59 -07:00
clk-composite.c clk: composite: allow fixed rates & fixed dividers 2013-04-12 11:23:24 -07:00
clk-devres.c ARM: 7537/1: clk: Fix release in devm_clk_put() 2012-09-19 21:51:27 +01:00
clk-divider.c clk: divider: do not propagate rate change request when unnecessary 2013-06-10 15:20:48 -07:00
clk-fixed-factor.c clk: add device tree fixed-factor-clock binding support 2013-04-12 10:52:23 -07:00
clk-fixed-rate.c clk: add common of_clk_init() function 2013-01-24 11:09:28 -08:00
clk-gate.c clk: Add CLK_IS_BASIC flag to identify basic clocks 2012-07-11 15:36:43 -07:00
clk-highbank.c ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
clk-ls1x.c clk: add Loongson1B clock support 2012-08-31 11:05:18 -07:00
clk-max77686.c clk: max77686: Avoid double free at remove time 2013-01-15 16:16:26 -08:00
clk-mux.c clk: add table lookup to mux 2013-03-22 15:18:18 -07:00
clk-nomadik.c ARM: nomadik: switch over to using the FSMC driver 2012-11-15 15:37:47 +02:00
clk-nspire.c clk: Add TI-Nspire clock drivers 2013-05-31 12:07:45 -07:00
clk-ppc-corenet.c clk: mpc85xx: Update the compatible string 2013-05-30 11:55:35 -07:00
clk-prima2.c clk: prima2: fix return value check in sirfsoc_of_clk_init() 2013-03-22 15:16:31 -07:00
clk-si5351.c clk: si5351: declare all device IDs for module loading 2013-05-28 22:50:32 -07:00
clk-si5351.h clk: si5351: Allow user to define disabled state for every clock output 2013-05-28 22:50:31 -07:00
clk-twl6040.c clk: use platform_{get,set}_drvdata() 2013-05-30 18:19:34 -07:00
clk-u300.c ARM: u300: convert to common clock 2012-07-11 15:36:45 -07:00
clk-vt8500.c clk: vt8500: Remove unnecessary divisor adjustment in vtwm_dclk_set_rate() 2013-05-29 14:47:17 -07:00
clk-wm831x.c clk: use platform_{get,set}_drvdata() 2013-05-30 18:19:34 -07:00
clk-zynq.c clk: zynq: Add missing zynq clk header 2013-03-27 08:44:07 -07:00
clk.c clk: Disable unused clocks after deferred probing is done 2013-05-29 00:52:20 -07:00
clkdev.c ARM: 7534/1: clk: Make the managed clk functions generically available 2012-09-15 21:55:27 +01:00
Kconfig clk: si5351: Allow to build without CONFIG_OF 2013-05-28 22:53:22 -07:00
Makefile clk: Add TI-Nspire clock drivers 2013-05-31 12:07:45 -07:00