From fb0ade77a90b0731d4e57d1e3bf771010c9e6327 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 10 Apr 2020 17:23:17 +0800 Subject: [PATCH] firmware: fix non-DRTIO build --- artiq/firmware/runtime/rtio_clocking.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/artiq/firmware/runtime/rtio_clocking.rs b/artiq/firmware/runtime/rtio_clocking.rs index 9a36326f4..0a41ab8d0 100644 --- a/artiq/firmware/runtime/rtio_clocking.rs +++ b/artiq/firmware/runtime/rtio_clocking.rs @@ -158,12 +158,14 @@ pub fn init() { } #[cfg(has_drtio)] - unsafe { - csr::drtio_transceiver::stable_clkin_write(1); - } - clock::spin_us(1500); // wait for CPLL/QPLL lock - unsafe { - csr::drtio_transceiver::txenable_write(0xffffffffu32 as _); + { + unsafe { + csr::drtio_transceiver::stable_clkin_write(1); + } + clock::spin_us(1500); // wait for CPLL/QPLL lock + unsafe { + csr::drtio_transceiver::txenable_write(0xffffffffu32 as _); + } } #[cfg(has_rtio_crg)]