Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1477171rwj; Sun, 18 Dec 2022 08:58:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf4OP7vdGEfvNU/jOrUCMPSU95A+r+vWZVVIFc+9m2UAAaQOp+t6vtpPkJ73rAH1mZTaNUh1 X-Received: by 2002:a17:906:7a5b:b0:7c0:e5c6:2a6d with SMTP id i27-20020a1709067a5b00b007c0e5c62a6dmr31758227ejo.39.1671382708592; Sun, 18 Dec 2022 08:58:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671382708; cv=none; d=google.com; s=arc-20160816; b=gQhPaZnCH/c7cTBgMHw05BWtk/YtA6ezm09XjMhjG8jTfLM4KKtBA09lvcDRAG3fEl J0gr/rqkT2z9LN1hePKJ8sPMg4cR6FLAgvT30Q7/56w8NN7onzqz+EWicBw5HovuD6LD PAgB/8YON26U/ZeEoU94TvSaLFU9lAsSsiFlw8BMAxAZvMlzyrKW8vAU7oGl2DDsajuy eegB6cxBxa7ObYFvLjjb+/Bba7PXWnA8w+CkyM6DkDq4oqkMdpNeYJx9dP6eDdCc+iwJ icFdx92945bcFUW51YMXECu9vRLNjRnsp4rr06z7xUGroAwAPbj999PGL1mn7Nd00TKY oXyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=euBwFr18FXmAYq01cfCs6aU4albYHLsPoA6yIbWm+nU=; b=WIW9uP8lQl4nGr71g0yi7gvhQpAisLxmLGCFBowR5RLhWsSu3m7MH5M+HhkYOd7IYE 4NnM9+j/7cwlu8mR5sfNltGekIEI/YzDOBlXV20Juo8rpTzoi/a8miXJdaSLzkdLl++F LWQguM6RFd6aVm0q+SB5nUATw8dB99KuRwozP8NRroJWjCqwYVRlYtLQn6G4cZvq6p2g OGbGj/1aQcyHKvTBKUVbT6t2vDYa0TcYFhTA5IwagKUUBmGAcR01ynFnbE35HpXaExmZ jdzlM2ak4wlWkAANcXY4OBmXnjNIKDe1PWrMHqtLNa1A7W5lyZ1SGpdq4vVaJGCNZmTq YX2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N4rJrZ2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs16-20020a1709073e9000b00810f771241fsi2169836ejc.62.2022.12.18.08.58.12; Sun, 18 Dec 2022 08:58:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N4rJrZ2P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbiLRQpZ (ORCPT + 70 others); Sun, 18 Dec 2022 11:45:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbiLRQok (ORCPT ); Sun, 18 Dec 2022 11:44:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A07D633B; Sun, 18 Dec 2022 08:15:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B670060DD3; Sun, 18 Dec 2022 16:15:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 603AAC433EF; Sun, 18 Dec 2022 16:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671380150; bh=UlqfCetC9lVeUfrUiYyJXP/Y9giYq4G5Q9ClWpdr7bE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N4rJrZ2PlVOtGoRH0EtHO8DRNe1tXqHIqo+NDz8WvUtShBDCxKkVp4yrVEtW5bZNq 0ySCa0/SqGDHEukBlNgbrDjTA0a8Vv5pJ1964blXV+7mOL4IBRZs1INCZrZzpO1hU0 OZt9r9ALX0uzX8BaTCAqTnODw8wsEoqdiHO401wV2PZy5hjvowVliFBwfVWtVqPmY4 tFt3E2cRhEtFMHeLJh/Y58RS+P5SkPlRJg7ofn1McKFZPnvLYhXBdAJhVBEi1opBRM fbP8cwuSdPv6VfCXRtMFbVi+m2CUSpkKS87eZuuG9J7hD/Lr4MtbRTIH7EqFVqj+1z YK4I1ucfdpJ8Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wolfram Sang , Yoshihiro Shimoda , Ulf Hansson , Sasha Levin , linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 44/46] mmc: renesas_sdhi: better reset from HS400 mode Date: Sun, 18 Dec 2022 11:12:42 -0500 Message-Id: <20221218161244.930785-44-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221218161244.930785-1-sashal@kernel.org> References: <20221218161244.930785-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wolfram Sang [ Upstream commit 0da69dd2155019ed4c444ede0e79ce7a4a6af627 ] Up to now, HS400 adjustment mode was only disabled on soft reset when a calibration table was in use. It is safer, though, to disable it as soon as the instance has an adjustment related quirk set, i.e. bad taps or a calibration table. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20221120113457.42010-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/renesas_sdhi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 387f2a4f693a..3fa00df34b1e 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -520,7 +520,7 @@ static void renesas_sdhi_reset_hs400_mode(struct tmio_mmc_host *host, SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL) & sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2)); - if (priv->adjust_hs400_calib_table) + if (priv->quirks && (priv->quirks->hs400_calib_table || priv->quirks->hs400_bad_taps)) renesas_sdhi_adjust_hs400_mode_disable(host); sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, CLK_CTL_SCLKEN | -- 2.35.1