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]
Date:   Wed, 15 Jul 2020 15:39:33 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <mturquette@...libre.com>, <sboyd@...nel.org>,
        <Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
        <Ludovic.Desroches@...rochip.com>
CC:     <bbrezillon@...nel.org>, <linux-kernel@...r.kernel.org>,
        <linux-clk@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 09/19] clk: at91: sckc: register slow_rc with accuracy
 option



On 15.07.2020 14:24, Claudiu Beznea wrote:
> Register slow rc with accuracy option.
> 
> Fixes: 04bcc4275e601 ("clk: at91: sckc: add support for SAM9X60")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
> ---
>  drivers/clk/at91/sckc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
> index 15dc4cd86d76..2d65770d8665 100644
> --- a/drivers/clk/at91/sckc.c
> +++ b/drivers/clk/at91/sckc.c
> @@ -471,8 +471,9 @@ static void __init of_sam9x60_sckc_setup(struct device_node *np)
>  	if (!regbase)
>  		return;
>  
> -	slow_rc = clk_hw_register_fixed_rate(NULL, parent_names[0], NULL, 0,
> -					     32768);
> +	slow_rc = clk_hw_register_fixed_rate_with_accuracy(NULL, parent_names[0],
> +							   NULL, 0, 32768,
> +							   93750000);

I forgot to mention in commit message (I'll do it in v2 once I'll
gather more comments on this series):

Chapter 57.7.5 of SAM9X60 datasheet specifies that the maximum drift of
this oscillator is +- 3KHz. I used that value and the formula at [1]
or the calculator at [2] to compute the PPB value.

[1] https://www.everythingrf.com/rf-calculators/ppm-to-hz-calculator
[2] https://www.changpuak.ch/electronics/ppm_to_Hz_converter.php


Thank you,
Claudiu Beznea

>  	if (IS_ERR(slow_rc))
>  		return;
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ