From patchwork Mon May 10 19:03:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 12249239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04675C433ED for ; Mon, 10 May 2021 19:13:37 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B765561139 for ; Mon, 10 May 2021 19:13:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B765561139 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VZ4vWhR5hI5WgGo1VIYNcusGkdmwvT49TlhxNkLUzOI=; b=NVjNMo934vB7woz8QrYytRcIj eq0cPwI1/yT1G7VgWh+XgXY9JNzK3QaflBkYwr1NO2t3mKoopF7b+wDRjBc/Hzg0QorhQ687pc50L lemeI0LJVXEgPjl6oRPRutYg9OJ/wZGg39cxr4gfsaXE8nGhiZN4TgyTWekPx80uyDKd8stImDXEq F2OVAYvQYTLJinNTdxIQAELb6jJEHlToS0Ul2mQQJNBDosKOAbLD6GP796bffejb+4l4w/6vyV0em oywRRhB7J8hIHPSjGTNY7yX8T9SjJGM4C2Hdrdgr2U37XxhPpjGI7LNZHRzcOOaYI2e3GqhVI1qCE JjvrV9dUw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgBK0-00FVfb-T3; Mon, 10 May 2021 19:12:05 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgBJj-00FVdL-BB for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 19:11:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=rBLhCofWkiH/qfr6eW+kHGXzGa9HhMfcW5k++KDh9+E=; b=no/+K2DiVOVhkD4Il8/bTrtJVO NU7XWiZHzINFYw0HYMHKu4ktzOpM0d36Z4Q0JWMgDAkCTAU72EyTCAdX20wRWl2PzQ6cyTaJX1BFj oNMlS15jaOW0mZkZh+YKtsk+6kI/M+ItAqhxoE4SbMXsF2tU15FOtXMDgsDP2Hr1ikS1+4EZ/T8KA ZTPvR9wzxJ0uIQmhr5m06JpYC0XeZbUVb8a4ISoshJNJ8g/YHFoI9mNFZdmMspDf+yQ4fKhbs4MUO onT4mVzWDRCC9uHNT43iFVvyvbExPPNdqNvPkNpy8jbxoBuPnS84/7nvcyC8xgZ00wpBLYsvVfcXn b3UWdmFA==; Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgBJg-0093i5-MS for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 19:11:45 +0000 Received: by lynxeye.de (Postfix, from userid 501) id ECD09E74270; Mon, 10 May 2021 21:04:05 +0200 (CEST) Received: from astat.fritz.box (a89-183-115-43.net-htp.de [89.183.115.43]) by lynxeye.de (Postfix) with ESMTPA id 1F2F1E74269; Mon, 10 May 2021 21:04:04 +0200 (CEST) From: Lucas Stach To: Ulf Hansson , Adrian Hunter , Haibo Chen Cc: Rob Herring , NXP Linux Team , kernel@pengutronix.de, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps Date: Mon, 10 May 2021 21:03:59 +0200 Message-Id: <20210510190400.105162-2-l.stach@pengutronix.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510190400.105162-1-l.stach@pengutronix.de> References: <20210510190400.105162-1-l.stach@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_121144_889767_C5EC8316 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of having an indirection through the SDHCI layer and emulating a capability bit, that isn't there in hardware, do the same same thing as with HS400_ES and advertise the support for HS400 directly through the MMC caps. Signed-off-by: Lucas Stach Reviewed-by: Haibo Chen --- drivers/mmc/host/sdhci-esdhc-imx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a20459744d21..65a52586db36 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -427,9 +427,6 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) | FIELD_PREP(SDHCI_RETUNING_MODE_MASK, SDHCI_TUNING_MODE_3); - if (imx_data->socdata->flags & ESDHC_FLAG_HS400) - val |= SDHCI_SUPPORT_HS400; - /* * Do not advertise faster UHS modes if there are no * pinctrl states for 100MHz/200MHz. @@ -1603,7 +1600,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; if (imx_data->socdata->flags & ESDHC_FLAG_HS400) - host->quirks2 |= SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; + host->mmc->caps2 |= MMC_CAP2_HS400; if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23) host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN;