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 F35E3EEB560 for ; Fri, 8 Sep 2023 18:19:25 +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=Dmt19ZPc7WbYp7pPbpI2phm4jgS91FLIkfFwFz+yzIs=; b=2ZXc2Ox2Nzm+dc WCqM8JVWZ7LvhNjq7o1MVBdp8DwQNqsHm+cP8QU01HKFFEwzszgv8Ory/taShrRNvlwzA+Ss4ZgDE XbtKMNIcIYutUBD+xhw8/pioHS2OBQlwUguTnbqDpu5dCmBquU9pBe4tVBGYXJ4Yk8Rkzv0lzSs8Q NzK1jR2jWfdPB3Qf2bVRGMbftcYIl4s01w9vA3I9cdWQljXVC6GHtyf1J+CMDQtw+Mw0FzogAf/1V ttjockwsKR4cBlYTGKxCCoQ54x2s9YffPlgv7koTVSnwhGOTfE9s0nIftSsQheS8MkSR6KZ1W8PqN vpYMwmuU2M8HgaxrYLpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qeg4P-00EGeh-0g; Fri, 08 Sep 2023 18:19:05 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeg4N-00EGdj-38 for linux-arm-kernel@bombadil.infradead.org; Fri, 08 Sep 2023 18:19:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=4IKz4pbIsRu97Ja+CsbpD5eHFDDg3zlEKw6/ZClLc7U=; b=PyrRSBdrmrK6BFHuwAMLduZuax yh45MGNPEGVrQSnh9iEmVvKqjksZNaB0hP52VhhOKT+TW9O4jUYQ2uDKZ/sWm7G4/EJsPTfIfMsie SsgzCvnYBIaRKDwaGpVcKWFvAaEx4JLrHv0B7RwP8k/6/BvR/+n+EfI+J5qBhGGimVcAl19abzRiJ VdtKlu+uktnSp0+fQDeHApNlbm3jBpUSPgL2+QTq0QFhvMHb4dBSmDqULMYk2ZvUb37ViJq5nSVap 8Ue4qiJ/MRXCM8EOFH6BBvgg8A+OgDJS9E5RTvs09clfqdOJXuTXP9SrIjs6x/OnIFDOoi0K56FXY iv4ZOgcA==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qeg4I-002fg8-1j for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2023 18:19:02 +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 BFD5461248; Fri, 8 Sep 2023 18:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1A92C433BF; Fri, 8 Sep 2023 18:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694197138; bh=QBx4ydYdcm40KVffiDz8LdCzAMf8Om1VHJKQEStTHYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/d+FFtcrQbvvzsHL9i9vvI7IxuEODhDtsoMdGt4chbfpsW4+drcby9ixwU5ggQ5U /Ldox1cKfdQpHuQu70A8Wyaij0eeQX9dQQdwf7omZVRJ+nn8pUrOkcCpUPxesI1a87 j3IG6tbDmUwmMpOVSbdyjcUzL2yVtX8QyWRVPAanI715J1Q3u94uEtTScWjXKKqiyu I6jhaDq5wmb6uuXD+aKt/G6oMfx+nsJkNupkzJSDf6NolVEPTZEqTl3coka1Bd+V3k T+yYlouRDHGfBMEYS2jKCsmU+5+uN/Q3TNT93+uGYbmVu86IvWl08scG5eLLT2ATSv +aZZKTq1b20bA== 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 6.1 17/26] mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 Date: Fri, 8 Sep 2023 14:17:55 -0400 Message-Id: <20230908181806.3460164-17-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230908181806.3460164-1-sashal@kernel.org> References: <20230908181806.3460164-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230908_191900_184428_3D60F93A X-CRM114-Status: GOOD ( 13.99 ) 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 b63cf1f9e8fb9..3c7b32c0d3f3f 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 */ @@ -932,7 +932,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