From df2f0ead4aea64c227cbe882b2d6069c618b1be5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 14 Dec 2017 12:34:30 +0800 Subject: [PATCH] runtime: no startup_clock config is not an error --- artiq/firmware/runtime/rtio_mgt.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/artiq/firmware/runtime/rtio_mgt.rs b/artiq/firmware/runtime/rtio_mgt.rs index e7578d92c..9fd924936 100644 --- a/artiq/firmware/runtime/rtio_mgt.rs +++ b/artiq/firmware/runtime/rtio_mgt.rs @@ -219,16 +219,25 @@ pub fn startup(io: &Io) { let clk = config::read("startup_clock", |result| { match result { - Ok(b"i") => RtioClock::Internal, - Ok(b"e") => RtioClock::External, - _ => { - error!("unrecognized startup_clock configuration entry"); + Ok(b"i") => { + info!("using internal startup RTIO clock"); + RtioClock::Internal + }, + Ok(b"e") => { + info!("using external startup RTIO clock"); + RtioClock::External + }, + Err(()) => { + info!("using internal startup RTIO clock (by default)"); + RtioClock::Internal + }, + Ok(_) => { + error!("unrecognized startup_clock configuration entry, using internal RTIO clock"); RtioClock::Internal } } }); - info!("startup RTIO clock: {:?}", clk); if !crg::switch_clock(clk as u8) { error!("startup RTIO clock failed"); warn!("this may cause the system initialization to fail");