[2/2] mmc: sdhci-pci: Get rid of glk_cqe_enable()
diff mbox

Message ID 1518616664-14342-3-git-send-email-adrian.hunter@intel.com
State New
Headers show

Commit Message

Adrian Hunter Feb. 14, 2018, 1:57 p.m. UTC
Now that tuning no longer leaves the Buffer Read Enable bit set (refer
intel_execute_tuning()), glk_cqe_enable() is no longer needed. Get rid of
it.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-pci-core.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

Comments

Ulf Hansson Feb. 27, 2018, 11:27 a.m. UTC | #1
On 14 February 2018 at 14:57, Adrian Hunter <adrian.hunter@intel.com> wrote:
> Now that tuning no longer leaves the Buffer Read Enable bit set (refer
> intel_execute_tuning()), glk_cqe_enable() is no longer needed. Get rid of
> it.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-pci-core.c | 20 +-------------------
>  1 file changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index ba725580e944..bd6ee968bcd9 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -719,26 +719,8 @@ static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
>         return ret;
>  }
>
> -static void glk_cqe_enable(struct mmc_host *mmc)
> -{
> -       struct sdhci_host *host = mmc_priv(mmc);
> -       u32 reg;
> -
> -       /*
> -        * CQE gets stuck if it sees Buffer Read Enable bit set, which can be
> -        * the case after tuning, so ensure the buffer is drained.
> -        */
> -       reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
> -       while (reg & SDHCI_DATA_AVAILABLE) {
> -               sdhci_readl(host, SDHCI_BUFFER);
> -               reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
> -       }
> -
> -       sdhci_cqe_enable(mmc);
> -}
> -
>  static const struct cqhci_host_ops glk_cqhci_ops = {
> -       .enable         = glk_cqe_enable,
> +       .enable         = sdhci_cqe_enable,
>         .disable        = sdhci_cqe_disable,
>         .dumpregs       = sdhci_pci_dumpregs,
>  };
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index ba725580e944..bd6ee968bcd9 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -719,26 +719,8 @@  static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
 	return ret;
 }
 
-static void glk_cqe_enable(struct mmc_host *mmc)
-{
-	struct sdhci_host *host = mmc_priv(mmc);
-	u32 reg;
-
-	/*
-	 * CQE gets stuck if it sees Buffer Read Enable bit set, which can be
-	 * the case after tuning, so ensure the buffer is drained.
-	 */
-	reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
-	while (reg & SDHCI_DATA_AVAILABLE) {
-		sdhci_readl(host, SDHCI_BUFFER);
-		reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
-	}
-
-	sdhci_cqe_enable(mmc);
-}
-
 static const struct cqhci_host_ops glk_cqhci_ops = {
-	.enable		= glk_cqe_enable,
+	.enable		= sdhci_cqe_enable,
 	.disable	= sdhci_cqe_disable,
 	.dumpregs	= sdhci_pci_dumpregs,
 };