From: Leo Liang <ycliang@andestech.com>
To: Yao Zi <ziyao@disroot.org>
Cc: Tom Rini <trini@konsulko.com>, Rick Chen <rick@andestech.com>,
Wei Fu <wefu@redhat.com>, Yixun Lan <dlan@gentoo.org>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Maksim Kiselev <bigunclemax@gmail.com>,
Jaehoon Chung <jh80.chung@samsung.com>, <u-boot@lists.denx.de>,
Han Gao <rabenda.cn@gmail.com>, Han Gao <gaohan@iscas.ac.cn>
Subject: Re: [PATCH 1/5] clk: thead: th1520-ap: Correctly handle flags for dividers
Date: Thu, 17 Jul 2025 13:44:01 +0800 [thread overview]
Message-ID: <aHiNoV_zR0rw98PX@swlinux02> (raw)
In-Reply-To: <20250710034201.39901-2-ziyao@disroot.org>
On Thu, Jul 10, 2025 at 03:41:57AM +0000, Yao Zi wrote:
> Unlike the gate clocks which make no use of flags, most dividers in
> TH1520 SoC are one-based, thus are applied with CLK_DIVIDER_ONE_BASED
> flag. We couldn't simply ignore the flag, which causes wrong results
> when calculating the clock rates.
>
> Add a member to ccu_div_internal for defining the flags, and pass it to
> divider_recalc_rate(). With this fix, frequency of all the clocks match
> the Linux kernel's calculation.
>
> Fixes: e6bfa6fc94f ("clk: thead: Port clock controller driver of TH1520 SoC")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
> drivers/clk/thead/clk-th1520-ap.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
next prev parent reply other threads:[~2025-07-17 5:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 3:41 [PATCH 0/5] Add support for TH1520-integrated GMACs Yao Zi
2025-07-10 3:41 ` [PATCH 1/5] clk: thead: th1520-ap: Correctly handle flags for dividers Yao Zi
2025-07-17 5:44 ` Leo Liang [this message]
2025-07-10 3:41 ` [PATCH 2/5] riscv: cpu: th1520: Limit upper RAM boundary to 4 GiB Yao Zi
2025-07-17 5:51 ` Leo Liang
2025-07-10 3:41 ` [PATCH 3/5] drivers: net: Add T-Head DWMAC glue layer Yao Zi
2025-07-17 5:52 ` Leo Liang
2025-07-10 3:42 ` [PATCH 4/5] riscv: dts: th1520: Describe GMACs and enable them on Lichee Pi 4A Yao Zi
2025-07-17 5:53 ` Leo Liang
2025-07-10 3:42 ` [PATCH 5/5] configs: th1520_lpi4a: Enable network support Yao Zi
2025-07-17 5:55 ` Leo Liang
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=aHiNoV_zR0rw98PX@swlinux02 \
--to=ycliang@andestech.com \
--cc=bigunclemax@gmail.com \
--cc=dlan@gentoo.org \
--cc=gaohan@iscas.ac.cn \
--cc=jh80.chung@samsung.com \
--cc=joe.hershberger@ni.com \
--cc=lukma@denx.de \
--cc=rabenda.cn@gmail.com \
--cc=rfried.dev@gmail.com \
--cc=rick@andestech.com \
--cc=seanga2@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=wefu@redhat.com \
--cc=ziyao@disroot.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.