From 416232cb6407905d8e02d847c1796c8f6f252b1b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 28 Mar 2018 10:51:07 +0800 Subject: [PATCH] runtime: do not reset RTIO PHY on core.reset(). Closes #971 --- artiq/firmware/runtime/kern_hwreq.rs | 2 +- artiq/firmware/runtime/rtio_mgt.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/artiq/firmware/runtime/kern_hwreq.rs b/artiq/firmware/runtime/kern_hwreq.rs index b3f77f567..87ebd665e 100644 --- a/artiq/firmware/runtime/kern_hwreq.rs +++ b/artiq/firmware/runtime/kern_hwreq.rs @@ -296,7 +296,7 @@ pub fn process_kern_hwreq(io: &Io, request: &kern::Message) -> io::Result #[cfg(has_rtio_core)] &kern::RtioInitRequest => { info!("resetting RTIO"); - rtio_mgt::init_core(); + rtio_mgt::init_core(false); kern_acknowledge() } diff --git a/artiq/firmware/runtime/rtio_mgt.rs b/artiq/firmware/runtime/rtio_mgt.rs index 675d91a1a..d2c926b5d 100644 --- a/artiq/firmware/runtime/rtio_mgt.rs +++ b/artiq/firmware/runtime/rtio_mgt.rs @@ -264,14 +264,16 @@ pub fn startup(io: &Io) { } drtio::startup(io); - init_core(); + init_core(true); io.spawn(4096, async_error_thread); } -pub fn init_core() { +pub fn init_core(phy: bool) { unsafe { csr::rtio_core::reset_write(1); - csr::rtio_core::reset_phy_write(1); + if phy { + csr::rtio_core::reset_phy_write(1); + } } drtio::init() }