rp/clocks: always reconfigure pll

this is only really useful for runtime *re*configuration, which we don't
currently support. even runtime reconfig probably won't need it, unless
we keep taking the sledgehammer approach of reconfiguring everything all
the time.
This commit is contained in:
pennae 2023-05-13 18:45:40 +02:00
parent e1e87fef25
commit 2f2860b096

View file

@ -587,18 +587,6 @@ unsafe fn configure_pll(p: pac::pll::Pll, input_freq: u32, config: PllConfig) {
assert!(config.post_div2 <= config.post_div1); assert!(config.post_div2 <= config.post_div1);
assert!(ref_freq <= (config.vco_freq / 16)); assert!(ref_freq <= (config.vco_freq / 16));
// do not disrupt PLL that is already correctly configured and operating
let cs = p.cs().read();
let prim = p.prim().read();
if cs.lock()
&& cs.refdiv() == config.refdiv as u8
&& p.fbdiv_int().read().fbdiv_int() == fbdiv as u16
&& prim.postdiv1() == config.post_div1
&& prim.postdiv2() == config.post_div2
{
return;
}
// Reset it // Reset it
let mut peris = reset::Peripherals(0); let mut peris = reset::Peripherals(0);
match p { match p {