From 5e916f588e8e95278f8329cf306f69d83f79a8c5 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Mon, 6 Sep 2021 10:44:25 +0200 Subject: [PATCH] libboard_zynq: * pca9548 selection for si5234 * added proper support for targets satman: * removed unnecessary messages * added libboard_zynq to targets in cargo.toml --- src/libboard_artiq/Cargo.toml | 4 ++++ src/libboard_artiq/src/si5324.rs | 4 ++++ src/satman/Cargo.toml | 4 ++-- src/satman/src/main.rs | 9 --------- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libboard_artiq/Cargo.toml b/src/libboard_artiq/Cargo.toml index dc64e022..18d05205 100644 --- a/src/libboard_artiq/Cargo.toml +++ b/src/libboard_artiq/Cargo.toml @@ -6,6 +6,10 @@ authors = ["M-Labs"] [lib] name = "libboard_artiq" +[features] +target_zc706 = [] +target_kasli_soc = [] + [build-dependencies] build_zynq = { path = "../libbuild_zynq" } diff --git a/src/libboard_artiq/src/si5324.rs b/src/libboard_artiq/src/si5324.rs index de11427a..16e6191a 100644 --- a/src/libboard_artiq/src/si5324.rs +++ b/src/libboard_artiq/src/si5324.rs @@ -190,6 +190,10 @@ fn init(i2c: &mut I2c, timer: &mut GlobalTimer) -> Result<()> { i2c.pca9548_select(0x70, 0)?; i2c.pca9548_select(0x71, 1 << 3)?; } + #[cfg(feature = "target_zc706")] + { + i2c.pca9548_select(0x74, 1 << 4)?; + } if ident(i2c)? != 0x0182 { return Err("Si5324 does not have expected product number"); diff --git a/src/satman/Cargo.toml b/src/satman/Cargo.toml index 863dee0f..6c44e5af 100644 --- a/src/satman/Cargo.toml +++ b/src/satman/Cargo.toml @@ -5,8 +5,8 @@ version = "0.0.0" build = "build.rs" [features] -target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706"] -target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libsupport_zynq/target_kasli_soc", "libconfig/target_kasli_soc"] +target_zc706 = ["libboard_zynq/target_zc706", "libsupport_zynq/target_zc706", "libconfig/target_zc706", "libboard_artiq/target_zc706"] +target_kasli_soc = ["libboard_zynq/target_kasli_soc", "libsupport_zynq/target_kasli_soc", "libconfig/target_kasli_soc", "libboard_artiq/target_kasli_soc"] default = ["target_zc706", ] [build-dependencies] diff --git a/src/satman/src/main.rs b/src/satman/src/main.rs index 0eeadf84..79ed20da 100644 --- a/src/satman/src/main.rs +++ b/src/satman/src/main.rs @@ -485,11 +485,6 @@ pub extern fn main_core0() -> i32 { let mut hardware_tick_ts = 0; - print!("all set"); - - unsafe { - info!("rx_disable_read: {}, rx_up_read: {}", csr::drtiosat::rx_disable_read(), csr::drtiosat::rx_up_read()); - } loop { while !drtiosat_link_rx_up() { drtiosat_process_errors(); @@ -498,10 +493,6 @@ pub extern fn main_core0() -> i32 { rep.service(&routing_table, rank, &mut timer); } hardware_tick(&mut hardware_tick_ts, &mut timer); - unsafe { - info!("rx_disable_read: {}, rx_up_read: {}", csr::drtiosat::rx_disable_read(), csr::drtiosat::rx_up_read()); - } - timer.delay_us(1000_000); } info!("uplink is up, switching to recovered clock");