1
0
Fork 0

rtio_clocking: remove loop

This commit is contained in:
mwojcik 2022-04-12 13:33:52 +08:00
parent b974d7ddee
commit 78bc162749
1 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,4 @@
use log::{info, warn}; use log::{info, warn, error};
use libboard_zynq::timer::GlobalTimer; use libboard_zynq::timer::GlobalTimer;
use embedded_hal::blocking::delay::DelayMs; use embedded_hal::blocking::delay::DelayMs;
use libconfig::Config; use libconfig::Config;
@ -84,7 +84,6 @@ fn init_rtio(timer: &mut GlobalTimer, _clk: RtioClock) {
} }
}; };
loop {
unsafe { unsafe {
pl::csr::rtio_crg::pll_reset_write(1); pl::csr::rtio_crg::pll_reset_write(1);
#[cfg(has_rtio_crg_clock_sel)] #[cfg(has_rtio_crg_clock_sel)]
@ -95,11 +94,8 @@ fn init_rtio(timer: &mut GlobalTimer, _clk: RtioClock) {
let locked = unsafe { pl::csr::rtio_crg::pll_locked_read() != 0 }; let locked = unsafe { pl::csr::rtio_crg::pll_locked_read() != 0 };
if locked { if locked {
info!("RTIO PLL locked"); info!("RTIO PLL locked");
break;
} else { } else {
warn!("RTIO PLL failed to lock, retrying..."); error!("RTIO PLL failed to lock");
timer.delay_ms(500);
}
} }
unsafe { unsafe {