Commit e1e3e700 authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Stephen Boyd

clk: at91: sckc: register slow_rc with accuracy option

Chapter 57.7.5 of SAM9X60 datasheet specifies that the maximum drift of
this oscillator is +- 3KHz. Use 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

Fixes: 04bcc427 ("clk: at91: sckc: add support for SAM9X60")
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/1595403506-8209-9-git-send-email-claudiu.beznea@microchip.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 172e7dde
...@@ -471,8 +471,9 @@ static void __init of_sam9x60_sckc_setup(struct device_node *np) ...@@ -471,8 +471,9 @@ static void __init of_sam9x60_sckc_setup(struct device_node *np)
if (!regbase) if (!regbase)
return; return;
slow_rc = clk_hw_register_fixed_rate(NULL, parent_names[0], NULL, 0, slow_rc = clk_hw_register_fixed_rate_with_accuracy(NULL, parent_names[0],
32768); NULL, 0, 32768,
93750000);
if (IS_ERR(slow_rc)) if (IS_ERR(slow_rc))
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment