rtio_clocking: remove unnecessary rtio_crg code

This commit is contained in:
mwojcik 2023-01-06 16:42:47 +08:00
parent e9d5c41c3d
commit b34f445e55
1 changed files with 2 additions and 21 deletions

View File

@ -68,30 +68,11 @@ fn get_rtio_clock_cfg(cfg: &Config) -> RtioClock {
fn init_rtio(timer: &mut GlobalTimer, _clk: RtioClock) {
#[cfg(has_rtio_crg_clock_sel)]
let clock_sel = match _clk {
RtioClock::Ext0_Bypass => {
info!("Using bypassed external clock");
1
},
RtioClock::Int_125 => {
info!("Using internal RTIO clock");
0
},
_ => {
warn!("rtio_clock setting '{:?}' is not supported. Using default internal RTIO clock instead", _clk);
0
}
};
unsafe {
pl::csr::rtio_crg::pll_reset_write(1);
#[cfg(has_rtio_crg_clock_sel)]
pl::csr::rtio_crg::clock_sel_write(clock_sel);
pl::csr::rtio_crg::pll_reset_write(0);
pl::csr::sys_crg::pll_reset_write(0);
}
timer.delay_ms(1);
let locked = unsafe { pl::csr::rtio_crg::pll_locked_read() != 0 };
let locked = unsafe { pl::csr::sys_crg::pll_locked_read() != 0 };
if locked {
info!("RTIO PLL locked");
} else {