summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Ivan Fardjoume <[email protected]>2026-05-26 18:28:59 -0300
committerAndre Przywara <[email protected]>2026-07-26 22:31:22 +0200
commitc83594e844931ac2db1da19597119c2309b88f2c (patch)
tree2a0ffaba24d4505dfc417b85bc2594b3587d958c
parentb635d43bca429500cb8ef20aa151cb5773b9a8a5 (diff)
mmc: sunxi: fix MACH_SUN9I typo in get_mclk_offset()
The get_mclk_offset() function used the non-existent Kconfig symbol CONFIG_MACH_SUN9I_A80 instead of CONFIG_MACH_SUN9I, causing the MMC2 clock register to be written at 0x06000090 instead of 0x06000418. This corrupted the CMD2 response and made eMMC completely unresponsive. Also the legacy (SPL) sunxi_mmc_init() did not include CONFIG_MACH_SUN9I in the 8-bit bus width condition, so MMC2 (eMMC) would only use 4-bit mode in the SPL, which is insufficient for reliable boot. Tested on a Cubieboard4 A80: with both fixes, SPL loads U-Boot proper and boots Debian 12 from eMMC with no SD card present. Signed-off-by: Omar Ivan Fardjoume <[email protected]> [Andre: fix mangled patch, trim commit message] Signed-off-by: Andre Przywara <[email protected]>
-rw-r--r--drivers/mmc/sunxi_mmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index e28c81afffe..84f4e4c2198 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -576,8 +576,8 @@ struct mmc *sunxi_mmc_init(int sdc_no)
cfg->host_caps = MMC_MODE_4BIT;
if ((IS_ENABLED(CONFIG_MACH_SUN50I) || IS_ENABLED(CONFIG_MACH_SUN8I) ||
- IS_ENABLED(CONFIG_SUN50I_GEN_H6) || IS_ENABLED(CONFIG_MACH_SUN55I_A523)) &&
- (sdc_no == 2))
+ IS_ENABLED(CONFIG_MACH_SUN9I) || IS_ENABLED(CONFIG_SUN50I_GEN_H6) ||
+ IS_ENABLED(CONFIG_MACH_SUN55I_A523)) && (sdc_no == 2))
cfg->host_caps = MMC_MODE_8BIT;
cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
@@ -663,7 +663,7 @@ static const struct dm_mmc_ops sunxi_mmc_ops = {
static unsigned get_mclk_offset(void)
{
- if (IS_ENABLED(CONFIG_MACH_SUN9I_A80))
+ if (IS_ENABLED(CONFIG_MACH_SUN9I))
return 0x410;
if (IS_ENABLED(CONFIG_SUN50I_GEN_H6) || IS_ENABLED(CONFIG_SUNXI_GEN_NCAT2))