mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 07:00:52 +07:00
MMC host:
- sdhci: Fix minimum clock rate for v3 controllers - sdhci-tegra: Fix SDR50 tuning override - sdhci_am654: Fixup tuning issues and support for CQHCI - sdhci_am654: Remove wrong write protect flag -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAl4p+0EXHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCn8AhAAk0JZ3GVQhojZXZlVabhnXh5q XJ3uY6O5PbyBMjCfsbbQJx3imsid0mYGeGo0S2AhFJyT3wZhPS4XXRgrzDQWhG+Y jrIbjFctuehpwKxPXeJhmKQYrRKIiM3EfJ3qZmfnCmeWstDzvyTntqxY1WjAFYpf d8V759fOnKSX1p23i4R0/j13x1uUy74nSMicLQJBGX5A/KOtRqRJ/oQVHBwaoc2h 4FSWl0lRTAsrP8VCby7mKngE4esyk+ajDdJHpSeYWzx3Gc3sXlKkZmcDTjBoTjA3 6H9jdfR6L8QXxeW3SR3LQPxEb/7m2jCAHsbkQnBJ9wSK9oZ2cdjs2/aLh8lMpJQk BBtFS0htZv/uDQlPPWBi7VhT94u7dCC33hsBc5QAwW/PpClaJoNfewseNaymg+nd S32QL0y0e+/H35707uClS9FnKyv4ULmZlO71kqaQ2hU9LBxkqBmMVB035FDP9lx5 xz7e69hr89I9HzAMoQb694htTkdUhMq/9w1MkyRhaswmytn9aw3i4+Ly0WMAI319 2dn/7GroV3QRiI6MxSwbWA9U6+hgpJmUWmOMutiPIpWplqTryRiUwdJsd7xV1nQV iZK4spIUnLfr4fPXyZXxM0shLHrHngg88hU7X2MLim0JDOvvoTmSaCbGwSXXsztA va7/rn2MAJZ2zCDf4XE= =heRr -----END PGP SIGNATURE----- Merge tag 'mmc-v5.5-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC host fixes: - sdhci: Fix minimum clock rate for v3 controllers - sdhci-tegra: Fix SDR50 tuning override - sdhci_am654: Fixup tuning issues and support for CQHCI - sdhci_am654: Remove wrong write protect flag" * tag 'mmc-v5.5-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: fix minimum clock rate for v3 controller mmc: tegra: fix SDR50 tuning override mmc: sdhci_am654: Fix Command Queuing in AM65x mmc: sdhci_am654: Reset Command and Data line after tuning mmc: sdhci_am654: Remove Inverted Write Protect flag
This commit is contained in:
commit
838a860a39
@ -386,7 +386,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
|
||||
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50;
|
||||
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR104)
|
||||
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104;
|
||||
if (soc_data->nvquirks & SDHCI_MISC_CTRL_ENABLE_SDR50)
|
||||
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR50)
|
||||
clk_ctrl |= SDHCI_CLOCK_CTRL_SDR50_TUNING_OVERRIDE;
|
||||
}
|
||||
|
||||
|
@ -3913,11 +3913,13 @@ int sdhci_setup_host(struct sdhci_host *host)
|
||||
if (host->ops->get_min_clock)
|
||||
mmc->f_min = host->ops->get_min_clock(host);
|
||||
else if (host->version >= SDHCI_SPEC_300) {
|
||||
if (host->clk_mul) {
|
||||
mmc->f_min = (host->max_clk * host->clk_mul) / 1024;
|
||||
if (host->clk_mul)
|
||||
max_clk = host->max_clk * host->clk_mul;
|
||||
} else
|
||||
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300;
|
||||
/*
|
||||
* Divided Clock Mode minimum clock rate is always less than
|
||||
* Programmable Clock Mode minimum clock rate.
|
||||
*/
|
||||
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300;
|
||||
} else
|
||||
mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
|
||||
|
||||
|
@ -240,28 +240,21 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg)
|
||||
writeb(val, host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static struct sdhci_ops sdhci_am654_ops = {
|
||||
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
.set_uhs_signaling = sdhci_set_uhs_signaling,
|
||||
.set_bus_width = sdhci_set_bus_width,
|
||||
.set_power = sdhci_am654_set_power,
|
||||
.set_clock = sdhci_am654_set_clock,
|
||||
.write_b = sdhci_am654_write_b,
|
||||
.reset = sdhci_reset,
|
||||
};
|
||||
static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode)
|
||||
{
|
||||
struct sdhci_host *host = mmc_priv(mmc);
|
||||
int err = sdhci_execute_tuning(mmc, opcode);
|
||||
|
||||
static const struct sdhci_pltfm_data sdhci_am654_pdata = {
|
||||
.ops = &sdhci_am654_ops,
|
||||
.quirks = SDHCI_QUIRK_INVERTED_WRITE_PROTECT |
|
||||
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
|
||||
};
|
||||
if (err)
|
||||
return err;
|
||||
/*
|
||||
* Tuning data remains in the buffer after tuning.
|
||||
* Do a command and data reset to get rid of it
|
||||
*/
|
||||
sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
|
||||
|
||||
static const struct sdhci_am654_driver_data sdhci_am654_drvdata = {
|
||||
.pdata = &sdhci_am654_pdata,
|
||||
.flags = IOMUX_PRESENT | FREQSEL_2_BIT | STRBSEL_4_BIT | DLL_PRESENT,
|
||||
};
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask)
|
||||
{
|
||||
@ -276,6 +269,29 @@ static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct sdhci_ops sdhci_am654_ops = {
|
||||
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
.set_uhs_signaling = sdhci_set_uhs_signaling,
|
||||
.set_bus_width = sdhci_set_bus_width,
|
||||
.set_power = sdhci_am654_set_power,
|
||||
.set_clock = sdhci_am654_set_clock,
|
||||
.write_b = sdhci_am654_write_b,
|
||||
.irq = sdhci_am654_cqhci_irq,
|
||||
.reset = sdhci_reset,
|
||||
};
|
||||
|
||||
static const struct sdhci_pltfm_data sdhci_am654_pdata = {
|
||||
.ops = &sdhci_am654_ops,
|
||||
.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
|
||||
};
|
||||
|
||||
static const struct sdhci_am654_driver_data sdhci_am654_drvdata = {
|
||||
.pdata = &sdhci_am654_pdata,
|
||||
.flags = IOMUX_PRESENT | FREQSEL_2_BIT | STRBSEL_4_BIT | DLL_PRESENT,
|
||||
};
|
||||
|
||||
static struct sdhci_ops sdhci_j721e_8bit_ops = {
|
||||
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
.get_timeout_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
@ -290,8 +306,7 @@ static struct sdhci_ops sdhci_j721e_8bit_ops = {
|
||||
|
||||
static const struct sdhci_pltfm_data sdhci_j721e_8bit_pdata = {
|
||||
.ops = &sdhci_j721e_8bit_ops,
|
||||
.quirks = SDHCI_QUIRK_INVERTED_WRITE_PROTECT |
|
||||
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
|
||||
};
|
||||
|
||||
@ -314,8 +329,7 @@ static struct sdhci_ops sdhci_j721e_4bit_ops = {
|
||||
|
||||
static const struct sdhci_pltfm_data sdhci_j721e_4bit_pdata = {
|
||||
.ops = &sdhci_j721e_4bit_ops,
|
||||
.quirks = SDHCI_QUIRK_INVERTED_WRITE_PROTECT |
|
||||
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
|
||||
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
|
||||
};
|
||||
|
||||
@ -549,6 +563,8 @@ static int sdhci_am654_probe(struct platform_device *pdev)
|
||||
goto pm_runtime_put;
|
||||
}
|
||||
|
||||
host->mmc_host_ops.execute_tuning = sdhci_am654_execute_tuning;
|
||||
|
||||
ret = sdhci_am654_init(host);
|
||||
if (ret)
|
||||
goto pm_runtime_put;
|
||||
|
Loading…
Reference in New Issue
Block a user