From 0d97eeb56ae1d87111357295dfd760f87252f080 Mon Sep 17 00:00:00 2001 From: den512 Date: Tue, 27 Jun 2023 12:43:36 +0800 Subject: [PATCH] kasli_soc: enable clock buffer after system clock domain reset --- src/runtime/src/rtio_clocking.rs | 2 ++ src/satman/src/main.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/runtime/src/rtio_clocking.rs b/src/runtime/src/rtio_clocking.rs index c98eae6..507c6da 100644 --- a/src/runtime/src/rtio_clocking.rs +++ b/src/runtime/src/rtio_clocking.rs @@ -84,6 +84,7 @@ fn init_rtio(timer: &mut GlobalTimer) { panic!("SYS CLK did not switch"); } unsafe { + pl::csr::sys_crg::clock_switch_write(1); //re-enable clock input buffer after system clock domain reset pl::csr::rtio_core::reset_phy_write(1); } info!("SYS PLL locked"); @@ -103,6 +104,7 @@ fn init_drtio(timer: &mut GlobalTimer) { panic!("SYS CLK did not switch"); } unsafe { + pl::csr::drtio_transceiver::stable_clkin_write(1); //re-enable clock input buffer after system clock domain reset pl::csr::rtio_core::reset_phy_write(1); pl::csr::drtio_transceiver::txenable_write(0xffffffffu32 as _); } diff --git a/src/satman/src/main.rs b/src/satman/src/main.rs index 4af58b2..8d74b1a 100644 --- a/src/satman/src/main.rs +++ b/src/satman/src/main.rs @@ -642,6 +642,7 @@ pub extern "C" fn main_core0() -> i32 { } unsafe { + csr::drtio_transceiver::stable_clkin_write(1); //re-enable clock input buffer after system clock domain reset csr::drtio_transceiver::txenable_write(0xffffffffu32 as _); } -- 2.44.2