Skip to content

Commit 16b9c2a

Browse files
committed
Restore Agilex 5 SDHCI host reset to match hardware-proven behavior
1 parent 39fd71f commit 16b9c2a

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎arch.mk‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ ifeq ($(ARCH),AARCH64)
175175
CFLAGS+=-DWOLFBOOT_DUALBOOT -DWOLFBOOT_UBOOT_LEGACY
176176
# BL31 owns GICv3 and secondary-core/PSCI setup. Do not touch RVBAR.
177177
CFLAGS+=-DSKIP_RVBAR=1 -DSKIP_GIC_INIT=1
178-
# SPL/TF-A leave the Cadence host initialized; retain its PHY state and
179-
# allow the controller's required post-command settle time.
180-
CFLAGS_EXTRA+=-DSDHCI_SKIP_HOST_RESET=1 -DSDHCI_WAIT_AFTER_CMD_US=1000
178+
# Full SDHCI host reset: SPL leaves the Cadence host in UHS-I 1.8V/SDR104,
179+
# which mutes CMD8 against the 3.3V re-powered card (hardware-verified).
181180
endif
182181

183182
ifeq ($(TARGET),nxp_ls1028a)

‎docs/Targets.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9205,7 +9205,6 @@ The difference between the two timestamps is the cost of everything wolfBoot doe
92059205
92069206
Both caches are enabled by `hal_init()`, which matters because verifying an image means hashing megabytes resident in DDR. The ARMv7-M default memory map marks `0x80000000-0x9FFFFFFF` as Normal write-through, so no MPU region is needed and M7 stores to the shared window still reach DDR; the HAL nevertheless cleans the affected lines explicitly so that behaviour is not left depending on an inherited attribute.
92079207
9208-
<<<<<<< HEAD
92099208
## TI C2000 C28x (LAUNCHXL-F28P55X)
92109209
92119210
wolfBoot runs on the Texas Instruments C2000 C28x DSP (TMS320F28P550SJ, 150 MHz) as a secure execute-in-place (XIP) bootloader. The C28x is word-addressed with `CHAR_BIT == 16` (no 8-bit type -- each octet occupies one 16-bit cell), built with the TI `cl2000` toolchain against wolfSSL's wide-byte (`CHAR_BIT != 8`) support.

‎hal/agilex5.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ void sdhci_reg_write(uint32_t offset, uint32_t value)
301301

302302
void sdhci_platform_init(void)
303303
{
304-
/* SPL initialized the host, clocks, reset and pinmux while loading BL31
305-
* and BL33. Preserve that live host state and restore the 013B PHY timing
306-
* required after wolfBoot takes ownership from TF-A. */
304+
/* SPL initialized the clocks and pinmux; the generic driver then soft
305+
* resets the host, so restore the 013B PHY timing here. */
307306
if (agilex5_sdhci_phy_init() != 0)
308307
wolfBoot_printf("SDHCI: Cadence PHY initialization timed out\n");
309308
}

0 commit comments

Comments
 (0)