diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-11-14 15:32:09 +0000 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2014-12-10 17:14:23 +0000 |
commit | 8dfb43e45841bcaa0958fd6e89741b13b7f6a48b (patch) | |
tree | 61858651c2deffa2d9ae1b9af57a6a2887b1ca88 /include/linux/asn1_decoder.h | |
parent | e86cbb20d911e27a33c05a205b84f3e15cb18929 (diff) | |
download | linux-stable-8dfb43e45841bcaa0958fd6e89741b13b7f6a48b.tar.gz linux-stable-8dfb43e45841bcaa0958fd6e89741b13b7f6a48b.tar.bz2 linux-stable-8dfb43e45841bcaa0958fd6e89741b13b7f6a48b.zip |
clk-divider: Fix READ_ONLY when divider > 1
commit e6d5e7d90be92cee626d7ec16ca9b06f1eed710b upstream.
Commit 79c6ab509558 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in
v3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the
recalc_rate() and round_rate() clock callbacks to be omitted.
However using this flag has the unfortunate side effect of causing the
clock recalculation code when a clock rate change is attempted to always
treat it as a pass-through clock, i.e. with a fixed divide of 1, which
may not be the case. Child clock rates are then recalculated using the
wrong parent rate.
Therefore instead of dropping the recalc_rate() and round_rate()
callbacks, alter clk_divider_bestdiv() to always report the current
divider as the best divider so that it is never altered.
For me the read only clock was the system clock, which divided the PLL
rate by 2, from which both the UART and the SPI clocks were divided.
Initial setting of the UART rate set it correctly, but when the SPI
clock was set, the other child clocks were miscalculated. The UART clock
was recalculated using the PLL rate as the parent rate, resulting in a
UART new_rate of double what it should be, and a UART which spewed forth
garbage when the rate changes were propagated.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Max Schwarz <max.schwarz@online.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
[ luis: backported to 3.16:
- drop changes to drivers/clk/rockchip/clk.c ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/linux/asn1_decoder.h')
0 files changed, 0 insertions, 0 deletions