2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

libboard/serwb: retry serwb initialization on error

This commit is contained in:
Florent Kermarrec 2017-12-01 22:45:05 +01:00
parent 2e5b20d53d
commit 0eb9f93611

View File

@ -4,7 +4,12 @@ pub fn wait_init() {
info!("waiting for AMC/RTM serwb bridge to be ready...");
unsafe {
csr::serwb_phy_amc::control_reset_write(1);
while csr::serwb_phy_amc::control_ready_read() == 0 {}
while csr::serwb_phy_amc::control_ready_read() == 0 {
if csr::serwb_phy_amc::control_error_read() == 1 {
info!("retry serwb initialization...");
csr::serwb_phy_amc::control_reset_write(1);
}
}
}
info!("done.");