Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8d6d142 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: configure MMC_PM_KEEP_POWER for SDIO"

parents 583e8764 5bc2f8ec
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -929,6 +929,9 @@ static void mmc_sdio_detect(struct mmc_host *host)
	 */
	 */
	err = _mmc_detect_card_removed(host);
	err = _mmc_detect_card_removed(host);


	if (host->ops && host->ops->detect)
		host->ops->detect(host, err);

	mmc_release_host(host);
	mmc_release_host(host);


	/*
	/*
+14 −1
Original line number Original line Diff line number Diff line
@@ -2841,6 +2841,19 @@ static void sdhci_msm_clear_set_dumpregs(struct sdhci_host *host, bool set)
	}
	}
}
}


static void sdhci_msm_detect(struct sdhci_host *host, bool detected)
{
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	struct sdhci_msm_host *msm_host = pltfm_host->priv;
	struct mmc_host *mmc = msm_host->mmc;
	struct mmc_card *card = mmc->card;

	if (detected && mmc_card_sdio(card))
		mmc->pm_caps |= MMC_PM_KEEP_POWER;
	else
		mmc->pm_caps &= ~MMC_PM_KEEP_POWER;
}

static struct sdhci_ops sdhci_msm_ops = {
static struct sdhci_ops sdhci_msm_ops = {
	.crypto_engine_cfg = sdhci_msm_ice_cfg,
	.crypto_engine_cfg = sdhci_msm_ice_cfg,
	.crypto_engine_reset = sdhci_msm_ice_reset,
	.crypto_engine_reset = sdhci_msm_ice_reset,
@@ -2860,6 +2873,7 @@ static struct sdhci_ops sdhci_msm_ops = {
	.reset = sdhci_msm_reset,
	.reset = sdhci_msm_reset,
	.clear_set_dumpregs = sdhci_msm_clear_set_dumpregs,
	.clear_set_dumpregs = sdhci_msm_clear_set_dumpregs,
	.enhanced_strobe_mask = sdhci_msm_enhanced_strobe_mask,
	.enhanced_strobe_mask = sdhci_msm_enhanced_strobe_mask,
	.detect = sdhci_msm_detect,
};
};


static void sdhci_set_default_hw_caps(struct sdhci_msm_host *msm_host,
static void sdhci_set_default_hw_caps(struct sdhci_msm_host *msm_host,
@@ -3296,7 +3310,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	msm_host->mmc->caps2 |= MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE;
	msm_host->mmc->caps2 |= MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE;
	msm_host->mmc->caps2 |= MMC_CAP2_HS400_POST_TUNING;
	msm_host->mmc->caps2 |= MMC_CAP2_HS400_POST_TUNING;
	msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE;
	msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE;
	msm_host->mmc->pm_caps |= MMC_PM_KEEP_POWER;


	if (msm_host->pdata->nonremovable)
	if (msm_host->pdata->nonremovable)
		msm_host->mmc->caps |= MMC_CAP_NONREMOVABLE;
		msm_host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+9 −0
Original line number Original line Diff line number Diff line
@@ -2581,6 +2581,14 @@ static void sdhci_card_event(struct mmc_host *mmc)
	spin_unlock_irqrestore(&host->lock, flags);
	spin_unlock_irqrestore(&host->lock, flags);
}
}


static void sdhci_detect(struct mmc_host *mmc, bool detected)
{
	struct sdhci_host *host = mmc_priv(mmc);

	if (host->ops->detect)
		host->ops->detect(host, detected);
}

static const struct mmc_host_ops sdhci_ops = {
static const struct mmc_host_ops sdhci_ops = {
	.pre_req	= sdhci_pre_req,
	.pre_req	= sdhci_pre_req,
	.post_req	= sdhci_post_req,
	.post_req	= sdhci_post_req,
@@ -2599,6 +2607,7 @@ static const struct mmc_host_ops sdhci_ops = {
	.disable	= sdhci_disable,
	.disable	= sdhci_disable,
	.notify_load	= sdhci_notify_load,
	.notify_load	= sdhci_notify_load,
	.notify_halt	= sdhci_notify_halt,
	.notify_halt	= sdhci_notify_halt,
	.detect		= sdhci_detect,
};
};


/*****************************************************************************\
/*****************************************************************************\
+1 −0
Original line number Original line Diff line number Diff line
@@ -329,6 +329,7 @@ struct sdhci_ops {
	int	(*enable_controller_clock)(struct sdhci_host *host);
	int	(*enable_controller_clock)(struct sdhci_host *host);
	void	(*clear_set_dumpregs)(struct sdhci_host *host, bool set);
	void	(*clear_set_dumpregs)(struct sdhci_host *host, bool set);
	void	(*enhanced_strobe_mask)(struct sdhci_host *host, bool set);
	void	(*enhanced_strobe_mask)(struct sdhci_host *host, bool set);
	void	(*detect)(struct sdhci_host *host, bool detected);
};
};


#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
+1 −0
Original line number Original line Diff line number Diff line
@@ -175,6 +175,7 @@ struct mmc_host_ops {
	unsigned long (*get_min_frequency)(struct mmc_host *host);
	unsigned long (*get_min_frequency)(struct mmc_host *host);
	int	(*notify_load)(struct mmc_host *, enum mmc_load);
	int	(*notify_load)(struct mmc_host *, enum mmc_load);
	void	(*notify_halt)(struct mmc_host *mmc, bool halt);
	void	(*notify_halt)(struct mmc_host *mmc, bool halt);
	void	(*detect)(struct mmc_host *host, bool detected);
};
};


struct mmc_card;
struct mmc_card;