From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 03/10] mmc: Merge SD_LEGACY and MMC_LEGACY bus modes
Date: Fri, 24 Jan 2020 17:22:45 +0530 [thread overview]
Message-ID: <20200124115252.15712-4-faiz_abbas@ti.com> (raw)
In-Reply-To: <20200124115252.15712-1-faiz_abbas@ti.com>
MMC_LEGACY & SD_LEGACY are not differentiated timings in the spec and
don't have any meaningful differences. Therefore, get rid of all
references to SD_LEGACY and use MMC_LEGACY to mean both of them.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
drivers/mmc/fsl_esdhc_imx.c | 1 -
drivers/mmc/mmc.c | 18 ++++++++----------
drivers/mmc/omap_hsmmc.c | 1 -
drivers/mmc/zynq_sdhci.c | 1 -
include/mmc.h | 1 -
5 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 462ad2878a..6555639fdf 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -741,7 +741,6 @@ static int esdhc_set_timing(struct mmc *mmc)
switch (mmc->selected_mode) {
case MMC_LEGACY:
- case SD_LEGACY:
esdhc_reset_tuning(mmc);
writel(mixctrl, ®s->mixctrl);
break;
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 50df8c8626..c49e892e73 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -136,7 +136,6 @@ const char *mmc_mode_name(enum bus_mode mode)
{
static const char *const names[] = {
[MMC_LEGACY] = "MMC legacy",
- [SD_LEGACY] = "SD Legacy",
[MMC_HS] = "MMC High Speed (26MHz)",
[SD_HS] = "SD High Speed (50MHz)",
[UHS_SDR12] = "UHS SDR12 (25MHz)",
@@ -162,7 +161,6 @@ static uint mmc_mode2freq(struct mmc *mmc, enum bus_mode mode)
{
static const int freqs[] = {
[MMC_LEGACY] = 25000000,
- [SD_LEGACY] = 25000000,
[MMC_HS] = 26000000,
[SD_HS] = 50000000,
[MMC_HS_52] = 52000000,
@@ -1241,7 +1239,7 @@ static int sd_get_capabilities(struct mmc *mmc)
u32 sd3_bus_mode;
#endif
- mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(SD_LEGACY);
+ mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(MMC_LEGACY);
if (mmc_host_is_spi(mmc))
return 0;
@@ -1354,7 +1352,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
return 0;
switch (mode) {
- case SD_LEGACY:
+ case MMC_LEGACY:
speed = UHS_SDR12_BUS_SPEED;
break;
case SD_HS:
@@ -1697,7 +1695,7 @@ static const struct mode_width_tuning sd_modes_by_pref[] = {
},
#endif
{
- .mode = SD_LEGACY,
+ .mode = MMC_LEGACY,
.widths = MMC_MODE_4BIT | MMC_MODE_1BIT,
}
};
@@ -1727,7 +1725,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
if (mmc_host_is_spi(mmc)) {
mmc_set_bus_width(mmc, 1);
- mmc_select_mode(mmc, SD_LEGACY);
+ mmc_select_mode(mmc, MMC_LEGACY);
mmc_set_clock(mmc, mmc->tran_speed, MMC_CLK_ENABLE);
return 0;
}
@@ -1786,7 +1784,7 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
error:
/* revert to a safer bus speed */
- mmc_select_mode(mmc, SD_LEGACY);
+ mmc_select_mode(mmc, MMC_LEGACY);
mmc_set_clock(mmc, mmc->tran_speed,
MMC_CLK_ENABLE);
}
@@ -2563,7 +2561,7 @@ static int mmc_startup(struct mmc *mmc)
#if CONFIG_IS_ENABLED(MMC_TINY)
mmc_set_clock(mmc, mmc->legacy_speed, false);
- mmc_select_mode(mmc, IS_SD(mmc) ? SD_LEGACY : MMC_LEGACY);
+ mmc_select_mode(mmc, MMC_LEGACY);
mmc_set_bus_width(mmc, 1);
#else
if (IS_SD(mmc)) {
@@ -2844,8 +2842,8 @@ int mmc_start_init(struct mmc *mmc)
* all hosts are capable of 1 bit bus-width and able to use the legacy
* timings.
*/
- mmc->host_caps = mmc->cfg->host_caps | MMC_CAP(SD_LEGACY) |
- MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
+ mmc->host_caps = mmc->cfg->host_caps | MMC_CAP(MMC_LEGACY) |
+ MMC_MODE_1BIT;
#if !defined(CONFIG_MMC_BROKEN_CD)
no_card = mmc_getcd(mmc) == 0;
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 5d0cfb2ebd..5e79fa517d 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -390,7 +390,6 @@ static void omap_hsmmc_set_timing(struct mmc *mmc)
break;
case MMC_LEGACY:
case MMC_HS:
- case SD_LEGACY:
case UHS_SDR12:
val |= AC12_UHSMC_SDR12;
break;
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 529eec9c45..fc638649bd 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -35,7 +35,6 @@ struct arasan_sdhci_priv {
static const u8 mode2timing[] = {
[MMC_LEGACY] = UHS_SDR12_BUS_SPEED,
- [SD_LEGACY] = UHS_SDR12_BUS_SPEED,
[MMC_HS] = HIGH_SPEED_BUS_SPEED,
[SD_HS] = HIGH_SPEED_BUS_SPEED,
[MMC_HS_52] = HIGH_SPEED_BUS_SPEED,
diff --git a/include/mmc.h b/include/mmc.h
index 6aef125f25..a96833c1ca 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -539,7 +539,6 @@ struct sd_ssr {
enum bus_mode {
MMC_LEGACY,
- SD_LEGACY,
MMC_HS,
SD_HS,
MMC_HS_52,
--
2.19.2
next prev parent reply other threads:[~2020-01-24 11:52 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 11:52 [PATCH v2 00/10] Add Support for eMMC boot in AM65x and J721e Faiz Abbas
2020-01-24 11:52 ` [PATCH v2 01/10] mmc: Add a saved_clock member Faiz Abbas
2020-01-28 23:28 ` Jaehoon Chung
2020-01-24 11:52 ` [PATCH v2 02/10] mmc: Add init() API Faiz Abbas
2020-01-29 8:03 ` Simon Goldschmidt
2020-01-29 8:07 ` Simon Goldschmidt
2020-01-30 15:03 ` Faiz Abbas
2020-01-30 15:07 ` Michal Simek
2020-01-30 15:14 ` Faiz Abbas
2020-01-30 15:30 ` Michal Simek
2020-01-30 15:32 ` Tom Rini
2020-01-30 15:35 ` Simon Goldschmidt
2020-01-30 15:38 ` Tom Rini
2020-01-31 13:43 ` Wolfgang Denk
2020-02-03 6:04 ` Sekhar Nori
2020-02-03 7:08 ` Michal Simek
2020-01-31 13:41 ` Wolfgang Denk
2020-01-31 13:37 ` Wolfgang Denk
2020-01-30 15:10 ` Simon Goldschmidt
2020-01-29 14:08 ` Faiz Abbas
2020-02-01 13:13 ` Peng Fan
2020-02-03 10:48 ` Faiz Abbas
2020-02-03 12:04 ` Peng Fan
2020-02-04 10:24 ` Faiz Abbas
2020-02-09 13:38 ` Wolfgang Denk
2020-02-10 14:28 ` Tom Rini
2020-02-11 13:56 ` Wolfgang Denk
2020-02-11 15:08 ` Wolfgang Denk
2020-02-11 16:25 ` Wolfgang Denk
2020-02-11 16:47 ` Tom Rini
2020-01-24 11:52 ` Faiz Abbas [this message]
2020-01-24 11:52 ` [PATCH v2 04/10] mmc: sdhci: Expose sdhci_init() as non-static Faiz Abbas
2020-01-28 22:59 ` Jaehoon Chung
2020-01-29 14:16 ` Simon Goldschmidt
2020-01-30 22:21 ` Jaehoon Chung
2020-01-30 22:25 ` Simon Goldschmidt
2020-02-04 6:53 ` Faiz Abbas
2020-02-05 7:28 ` Peng Fan
2020-02-05 7:33 ` Faiz Abbas
2020-02-17 12:17 ` Jaehoon Chung
2020-02-17 12:42 ` Faiz Abbas
2020-02-17 22:35 ` Jaehoon Chung
2020-02-17 23:24 ` Jaehoon Chung
2020-02-18 7:51 ` Faiz Abbas
2020-02-18 8:20 ` Jaehoon Chung
2020-01-24 11:52 ` [PATCH v2 05/10] mmc: am654_sdhci: Update output tap delay writes Faiz Abbas
2020-01-24 11:52 ` [PATCH v2 06/10] mmc: am654_sdhci: Implement workaround for card detect Faiz Abbas
2020-01-29 14:18 ` Simon Goldschmidt
2020-02-10 9:48 ` Faiz Abbas
2020-02-10 11:26 ` Simon Goldschmidt
2020-02-10 23:13 ` Simon Glass
2020-01-24 11:52 ` [PATCH v2 07/10] spl: mmc: Fix spl_mmc_get_uboot_raw_sector() implementation Faiz Abbas
2020-01-24 11:52 ` [PATCH v2 08/10] arm: K3: sysfw-loader: Add a config_pm_pre_callback() Faiz Abbas
2020-01-28 23:30 ` Jaehoon Chung
2020-01-29 14:03 ` Faiz Abbas
2020-01-24 11:52 ` [PATCH v2 09/10] configs: am65x_evm: Add CONFIG_SUPPORT_EMMC_BOOT Faiz Abbas
2020-01-24 11:52 ` [PATCH v2 10/10] configs: j721e_evm: Add Support for eMMC boot Faiz Abbas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200124115252.15712-4-faiz_abbas@ti.com \
--to=faiz_abbas@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox