From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71975EEB568 for ; Fri, 8 Sep 2023 18:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=alvTmfuClIbcVlIYDLc4a0Qm4F7B5U+lQqQT/bw8Ojc=; b=mfiMgXlhSRP4gD I/FHd6O6Z4hGqXRW3347VsMOKxQB2NS2xO504Sgv9/+HoB1R76C+uxgdzvbbMdgPGLxKb+Sf0cwEd dRXm7tieFhyFTtug7cd+/eF5tApy3/Fi/WH4+WlGvVxJGaoZrWtRbVS4Bt2SzGyxJCWoxMuUd+YY+ hRSKPDXOys12rDUzGQfV+MEr7iNOFamCS3GRvKsaYHZreZ+cFulzGkTTt1qkWmGuwD7G/+d+ASmwD Vw7EkTcZsCxFYg3A5Mg9lpbEbNex7aDYVORYcqbEbRPiPeSNMFD7THhWEyeBn66z//CHwV7zdWxLT 6x7VR7Q3XRL082IkglMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qeg58-00EGpP-1l; Fri, 08 Sep 2023 18:19:50 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeg55-00EGoq-2N for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2023 18:19:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0AB60614BF; Fri, 8 Sep 2023 18:19:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67757C433CA; Fri, 8 Sep 2023 18:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694197186; bh=hRhh3HaorsxEtdTUSgBOtfGJ2GPnPRRJrDOoN+oquZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pfFuSDRvMMLOMSjmxPhwjT0dlg1hCywPTVUHQmzGFXWLTN1zGB6BS0Dqh0bT6XmRy ox5XBNdHZz4j3d4vBJLKUA7ylcBUpvSLEpBJpjeLsYYXIYLxKv6vZ3A+KObV0Kutp8 GchLDDYyS8XGIFhahAOaOlLU3z4sX6GiD+X30kEfaP/uQaknHYXBQfWJ8dLWwjL8bA zZqzSlixlYS9K4Nmfif8I67lSGe56xyxkZnaLJOkMOLS3c1/SMUoeElgNTW+WSfajs XzdcvFTO+nfvellrXQnNY9GZ16gwKjHspbEaPTyyWXKAirhaXcBVve0psztMV+1gPz DzwDETu3wWm0Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Giulio Benetti , Jim Reinhart , James Autry , Matthew Maron , Haibo Chen , Adrian Hunter , Ulf Hansson , Sasha Levin , shawnguo@kernel.org, linux-mmc@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.15 09/15] mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 Date: Fri, 8 Sep 2023 14:19:12 -0400 Message-Id: <20230908181920.3460520-9-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230908181920.3460520-1-sashal@kernel.org> References: <20230908181920.3460520-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.131 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230908_111947_818148_E9C30343 X-CRM114-Status: GOOD ( 14.25 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Giulio Benetti [ Upstream commit 5ae4b0d8875caa44946e579420c7fd5740d58653 ] Errata ERR010450 only shows up if voltage is 1.8V, but if the device is supplied by 3v3 the errata can be ignored. So let's check for if quirk SDHCI_QUIRK2_NO_1_8_V is defined or not before limiting the frequency. Cc: Jim Reinhart Cc: James Autry Cc: Matthew Maron Signed-off-by: Giulio Benetti Acked-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230811214853.8623-1-giulio.benetti@benettiengineering.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-esdhc-imx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a6aa33dcd2a2e..d8a4080712365 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -171,8 +171,8 @@ #define ESDHC_FLAG_HS400 BIT(9) /* * The IP has errata ERR010450 - * uSDHC: Due to the I/O timing limit, for SDR mode, SD card clock can't - * exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz. + * uSDHC: At 1.8V due to the I/O timing limit, for SDR mode, SD card + * clock can't exceed 150MHz, for DDR mode, SD card clock can't exceed 45MHz. */ #define ESDHC_FLAG_ERR010450 BIT(10) /* The IP supports HS400ES mode */ @@ -917,7 +917,8 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host, | ESDHC_CLOCK_MASK); sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); - if (imx_data->socdata->flags & ESDHC_FLAG_ERR010450) { + if ((imx_data->socdata->flags & ESDHC_FLAG_ERR010450) && + (!(host->quirks2 & SDHCI_QUIRK2_NO_1_8_V))) { unsigned int max_clock; max_clock = imx_data->is_ddr ? 45000000 : 150000000; -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel