Skip to content

Commit 12e3c55

Browse files
Wolfram SangUlf Hansson
authored andcommitted
mmc: renesas_sdhi: remove 4taps as a TMIO flag
Now that the quirks structure is accessible, we can remove the TMIO flag for HS400 using only 4 taps. This is Renesas specific anyhow. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20191203200513.1758-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 7af0820 commit 12e3c55

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

‎drivers/mmc/host/renesas_sdhi_core.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static void renesas_sdhi_hs400_complete(struct tmio_mmc_host *host)
350350
0x4 << SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT);
351351

352352

353-
if (host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400)
353+
if (priv->quirks && priv->quirks->hs400_4taps)
354354
sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET,
355355
host->tap_set / 2);
356356

@@ -488,7 +488,7 @@ static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
488488
static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
489489
{
490490
struct renesas_sdhi *priv = host_to_priv(host);
491-
bool use_4tap = host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400;
491+
bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
492492

493493
/*
494494
* Skip checking SCC errors when running on 4 taps in HS400 mode as
@@ -720,9 +720,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
720720
if (quirks && quirks->hs400_disabled)
721721
host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
722722

723-
if (quirks && quirks->hs400_4taps)
724-
mmc_data->flags |= TMIO_MMC_HAVE_4TAP_HS400;
725-
726723
/* For some SoC, we disable internal WP. GPIO may override this */
727724
if (mmc_can_gpio_ro(host->mmc))
728725
mmc_data->capabilities2 &= ~MMC_CAP2_NO_WRITE_PROTECT;

‎include/linux/mfd/tmio.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@
7979
/* Some controllers have a CBSY bit */
8080
#define TMIO_MMC_HAVE_CBSY BIT(11)
8181

82-
/* Some controllers that support HS400 use 4 taps while others use 8. */
83-
#define TMIO_MMC_HAVE_4TAP_HS400 BIT(13)
84-
8582
int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
8683
int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
8784
void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state);

0 commit comments

Comments
 (0)