mirror of https://github.com/m-labs/artiq.git
libboard/serwb: retry serwb initialization on error
This commit is contained in:
parent
2e5b20d53d
commit
0eb9f93611
|
@ -4,7 +4,12 @@ pub fn wait_init() {
|
||||||
info!("waiting for AMC/RTM serwb bridge to be ready...");
|
info!("waiting for AMC/RTM serwb bridge to be ready...");
|
||||||
unsafe {
|
unsafe {
|
||||||
csr::serwb_phy_amc::control_reset_write(1);
|
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.");
|
info!("done.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue