rockbox/firmware
Aidan MacDonald 65bf8d4192 stm32h7: sdmmc: ensure minimum time between CLKCR/CMDR writes
According to RM0433 consecutive writes to the CLKCR and CMDR
registers must be separated by at least 7 AHB clock cycles.

The initialization code didn't respect this and it seemed to
be causing a nasty bug, where the SDMMC bus clock got stuck
at 400 KHz in hardware. Despite the CLKCR register reading
back the correct value, it could not be written with a new
value even in the debugger; resetting the peripheral was the
only way out of this state.

Adding some dummy register reads after any access to CLKCR
should insert the necessary number of wait states. Without
the fix, the SDMMC clock gets stuck about 12% of the time.
With this fix, the clock always initializes correctly.

Change-Id: Iba85b8e1e3c60992ddc42fb4c1e66c37941ed617
2026-02-24 20:18:15 -05:00
..
asm Remove Creative Zen Vision and Vision:M ports 2026-02-06 07:31:54 -05:00
common firmware: fat: fix sector_t passed to 64-bit format strings 2025-12-24 09:30:47 -05:00
drivers Remove Creative Zen Vision and Vision:M ports 2026-02-06 07:31:54 -05:00
export config: USB_CHARGING_FORCE must be enabled for all iPods 2026-02-23 16:11:38 -05:00
include elf_loader: add elf_loadmem() to load file from memory 2026-01-25 19:51:07 -05:00
kernel Convert users of SHAREDDATA_ATTR to SHAREDBSS_ATTR 2026-02-05 07:57:07 -05:00
libc lua -- remove strtol and strtoul replace with rb->strtol and rb->strtoul 2025-12-06 18:11:13 -05:00
reggen stm32h743: implement I2C controller interface 2026-02-23 08:19:29 -05:00
target stm32h7: sdmmc: ensure minimum time between CLKCR/CMDR writes 2026-02-24 20:18:15 -05:00
usbstack usb: fix yellow in eb69211791 2026-01-27 15:23:47 -05:00
arabjoin.c
arabjoin.h unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
ata_idle_notify.c misc: Clean up a large pile of -Wexpansion-to-defined warnings 2025-04-21 21:04:05 -04:00
backlight-sw-fading.c backlight-sw-fading: FS#13717 fix brightness overshoot 2025-12-19 08:20:07 +01:00
backlight.c Convert users of SHAREDDATA_ATTR to SHAREDBSS_ATTR 2026-02-05 07:57:07 -05:00
bidi.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
buflib_malloc.c buflib_malloc: fixed signed/unsigned comparison 2023-01-16 16:57:23 +00:00
buflib_mempool.c buflib: Add pinned get/put data functions 2023-01-15 11:06:27 +00:00
chunk_alloc.c [BugFix] chunk_alloc pass NULL to buflib_shrink 2023-03-09 20:15:38 -05:00
COPYING
core_alloc.c hosted: Shrink audiobuffer to (MEMORY_SIZE-1) megabytes 2025-09-12 23:15:11 -04:00
debug.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
eeprom_settings.c
elf_loader.c elf_loader: add elf_loadmem() to load file from memory 2026-01-25 19:51:07 -05:00
enc_base.c
events.c events.c clean-up 2022-12-30 07:23:29 -05:00
firmware.make make: remove asm.make and use asm/SOURCES directly 2026-01-08 16:41:57 +00:00
font.c font: logf: fix pointer in buflibmove_callback 2026-01-10 07:11:51 +01:00
font_cache.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
general.c replace strlcpy with strmemccpy 2022-11-14 23:56:16 -05:00
hangul.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
lc-rock.c firmware: introduce CONFIG_BINFMT 2026-01-05 13:14:30 -05:00
linuxboot.c buflib_shrink use NULL to signal start isn't changing 2023-01-13 09:50:29 -05:00
logf.c logf: Fix an incorrect fix in 835d0c737a 2021-08-15 09:03:16 -04:00
lru.c
panic.c arm: add initial ARM Cortex-M support 2025-04-18 13:19:42 -04:00
pcm.c Rework auto playback frequency switch 2023-10-28 15:11:07 -04:00
pcm_mixer.c plugins: Convert all plugins to using mixer API for playback 2026-02-22 08:15:14 -05:00
pcm_sampr.c pcm: Missed a file for the 192/176K playback. 2020-09-30 22:03:34 -04:00
pcm_sw_volume.c pcm: improve 32-bit software volume scaling 2026-02-23 15:44:42 +00:00
powermgmt.c misc: Ensure stacks are always aligned with the native pointer size. 2025-09-05 19:43:11 -04:00
profile.c
README
rolo.c nwze370: improve lcd & backlight 2025-10-21 16:54:57 -04:00
rom.lds h300: add support for ROM image generation 2020-10-26 01:37:42 +00:00
screendump.c Fix path buffer overflow in screendump 2021-08-06 15:46:53 +00:00
scroll_engine.c pass event data to usb_acknowledge 2026-01-26 19:47:09 -05:00
sdmmc.c SD: Move sd_parse_csd() into common sdmmc code 2025-08-22 14:48:28 -04:00
sound.c audio: remove pcm_sw_volume include from sound.c 2026-02-19 14:16:26 -05:00
SOURCES fix red in 5b5cd252d0: Don't compile ALSA driver for hosted bootloaders 2026-02-23 11:10:20 -05:00
storage.c bootloaders: Don't build usb_core without HAVE_BOOTLOADER_USB_MODE 2026-02-07 08:46:10 -05:00
system.c Add ability to dump cpu boost log to disk, include thread names 2021-09-30 21:13:22 -04:00
timer.c Fix timer Agptek Rocker (other hosted players) 2019-10-17 21:19:00 +02:00
tuner.c [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
usb.c bootloaders: Don't build usb_core without HAVE_BOOTLOADER_USB_MODE 2026-02-07 08:46:10 -05:00

See docs/README