Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761584AbbBJAHn (ORCPT ); Mon, 9 Feb 2015 19:07:43 -0500 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]:44279 "EHLO mail-gw1-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760105AbbBJAHk (ORCPT ); Mon, 9 Feb 2015 19:07:40 -0500 X-IronPort-AV: E=Sophos;i="5.09,547,1418112000"; d="scan'208";a="56882834" From: Scott Branden To: , Ulf Hansson , Chris Ball , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , "Kumar Gala" , Grant Likely CC: Ray Jui , Jonathan Richardson , Corneliu Doban , Dmitry Torokhov , Anatol Pomazao , , , , , Scott Branden Subject: [PATCH 1/4] mmc: sdhci: add quirk for ACMD23 broken Date: Mon, 9 Feb 2015 16:06:28 -0800 Message-ID: <1423526791-29453-2-git-send-email-sbranden@broadcom.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1423526791-29453-1-git-send-email-sbranden@broadcom.com> References: <1423526791-29453-1-git-send-email-sbranden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1933 Lines: 50 Add quirk to handle broken auto-CMD23. Some controllers do not respond after the first auto-CMD23 is issued. This allows CMD23 to still work (mandatory for the faster UHS-I mode) rather than disabling CMD23 entirely via SDHCI_QUIRK2_HOST_NO_CMD23. Signed-off by: Corneliu Doban Signed-off-by: Scott Branden Signed-off-by: Scott Branden --- drivers/mmc/host/sdhci.c | 3 ++- include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index f1a488e..fcf78ab 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3085,7 +3085,8 @@ int sdhci_add_host(struct sdhci_host *host) /* Auto-CMD23 stuff only works in ADMA or PIO. */ if ((host->version >= SDHCI_SPEC_300) && ((host->flags & SDHCI_USE_ADMA) || - !(host->flags & SDHCI_USE_SDMA))) { + !(host->flags & SDHCI_USE_SDMA)) && + !(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { host->flags |= SDHCI_AUTO_CMD23; DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc)); } else { diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index f767a0d..a29e9bb 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -106,6 +106,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) /* Capability register bit-63 indicates HS400 support */ #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) +/* Controller broken with using ACMD23 */ +#define SDHCI_QUIRK2_ACMD23_BROKEN (1<<12) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/