libboard_zynq: * pca9548 selection for si5234

* added proper support for targets
satman:
* removed unnecessary messages
* added libboard_zynq to targets in cargo.toml
This commit is contained in:
mwojcik 2021-09-06 10:44:25 +02:00
parent 9022064cf1
commit 5e916f588e
4 changed files with 10 additions and 11 deletions

View File

@ -6,6 +6,10 @@ authors = ["M-Labs"]
[lib]
name = "libboard_artiq"
[features]
target_zc706 = []
target_kasli_soc = []
[build-dependencies]
build_zynq = { path = "../libbuild_zynq" }

View File

@ -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");

View File

@ -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]

View File

@ -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");