From ca105f4be8fe1aa05f151f25953df622f766aef6 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 5 Aug 2025 23:02:54 +0800 Subject: [PATCH] cleanup some more cache_flush refs --- baremetal/src/platform/cramium/cramium.rs | 17 ----------------- libs/cramium-hal/src/udma/spim.rs | 21 --------------------- 2 files changed, 38 deletions(-) diff --git a/baremetal/src/platform/cramium/cramium.rs b/baremetal/src/platform/cramium/cramium.rs index d16e53a9c..360651dd8 100644 --- a/baremetal/src/platform/cramium/cramium.rs +++ b/baremetal/src/platform/cramium/cramium.rs @@ -526,20 +526,3 @@ pub fn lfsr_next_u32(state: u32) -> u32 { (state << 1) + bit } - -#[inline(always)] -#[allow(dead_code)] -fn cache_flush() { - unsafe { - #[rustfmt::skip] - core::arch::asm!( - "fence.i", - ".word 0x500F", - "nop", - "nop", - "nop", - "nop", - "nop", - ); - } -} diff --git a/libs/cramium-hal/src/udma/spim.rs b/libs/cramium-hal/src/udma/spim.rs index a30d9afa3..60fe1634f 100644 --- a/libs/cramium-hal/src/udma/spim.rs +++ b/libs/cramium-hal/src/udma/spim.rs @@ -1353,24 +1353,3 @@ impl Spim { true } } - -// Stub retained because it is helpful for debugging some bus contention issues. -#[allow(dead_code)] -fn cache_flush() { - unsafe { - // let the write go through before continuing - #[rustfmt::skip] - core::arch::asm!( - ".word 0x500F", - "nop", - "nop", - "nop", - "nop", - "fence", - "nop", - "nop", - "nop", - "nop", - ); - } -}