Files
build/patch/kernel/archive/meson-6.12/generic-Revert-mmc-core-Set-HS-clock-speed-before-sending-HS-CMD13.patch
Dominik Wójt 5b29f4dd4b meson: kernel update: legacy -> 6.6, current -> 6.12 (#7801)
* Add MXQ target. Copy HDMI fix from odroid-c1.
* meson8, MXQ: add boot from usb support, configurable dtb
* MXQ: remove boot logo
Built-in U-BOOT is used, so the logo will not be displayed anyway.
* meson: kernel update: legacy -> 6.6, current -> 6.12
* Change Odroid C1 and Onecloud to community supported as build now passes
---------
Co-authored-by: Igor Pecovnik <igor@armbian.com>
2025-02-08 23:08:34 +01:00

77 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hzy <hzyitc@outlook.com>
Date: Sat, 18 Nov 2023 01:22:04 +0800
Subject: Revert "mmc: core: Set HS clock speed before sending HS CMD13"
This reverts commit 4bc31edebde51fcf8ad0794763b8679a7ecb5ec0.
---
drivers/mmc/core/mmc.c | 23 ++--------
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 111111111111..222222222222 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1387,17 +1387,13 @@ static int mmc_select_hs400es(struct mmc_card *card)
goto out_err;
}
- /*
- * Bump to HS timing and frequency. Some cards don't handle
- * SEND_STATUS reliably at the initial frequency.
- */
mmc_set_timing(host, MMC_TIMING_MMC_HS);
- mmc_set_bus_speed(card);
-
err = mmc_switch_status(card, true);
if (err)
goto out_err;
+ mmc_set_clock(host, card->ext_csd.hs_max_dtr);
+
/* Switch card to DDR with strobe bit */
val = EXT_CSD_DDR_BUS_WIDTH_8 | EXT_CSD_BUS_WIDTH_STROBE;
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
@@ -1455,7 +1451,7 @@ static int mmc_select_hs400es(struct mmc_card *card)
static int mmc_select_hs200(struct mmc_card *card)
{
struct mmc_host *host = card->host;
- unsigned int old_timing, old_signal_voltage, old_clock;
+ unsigned int old_timing, old_signal_voltage;
int err = -EINVAL;
u8 val;
@@ -1486,17 +1482,8 @@ static int mmc_select_hs200(struct mmc_card *card)
false, true, MMC_CMD_RETRIES);
if (err)
goto err;
-
- /*
- * Bump to HS timing and frequency. Some cards don't handle
- * SEND_STATUS reliably at the initial frequency.
- * NB: We can't move to full (HS200) speeds until after we've
- * successfully switched over.
- */
old_timing = host->ios.timing;
- old_clock = host->ios.clock;
mmc_set_timing(host, MMC_TIMING_MMC_HS200);
- mmc_set_clock(card->host, card->ext_csd.hs_max_dtr);
/*
* For HS200, CRC errors are not a reliable way to know the
@@ -1509,10 +1496,8 @@ static int mmc_select_hs200(struct mmc_card *card)
* mmc_select_timing() assumes timing has not changed if
* it is a switch error.
*/
- if (err == -EBADMSG) {
- mmc_set_clock(host, old_clock);
+ if (err == -EBADMSG)
mmc_set_timing(host, old_timing);
- }
}
err:
if (err) {
--
Armbian