From patchwork Mon Apr 4 10:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12800079 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52BD4C433FE for ; Mon, 4 Apr 2022 10:05:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245061AbiDDKHL (ORCPT ); Mon, 4 Apr 2022 06:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238223AbiDDKHL (ORCPT ); Mon, 4 Apr 2022 06:07:11 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA3433C49F for ; Mon, 4 Apr 2022 03:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=HkTDaLDxwM8BJY8EUzc+HapY/fj lXBfai++nFeMBJaw=; b=m1VjyYzdsgjG3PiMU/chEIEjO7bfoUiwBOxf76DhJEl Wgfh/fnNDIXoQP4mvAILU2cCyxukZxRM/ocTC7048A+vio5EIGVnoMJMQwL8xBIZ OMAoJy06/ZPQoUZTGEZ72YPECQ/K7rHZebP5QRU6zGGI9OZmPxlQnF/Sy9UQBtlQ = Received: (qmail 1811774 invoked from network); 4 Apr 2022 12:05:10 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Apr 2022 12:05:10 +0200 X-UD-Smtp-Session: l3s3148p1@+V96Q9HbpqQgAQnoAHNmALK3JllQBOZM From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Yoshihiro Shimoda Subject: [PATCH v2] mmc: renesas_sdhi: special 4tap settings only apply to HS400 Date: Mon, 4 Apr 2022 12:05:08 +0200 Message-Id: <20220404100508.3209-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Previous documentation was vague, so we included SDR104 for slow SDnH clock settings. It turns out now, that it is only needed for HS400. Fixes: bb6d3fa98a41 ("clk: renesas: rcar-gen3: Switch to new SD clock handling") Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- Chages since v1: * fixed typo in the commit message (Shimoda-san) * added review tag drivers/mmc/host/renesas_sdhi_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index fe63548d816d..89d21231ec5f 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -142,9 +142,9 @@ static unsigned int renesas_sdhi_clk_update(struct tmio_mmc_host *host, return clk_get_rate(priv->clk); if (priv->clkh) { + /* HS400 with 4TAP needs different clock settings */ bool use_4tap = priv->quirks && priv->quirks->hs400_4taps; - bool need_slow_clkh = (host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) || - (host->mmc->ios.timing == MMC_TIMING_MMC_HS400); + bool need_slow_clkh = host->mmc->ios.timing == MMC_TIMING_MMC_HS400; clkh_shift = use_4tap && need_slow_clkh ? 1 : 2; ref_clk = priv->clkh; }