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 C4C46EEB56C for ; Fri, 8 Sep 2023 19:31:30 +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=kLWmD+DK2juWgdHWzj9E6+yFPL2bGqaaCsGaqSxRaI8=; b=A6X/VrshOat8jr Jito6ZggRfP6eovHl/R5xTejePfIZH3qsGQ6PCbLM3CbI60wK5ESR+HhTKW9QZt897LX9gkzfzpiH Wf59LU0uUbaH9DadBNaxu0OAClTy/IPIHEsnUIxadKUAz5J2JA3N1/B6GlOLaHchZMke5B8SBzFWg 9SxFjC1ryaan5mLIwivUTXJKNwUFEG1uNyBK22kj+enYaldmqmcCwRy1lMSoo81kSglpOnFl6MlzW bOYcLKE05aZuEZE5+zmrwD+Gg+pVoRm5B0rYVwhv4dyY5HUKIqV04NVtHrv4+qYS5WI/qJEEvAxjF KLeWaeX4r0l5Lr3i5A/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qehCQ-00EMDf-0j; Fri, 08 Sep 2023 19:31:26 +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 1qeg5o-00EGyf-0e for linux-arm-kernel@lists.infradead.org; Fri, 08 Sep 2023 18:20:33 +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 AC1AA61538; Fri, 8 Sep 2023 18:20:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECF67C433CD; Fri, 8 Sep 2023 18:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694197231; bh=TKR08tZvvKh54izKRJ7OHq5T1M1CFFEInQWOm7ewHBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PBulZfkPIksWGDYA6FBNTyp8WmleMz1qE8zzq7Zd7GbrldpFNAiDAopY3yhPABHBV TVghF+6PpQQzugjmmMH2XIuohcz9zSSYfgN8AEc1wbdBgNyatehS1AdGVqzEWMFyF8 BlL414zoQ+uL/ea69RB5GFaSawWEETgiFe9dWRVGrLxMt2bPOCSUzIh6buWUWeBf9f +LSQGEGT4Ey/mgu8ykkE4hpeSHoKxq7jZRoAdUaKPkZjJcWNyruSQvVotmGn4lsj// 2pTRpoR4qiX8CbmnPML40oU4UtzKk1J6WnSeLV/nBqB5Z3Fc0JWEFCznlWFeNT6S3u ilnQqVl4MR+gQ== 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-imx@nxp.com, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 09/14] mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 Date: Fri, 8 Sep 2023 14:19:56 -0400 Message-Id: <20230908182003.3460721-9-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230908182003.3460721-1-sashal@kernel.org> References: <20230908182003.3460721-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.194 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230908_112032_278755_A2A3651B X-CRM114-Status: GOOD ( 14.04 ) 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 70f388f83485c..b030f657e2534 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -166,8 +166,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 */ @@ -873,7 +873,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