lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878rbxs5r8.fsf@oltmanns.dev>
Date:   Mon, 03 Jul 2023 11:28:59 +0200
From:   Frank Oltmanns <frank@...manns.dev>
To:     Maxime Ripard <maxime@...no.tech>
Cc:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Samuel Holland <samuel@...lland.org>,
        Andre Przywara <andre.przywara@....com>,
        Roman Beranek <me@...y.cz>, linux-clk@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 8/8] clk: sunxi-ng: a64: select closest rate for
 pll-video0


On 2023-07-03 at 09:50:05 +0200, Maxime Ripard <maxime@...no.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]]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ