From: Frank Oltmanns <frank@oltmanns.dev>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Andre Przywara <andre.przywara@arm.com>,
Roman Beranek <me@crly.cz>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 8/8] clk: sunxi-ng: a64: select closest rate for pll-video0
Date: Mon, 03 Jul 2023 11:28:59 +0200 [thread overview]
Message-ID: <878rbxs5r8.fsf@oltmanns.dev> (raw)
In-Reply-To: <lfcpuv5euy5w6e7jzn6fm2qusjj52w2hhn5sosqvoz54zc56py@5wh2eea3rrs3>
On 2023-07-03 at 09:50:05 +0200, Maxime Ripard <maxime@cerno.tech> wrote:
> [[PGP Signed Part:Undecided]]
> On Sun, Jul 02, 2023 at 07:55:27PM +0200, Frank Oltmanns wrote:
>> @@ -541,7 +542,7 @@ static const char * const tcon1_parents[] = { "pll-video0", "pll-video1" };
>> static const u8 tcon1_table[] = { 0, 2, };
>> static struct ccu_div tcon1_clk = {
>> .enable = BIT(31),
>> - .div = _SUNXI_CCU_DIV(0, 4),
>> + .div = _SUNXI_CCU_DIV_FLAGS(0, 4, CLK_DIVIDER_ROUND_CLOSEST),
>> .mux = _SUNXI_CCU_MUX_TABLE(24, 2, tcon1_table),
>> .common = {
>> .reg = 0x11c,
>> @@ -549,6 +550,7 @@ static struct ccu_div tcon1_clk = {
>> tcon1_parents,
>> &ccu_div_ops,
>> CLK_SET_RATE_PARENT),
>> + .features = CCU_FEATURE_CLOSEST_RATE,
>> },
>> };
>
> I'm not super comfortable with having to set it twice for dividers (or
> composite clocks). Could we set CLK_DIVIDER_ROUND_CLOSEST automatically
> if CCU_FEATURE_CLOSEST_RATE is set?
You're of course right. If I'm not mistaken, I can use
SUNXI_CCU_M_WITH_MUX_TABLE_GATE_CLOSEST that I introduced in div patch
(PATCH 7). Otherwise I'll create a similar macro for use with tcon1.
>
> I'm guessing we would need it for muxes as well?
>
Yes, it's already in the mux and div patches.
Best regards,
Frank
>
> Maxime
>
> [[End of PGP Signed Part]]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-03 10:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-02 17:55 [PATCH v3 0/8] clk: sunxi-ng: Consider alternative parent rates when determining NKM clock rate Frank Oltmanns
2023-07-02 17:55 ` [PATCH v3 1/8] clk: sunxi-ng: nkm: consider alternative parent rates when determining rate Frank Oltmanns
2023-07-03 6:47 ` Maxime Ripard
2023-07-03 8:02 ` Frank Oltmanns
2023-07-02 17:55 ` [PATCH v3 2/8] clk: sunxi-ng: a64: allow pll-mipi to set parent's rate Frank Oltmanns
2023-07-03 6:47 ` Maxime Ripard
2023-07-02 17:55 ` [PATCH v3 3/8] clk: sunxi-ng: Add feature to find closest rate Frank Oltmanns
2023-07-03 6:48 ` Maxime Ripard
2023-07-02 17:55 ` [PATCH v3 4/8] clk: sunxi-ng: nm: Support finding " Frank Oltmanns
2023-07-03 7:24 ` Maxime Ripard
2023-07-03 8:46 ` Frank Oltmanns
2023-07-02 17:55 ` [PATCH v3 5/8] clk: sunxi-ng: nkm: " Frank Oltmanns
2023-07-02 20:06 ` kernel test robot
2023-07-03 7:17 ` Frank Oltmanns
2023-07-03 7:25 ` Maxime Ripard
2023-07-03 8:59 ` Frank Oltmanns
2023-07-03 11:36 ` Maxime Ripard
2023-07-03 7:33 ` Maxime Ripard
2023-07-02 17:55 ` [PATCH v3 6/8] clk: sunxi-ng: mux: " Frank Oltmanns
2023-07-03 7:38 ` Maxime Ripard
2023-07-03 9:17 ` Frank Oltmanns
2023-07-03 11:37 ` Maxime Ripard
2023-07-02 17:55 ` [PATCH v3 7/8] clk: sunxi-ng: div: " Frank Oltmanns
2023-07-03 7:39 ` Maxime Ripard
2023-07-02 17:55 ` [PATCH v3 8/8] clk: sunxi-ng: a64: select closest rate for pll-video0 Frank Oltmanns
2023-07-03 7:50 ` Maxime Ripard
2023-07-03 9:28 ` Frank Oltmanns [this message]
2023-07-03 7:51 ` [PATCH v3 0/8] clk: sunxi-ng: Consider alternative parent rates when determining NKM clock rate Maxime Ripard
2023-07-03 9:36 ` Frank Oltmanns
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=878rbxs5r8.fsf@oltmanns.dev \
--to=frank@oltmanns.dev \
--cc=andre.przywara@arm.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=maxime@cerno.tech \
--cc=me@crly.cz \
--cc=mturquette@baylibre.com \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).