diff options
| author | Tom Rini <[email protected]> | 2026-01-08 10:27:17 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-01-08 10:27:17 -0600 |
| commit | ed4ec707e066e689a9a332c3124bf088b1e31cf6 (patch) | |
| tree | f6c46cd59bc5fe905308301c4a1bef0f9e3156ff | |
| parent | 141be72e2a9d43aa4e3d1a6a6e0ab8f9eb8784c6 (diff) | |
| parent | c4f5b1d4b037beeb538cf6dee0a16cd196539273 (diff) | |
Merge tag 'mmc-for-2026.04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-mmc
CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/28960
- Revert "Use max-frequency from device tree with default handling"
- Select CRC16 MMC_SPI_CRC_ON
- Add 1ms delay with 1ms margin after mmc power on to follow spec
| -rw-r--r-- | drivers/mmc/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/mmc/mmc-uclass.c | 9 | ||||
| -rw-r--r-- | drivers/mmc/mmc.c | 13 |
3 files changed, 13 insertions, 10 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 4c46df0ffb8..39caf2eff1b 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -91,6 +91,7 @@ config MMC_SPI_CRC_ON bool "Support CRC for SPI-based MMC controller" depends on MMC_SPI default y + select CRC16 help This enables CRC for SPI-based MMC controllers. diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index bf0bea93853..2f4dc5bd887 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -243,13 +243,8 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) return -EINVAL; } - /* - * Maximum frequency is obtained from the optional "max-frequency" property. - * If not specified in device tree, defaults to 0 and sdhci_setup_cfg() - * will set the MMC configuration maximum frequency to the host controller's - * maximum base clock frequency from capabilities register. - */ - cfg->f_max = dev_read_u32_default(dev, "max-frequency", 0); + /* f_max is obtained from the optional "max-frequency" property */ + dev_read_u32(dev, "max-frequency", &cfg->f_max); if (dev_read_bool(dev, "cap-sd-highspeed")) cfg->host_caps |= MMC_CAP(SD_HS); diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index bf82c515600..71664173016 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2933,11 +2933,18 @@ static int mmc_power_cycle(struct mmc *mmc) return ret; /* - * SD spec recommends at least 1ms of delay. Let's wait for 2ms - * to be on the safer side. + * SD spec recommends at least 1ms of 'power on' delay. + * Let's wait for 2ms to be on the safer side. */ udelay(2000); - return mmc_power_on(mmc); + ret = mmc_power_on(mmc); + + /* + * SD spec recommends at least 1ms of 'stable supply voltage' delay. + * Let's wait for 2ms to be on the safer side. + */ + udelay(2000); + return ret; } int mmc_get_op_cond(struct mmc *mmc, bool quiet) |
