Loading drivers/mmc/host/sdhci-msm.c +3 −1 Original line number Diff line number Diff line Loading @@ -3035,7 +3035,8 @@ static const struct sdhci_pltfm_data sdhci_msm_pdata = { SDHCI_QUIRK_SINGLE_POWER_WRITE | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC | SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, .ops = &sdhci_msm_ops, Loading Loading @@ -3772,6 +3773,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY; #if defined(CONFIG_SDC_QTI) host->timeout_clk_div = 4; msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE; #endif sdhci_msm_setup_pm(pdev, msm_host); Loading drivers/mmc/host/sdhci.c +13 −0 Original line number Diff line number Diff line Loading @@ -2040,6 +2040,10 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->timeout_clk = host->mmc->actual_clock ? host->mmc->actual_clock / 1000 : host->clock / 1000; #if defined(CONFIG_SDC_QTI) host->timeout_clk /= host->timeout_clk_div; #endif host->mmc->max_busy_timeout = host->ops->get_max_timeout_count ? host->ops->get_max_timeout_count(host) : Loading Loading @@ -3891,6 +3895,11 @@ int sdhci_setup_host(struct sdhci_host *host) override_timeout_clk = host->timeout_clk; #if defined(CONFIG_SDC_QTI) if (!host->timeout_clk_div) host->timeout_clk_div = 1; #endif if (host->version > SDHCI_SPEC_420) { pr_err("%s: Unknown controller version (%d). You may experience problems.\n", mmc_hostname(mmc), host->version); Loading Loading @@ -4088,6 +4097,10 @@ int sdhci_setup_host(struct sdhci_host *host) if (override_timeout_clk) host->timeout_clk = override_timeout_clk; #if defined(CONFIG_SDC_QTI) host->timeout_clk /= host->timeout_clk_div; #endif mmc->max_busy_timeout = host->ops->get_max_timeout_count ? host->ops->get_max_timeout_count(host) : 1 << 27; mmc->max_busy_timeout /= host->timeout_clk; Loading drivers/mmc/host/sdhci.h +5 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,11 @@ struct sdhci_host { unsigned int max_clk; /* Max possible freq (MHz) */ unsigned int timeout_clk; /* Timeout freq (KHz) */ #if defined(CONFIG_SDC_QTI) u8 timeout_clk_div; /* Timeout freq (KHz) divider */ #endif unsigned int clk_mul; /* Clock Muliplier value */ unsigned int clock; /* Current clock (MHz) */ Loading Loading
drivers/mmc/host/sdhci-msm.c +3 −1 Original line number Diff line number Diff line Loading @@ -3035,7 +3035,8 @@ static const struct sdhci_pltfm_data sdhci_msm_pdata = { SDHCI_QUIRK_SINGLE_POWER_WRITE | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC | SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, .ops = &sdhci_msm_ops, Loading Loading @@ -3772,6 +3773,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY; #if defined(CONFIG_SDC_QTI) host->timeout_clk_div = 4; msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE; #endif sdhci_msm_setup_pm(pdev, msm_host); Loading
drivers/mmc/host/sdhci.c +13 −0 Original line number Diff line number Diff line Loading @@ -2040,6 +2040,10 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->timeout_clk = host->mmc->actual_clock ? host->mmc->actual_clock / 1000 : host->clock / 1000; #if defined(CONFIG_SDC_QTI) host->timeout_clk /= host->timeout_clk_div; #endif host->mmc->max_busy_timeout = host->ops->get_max_timeout_count ? host->ops->get_max_timeout_count(host) : Loading Loading @@ -3891,6 +3895,11 @@ int sdhci_setup_host(struct sdhci_host *host) override_timeout_clk = host->timeout_clk; #if defined(CONFIG_SDC_QTI) if (!host->timeout_clk_div) host->timeout_clk_div = 1; #endif if (host->version > SDHCI_SPEC_420) { pr_err("%s: Unknown controller version (%d). You may experience problems.\n", mmc_hostname(mmc), host->version); Loading Loading @@ -4088,6 +4097,10 @@ int sdhci_setup_host(struct sdhci_host *host) if (override_timeout_clk) host->timeout_clk = override_timeout_clk; #if defined(CONFIG_SDC_QTI) host->timeout_clk /= host->timeout_clk_div; #endif mmc->max_busy_timeout = host->ops->get_max_timeout_count ? host->ops->get_max_timeout_count(host) : 1 << 27; mmc->max_busy_timeout /= host->timeout_clk; Loading
drivers/mmc/host/sdhci.h +5 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,11 @@ struct sdhci_host { unsigned int max_clk; /* Max possible freq (MHz) */ unsigned int timeout_clk; /* Timeout freq (KHz) */ #if defined(CONFIG_SDC_QTI) u8 timeout_clk_div; /* Timeout freq (KHz) divider */ #endif unsigned int clk_mul; /* Clock Muliplier value */ unsigned int clock; /* Current clock (MHz) */ Loading