mirror of https://github.com/m-labs/artiq.git
runtime: clear all DRTIO FIFOs first, reset remote PHYs on link init
This commit is contained in:
parent
8f747fa209
commit
6a60afcba0
|
@ -53,6 +53,13 @@ mod drtio {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn reset_phy() {
|
||||||
|
unsafe {
|
||||||
|
csr::drtio::reset_phy_write(1);
|
||||||
|
while csr::drtio::o_wait_read() == 1 {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn sync_tsc() {
|
fn sync_tsc() {
|
||||||
unsafe {
|
unsafe {
|
||||||
csr::drtio::set_time_write(1);
|
csr::drtio::set_time_write(1);
|
||||||
|
@ -94,9 +101,9 @@ mod drtio {
|
||||||
waiter.sleep(600).unwrap();
|
waiter.sleep(600).unwrap();
|
||||||
info!("wait for remote side done");
|
info!("wait for remote side done");
|
||||||
|
|
||||||
|
init(); // clear all FIFOs first
|
||||||
|
reset_phy();
|
||||||
sync_tsc();
|
sync_tsc();
|
||||||
info!("TSC synced");
|
|
||||||
init();
|
|
||||||
info!("link initialization completed");
|
info!("link initialization completed");
|
||||||
|
|
||||||
waiter.until(|| !link_is_up()).unwrap();
|
waiter.until(|| !link_is_up()).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue