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

Commit 90c6bbfc 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: revert MMC_PM_KEEP_POWER changes related to emmc"

parents 07be7a92 5b05ac87
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -124,12 +124,6 @@ static void mmc_set_erase_size(struct mmc_card *card)
	mmc_init_erase(card);
}

static void add_pm_flag_mmc(struct mmc_card *card, int data)
{
	if (mmc_card_mmc(card))
		card->host->pm_flags |= data;
}

static const struct mmc_fixup mmc_fixups[] = {

	/* avoid HPI for specific cards */
@@ -140,9 +134,6 @@ static const struct mmc_fixup mmc_fixups[] = {
	MMC_FIXUP("MMC16G", CID_MANFID_KINGSTON, CID_OEMID_ANY,
		add_quirk_mmc, MMC_QUIRK_CACHE_DISABLE),

	MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_HYNIX, CID_OEMID_ANY,
		add_pm_flag_mmc, MMC_PM_KEEP_POWER, MMC_V5_0),

	END_FIXUP
};

@@ -444,9 +435,6 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
	 */
	card->ext_csd.rev = ext_csd[EXT_CSD_REV];

	/* fixup device after ext_csd revision field is updated */
	mmc_fixup_device(card, mmc_fixups);

	card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0];
	card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1];
	card->ext_csd.raw_sectors[2] = ext_csd[EXT_CSD_SEC_CNT + 2];
@@ -2353,9 +2341,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
	if (mmc_card_suspended(host->card))
		goto out;

	if (is_suspend)
		host->dev_status = DEV_SUSPENDING;

	if (host->card->cmdq_init) {
		BUG_ON(host->cmdq_ctx.active_reqs);

@@ -2398,11 +2383,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
		mmc_card_set_suspended(host->card);
	}
out:
	if (err)
		host->dev_status = DEV_UNKNOWN;
	else if (is_suspend)
		host->dev_status = DEV_SUSPENDED;

	/* Kick CMDQ thread to process any requests came in while suspending */
	if (host->card->cmdq_init)
		wake_up(&host->cmdq_ctx.wait);
@@ -2556,8 +2536,6 @@ static int _mmc_resume(struct mmc_host *host)
			mmc_hostname(host), __func__, err);

out:
	if (!err)
		host->dev_status = DEV_RESUMED;
	return err;
}

+0 −3
Original line number Diff line number Diff line
@@ -980,9 +980,6 @@ static void mmc_sdio_detect(struct mmc_host *host)
	 */
	err = _mmc_detect_card_removed(host);

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

	mmc_release_host(host);

	/*
+0 −14
Original line number Diff line number Diff line
@@ -3164,19 +3164,6 @@ 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;
}

int sdhci_msm_notify_load(struct sdhci_host *host, enum mmc_load state)
{
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -3729,7 +3716,6 @@ static struct sdhci_ops sdhci_msm_ops = {
	.reset = sdhci_msm_reset,
	.clear_set_dumpregs = sdhci_msm_clear_set_dumpregs,
	.enhanced_strobe_mask = sdhci_msm_enhanced_strobe_mask,
	.detect = sdhci_msm_detect,
	.notify_load = sdhci_msm_notify_load,
	.reset_workaround = sdhci_msm_reset_workaround,
	.init = sdhci_msm_init,
+0 −18
Original line number Diff line number Diff line
@@ -1422,16 +1422,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
	struct mmc_host *mmc = host->mmc;
	u8 pwr = 0;

	/*
	 * Don't disable/re-enable power to the card when running a
	 * suspend/resume sequence and the pm_flags are configured to preserve
	 * card power during suspend.
	 */
	if (mmc_card_keep_power(mmc) &&
	    ((mmc->dev_status == DEV_SUSPENDED && mode == MMC_POWER_UP) ||
	     (mmc->dev_status == DEV_SUSPENDING && mode == MMC_POWER_OFF)))
		return;

	if (!IS_ERR(mmc->supply.vmmc)) {
		spin_unlock_irq(&host->lock);
		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
@@ -2638,13 +2628,6 @@ static void sdhci_card_event(struct mmc_host *mmc)
	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 int sdhci_late_init(struct mmc_host *mmc)
{
	struct sdhci_host *host = mmc_priv(mmc);
@@ -2685,7 +2668,6 @@ static const struct mmc_host_ops sdhci_ops = {
	.disable	= sdhci_disable,
	.notify_load	= sdhci_notify_load,
	.notify_halt	= sdhci_notify_halt,
	.detect		= sdhci_detect,
	.force_err_irq	= sdhci_force_err_irq,
};

+0 −1
Original line number Diff line number Diff line
@@ -332,7 +332,6 @@ struct sdhci_ops {
	int	(*enable_controller_clock)(struct sdhci_host *host);
	void	(*clear_set_dumpregs)(struct sdhci_host *host, bool set);
	void	(*enhanced_strobe_mask)(struct sdhci_host *host, bool set);
	void	(*detect)(struct sdhci_host *host, bool detected);
	int	(*notify_load)(struct sdhci_host *host, enum mmc_load state);
	void	(*reset_workaround)(struct sdhci_host *host, u32 enable);
	void	(*init)(struct sdhci_host *host);
Loading