rp/clocks: remove superfluous clock actions

the rtc doesn't have to be disabled since it's always clocked from ref,
and the watchdog doesn't need to be configured twice.
This commit is contained in:
pennae 2023-05-17 03:21:07 +02:00
parent 053d5629ba
commit 1e029a9e66

View File

@ -351,11 +351,6 @@ pub(crate) unsafe fn init(config: ClockConfig) {
let (xosc_freq, pll_sys_freq, pll_usb_freq) = match config.xosc { let (xosc_freq, pll_sys_freq, pll_usb_freq) = match config.xosc {
Some(config) => { Some(config) => {
pac::WATCHDOG.tick().write(|w| {
w.set_cycles((config.hz / 1_000_000) as u16);
w.set_enable(true);
});
// start XOSC // start XOSC
// datasheet mentions support for clock inputs into XIN, but doesn't go into // datasheet mentions support for clock inputs into XIN, but doesn't go into
// how this is achieved. pico-sdk doesn't support this at all. // how this is achieved. pico-sdk doesn't support this at all.
@ -510,9 +505,6 @@ pub(crate) unsafe fn init(config: ClockConfig) {
} }
if let Some(conf) = config.rtc_clk { if let Some(conf) = config.rtc_clk {
c.clk_rtc_ctrl().modify(|w| {
w.set_enable(false);
});
c.clk_rtc_div().write(|w| { c.clk_rtc_div().write(|w| {
w.set_int(conf.div_int); w.set_int(conf.div_int);
w.set_frac(conf.div_frac); w.set_frac(conf.div_frac);