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

Commit 447fa26c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: Remove mmc->card check from MGPI design support"

parents a690c666 613b3715
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
 * driver source file
@@ -3188,11 +3189,14 @@ static irqreturn_t sdhci_msm_pwr_irq(int irq, void *data)

	sdhci_msm_clear_pwrctl_status(host, irq_status);

	if (mmc->card && mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
	if (mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
		irq_status & CORE_PWRCTL_BUS_ON) {
		irq_ack = CORE_PWRCTL_BUS_FAIL;
		sdhci_msm_writeb_relaxed(irq_ack, host,
			msm_host_offset->CORE_PWRCTL_CTL);
		spin_lock_irqsave(&host->lock, flags);
		complete(&msm_host->pwr_irq_completion);
		spin_unlock_irqrestore(&host->lock, flags);
		return IRQ_HANDLED;
	}

@@ -3430,7 +3434,7 @@ static void sdhci_msm_check_power_status(struct sdhci_host *host, u32 req_type)
		sdhci_msm_dump_pwr_ctrl_regs(host);
	}

	if (mmc->card && mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
	if (mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
			(req_type & REQ_BUS_ON)) {
		host->pwr = 0;
		sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);