aboutsummaryrefslogtreecommitdiff
path: root/src/clocks/mod.rs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-11-17 14:58:26 +0100
committerJames Munns <[email protected]>2025-11-17 14:58:26 +0100
commita8ca36cdbe06e83019279e441ac386a448c12edb (patch)
tree65d9b0c3ff72ccb1dcb089352bd9e874e6507a45 /src/clocks/mod.rs
parent6e6ba60beb4faf17142938e1efff4b9d30e715c3 (diff)
Fill in main_clk state
Diffstat (limited to 'src/clocks/mod.rs')
-rw-r--r--src/clocks/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clocks/mod.rs b/src/clocks/mod.rs
index c6606b1b6..40acb11ec 100644
--- a/src/clocks/mod.rs
+++ b/src/clocks/mod.rs
@@ -87,7 +87,12 @@ pub fn init(settings: ClocksConfig) -> Result<(), ClockError> {
87 operator.configure_firc_clocks()?; 87 operator.configure_firc_clocks()?;
88 operator.configure_sirc_clocks()?; 88 operator.configure_sirc_clocks()?;
89 operator.configure_fro16k_clocks()?; 89 operator.configure_fro16k_clocks()?;
90 // TODO, everything downstream 90
91 // For now, just use FIRC as the main/cpu clock, which should already be
92 // the case on reset
93 assert!(operator.scg0.rccr().read().scs().is_firc());
94 assert_eq!(operator.syscon.ahbclkdiv().read().div().bits(), 0);
95 operator.clocks.main_clk = Some(operator.clocks.fro_hf_root.clone().unwrap());
91 96
92 critical_section::with(|cs| { 97 critical_section::with(|cs| {
93 let mut clks = CLOCKS.borrow_ref_mut(cs); 98 let mut clks = CLOCKS.borrow_ref_mut(cs);