diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2020-07-22 10:38:16 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2020-07-24 02:19:08 -0700 |
commit | e1e3e7008a90f9ffe0161191bd64a4c06f0d417a (patch) | |
tree | ad728eec0af36d6186a1388ffc17ffd4f1e4d701 | |
parent | 172e7ddeeafd95caa809b7b1a140bfd7f20597d9 (diff) |
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: 04bcc4275e601 ("clk: at91: sckc: add support for SAM9X60")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/1595403506-8209-9-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | drivers/clk/at91/sckc.c | 5 |
1 files 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); if (IS_ERR(slow_rc)) return; |