From: Alexander Kochetkov <al.kochet@gmail.com>
To: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Heiko Stuebner <heiko@sntech.de>,
Elaine Zhang <zhangqing@rock-chips.com>,
Alexander Kochetkov <al.kochet@gmail.com>
Subject: [PATCH 0/2] Fix clock rate in the rockchip_fractional_approximation()
Date: Thu, 21 Dec 2017 19:04:40 +0300 [thread overview]
Message-ID: <1513872282-5370-1-git-send-email-al.kochet@gmail.com> (raw)
Hello!
Here are two patches fixing issue in the rockchip_fractional_approximation().
rockchip_fractional_approximation() can select clock rate whose
value will violate clock limit settings (i.e. one configured with
clk_set_max_rate() and clk_set_min_rate()).
rockchip_fractional_approximation() was introduced by commit 5d890c2df900
("clk: rockchip: add special approximation to fix up fractional clk's jitter")
whose description states that setting denominator 20 times larger than
numerator will generate precise clock frequency. It's strange, because
on my custom rk3188-based board and on radxa rock I've observed strange
hardware issues. I2S, for example, sometimes doesn't setup correct
rate on external SCLK_I2S0. UART0, for example, started to receive '\0'
characters instead of valid symbols, signals on UART_RX was good.
So, I use clk_set_max_rate() to limit max value of i2s0_pre, uart0_pre,
uart1_pre, uart2_pre, uart3_pre to value of aclk_cpu_pre. That fixes
strange I2S and UART issues for me. If that make sense, than I can
send the patch. But it will logically conflict with commit 5d890c2df900
("clk: rockchip: add special approximation to fix up fractional clk's jitter").
Alexander Kochetkov (2):
clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and
expose
clk: rockchip: limit clock rate in the
rockchip_fractional_approximation()
drivers/clk/clk.c | 14 ++++++++------
drivers/clk/rockchip/clk.c | 7 +++++++
include/linux/clk-provider.h | 2 ++
3 files changed, 17 insertions(+), 6 deletions(-)
--
1.7.9.5
next reply other threads:[~2017-12-21 16:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 16:04 Alexander Kochetkov [this message]
2017-12-21 16:04 ` [PATCH 1/2] clk: rename clk_core_get_boundaries() to clk_hw_get_boundaries() and expose Alexander Kochetkov
2017-12-21 20:07 ` Stephen Boyd
2017-12-25 9:38 ` Alexander Kochetkov
2017-12-27 1:06 ` Stephen Boyd
2017-12-28 12:41 ` Alexander Kochetkov
2017-12-29 0:14 ` Stephen Boyd
2017-12-29 8:52 ` Alexander Kochetkov
2017-12-21 16:04 ` [PATCH 2/2] clk: rockchip: limit clock rate in the rockchip_fractional_approximation() Alexander Kochetkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513872282-5370-1-git-send-email-al.kochet@gmail.com \
--to=al.kochet@gmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=zhangqing@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome