From b34f445e553cc61e45340f0c34ebd7c57420197a Mon Sep 17 00:00:00 2001 From: mwojcik Date: Fri, 6 Jan 2023 16:42:47 +0800 Subject: [PATCH] rtio_clocking: remove unnecessary rtio_crg code --- src/runtime/src/rtio_clocking.rs | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/runtime/src/rtio_clocking.rs b/src/runtime/src/rtio_clocking.rs index de0f472..ffe513d 100644 --- a/src/runtime/src/rtio_clocking.rs +++ b/src/runtime/src/rtio_clocking.rs @@ -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 {