runtime: do not reset RTIO PHY on core.reset(). Closes #971

This commit is contained in:
Sebastien Bourdeauducq 2018-03-28 10:51:07 +08:00
parent 5ca59467fd
commit 416232cb64
2 changed files with 6 additions and 4 deletions

View File

@ -296,7 +296,7 @@ pub fn process_kern_hwreq(io: &Io, request: &kern::Message) -> io::Result<bool>
#[cfg(has_rtio_core)] #[cfg(has_rtio_core)]
&kern::RtioInitRequest => { &kern::RtioInitRequest => {
info!("resetting RTIO"); info!("resetting RTIO");
rtio_mgt::init_core(); rtio_mgt::init_core(false);
kern_acknowledge() kern_acknowledge()
} }

View File

@ -264,15 +264,17 @@ pub fn startup(io: &Io) {
} }
drtio::startup(io); drtio::startup(io);
init_core(); init_core(true);
io.spawn(4096, async_error_thread); io.spawn(4096, async_error_thread);
} }
pub fn init_core() { pub fn init_core(phy: bool) {
unsafe { unsafe {
csr::rtio_core::reset_write(1); csr::rtio_core::reset_write(1);
if phy {
csr::rtio_core::reset_phy_write(1); csr::rtio_core::reset_phy_write(1);
} }
}
drtio::init() drtio::init()
} }