mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
Merge "UPSTREAM: mmc: sdhci-msm: Deactivate CQE during SDHC reset"
This commit is contained in:
commit
0b4030791c
3 changed files with 16 additions and 5 deletions
|
|
@ -299,16 +299,16 @@ static void __cqhci_disable(struct cqhci_host *cq_host)
|
|||
cq_host->activated = false;
|
||||
}
|
||||
|
||||
int cqhci_suspend(struct mmc_host *mmc)
|
||||
int cqhci_deactivate(struct mmc_host *mmc)
|
||||
{
|
||||
struct cqhci_host *cq_host = mmc->cqe_private;
|
||||
|
||||
if (cq_host->enabled)
|
||||
if (cq_host->enabled && cq_host->activated)
|
||||
__cqhci_disable(cq_host);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cqhci_suspend);
|
||||
EXPORT_SYMBOL(cqhci_deactivate);
|
||||
|
||||
int cqhci_resume(struct mmc_host *mmc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -230,7 +230,11 @@ irqreturn_t cqhci_irq(struct mmc_host *mmc, u32 intmask, int cmd_error,
|
|||
int data_error);
|
||||
int cqhci_init(struct cqhci_host *cq_host, struct mmc_host *mmc, bool dma64);
|
||||
struct cqhci_host *cqhci_pltfm_init(struct platform_device *pdev);
|
||||
int cqhci_suspend(struct mmc_host *mmc);
|
||||
int cqhci_deactivate(struct mmc_host *mmc);
|
||||
static inline int cqhci_suspend(struct mmc_host *mmc)
|
||||
{
|
||||
return cqhci_deactivate(mmc);
|
||||
}
|
||||
int cqhci_resume(struct mmc_host *mmc);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3012,6 +3012,13 @@ cleanup:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void sdhci_msm_reset(struct sdhci_host *host, u8 mask)
|
||||
{
|
||||
if ((host->mmc->caps2 & MMC_CAP2_CQE) && (mask & SDHCI_RESET_ALL))
|
||||
cqhci_deactivate(host->mmc);
|
||||
sdhci_reset(host, mask);
|
||||
}
|
||||
|
||||
static const struct sdhci_msm_variant_ops mci_var_ops = {
|
||||
.msm_readl_relaxed = sdhci_msm_mci_variant_readl_relaxed,
|
||||
.msm_writel_relaxed = sdhci_msm_mci_variant_writel_relaxed,
|
||||
|
|
@ -3050,7 +3057,7 @@ static const struct of_device_id sdhci_msm_dt_match[] = {
|
|||
MODULE_DEVICE_TABLE(of, sdhci_msm_dt_match);
|
||||
|
||||
static const struct sdhci_ops sdhci_msm_ops = {
|
||||
.reset = sdhci_reset,
|
||||
.reset = sdhci_msm_reset,
|
||||
.set_clock = sdhci_msm_set_clock,
|
||||
.get_min_clock = sdhci_msm_get_min_clock,
|
||||
.get_max_clock = sdhci_msm_get_max_clock,
|
||||
|
|
|
|||
Loading…
Reference in a new issue