stm32h7: sdmmc: use sdmmc_host bus frequency helper

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit f69ee23fa161b8e3df919bfb78594034a0266420
Author: Aidan MacDonald <[email protected]>
Date:   Tue Aug 18 16:19:21 2026 +0100

    stm32h7: sdmmc: use sdmmc_host bus frequency helper
    
    Change-Id: I6d58a95b08b8edb8a32088b3903403d84537ac12

diff --git a/firmware/target/arm/stm32/sdmmc-stm32h7.c b/firmware/target/arm/stm32/sdmmc-stm32h7.c
index cfd7fabbef..13fd606eb4 100644
--- a/firmware/target/arm/stm32/sdmmc-stm32h7.c
+++ b/firmware/target/arm/stm32/sdmmc-stm32h7.c
@@ -57,17 +57,6 @@
 #define BUSY_END_BITS \
     (BUSY_SUCCESS_BITS | DATA_ERROR_BITS)
 
-static size_t get_sdmmc_bus_freq(uint32_t clock)
-{
-    switch (clock)
-    {
-    case SDMMC_BUS_CLOCK_400KHZ: return 400000;
-    case SDMMC_BUS_CLOCK_25MHZ:  return 25000000;
-    case SDMMC_BUS_CLOCK_50MHZ:  return 50000000;
-    default:                     return 0;
-    }
-}
-
 static size_t abs_diff(size_t a, size_t b)
 {
     return a > b ? a - b : b - a;
@@ -208,7 +197,7 @@ void stm32h7_sdmmc_set_bus_clock(void *controller, uint32_t clock)
         return;
 
     size_t ker_freq = stm32_clock_get_frequency(ctl->clock);
-    size_t bus_freq = get_sdmmc_bus_freq(clock);
+    size_t bus_freq = sdmmc_host_get_bus_freq(clock);
     if (!bus_freq)
         panicf("%s", __func__);
 
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.