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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B01D2C77B6F for ; Tue, 11 Apr 2023 13:41:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B964283741; Tue, 11 Apr 2023 15:41:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="erf3bxb7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4AEB783741; Tue, 11 Apr 2023 15:41:38 +0200 (CEST) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 020BC80375 for ; Tue, 11 Apr 2023 15:41:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6a3ab0a5822so371033a34.0 for ; Tue, 11 Apr 2023 06:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681220491; x=1683812491; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XDMcLoagAlY6Dqc1qf/LLapkaFyOa+E3dI4E9y9oucc=; b=erf3bxb77wFa9IEQn8uwCUcWatk1HEO86HlvkHWM7c0txWbgb6kgWGiNdfKKUXq2tm oDRToS2l9IzPwxYKTNTsKfpD37vHLD3jI+IN64fCI666xN4VaxO4xZVNcTrXeQFPbvet 4RGNDa4LoCTEFXgTrBBokFvWAmu7/uhsrR7O7zRHl8iGTkSOl0mjVyuZUMf/B60SzNWG Lg/+2ZVU/iUFdYLOrurlsNT79vlZLXWZCpGEtVplhilDVc2RRtcpYo8i3C8QtsrR25eL 12ethraMK/CnmwLYzdbwixdQlVMfAJsF2aUgc1EyiKHB+m7ByX5Vpq5xdhRgzpbHPDQX 9/Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681220491; x=1683812491; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XDMcLoagAlY6Dqc1qf/LLapkaFyOa+E3dI4E9y9oucc=; b=pelU9JbLI+Z5LtC9zy+nKdAZ+Uso/mv+jtXdhpyyDR1mtLdJIiow5P7GQ2gX+RfvKQ pM33G+/XRgfgTV3XPrACIvnIF+MRaIsRlgVXhGwsztwAa2lvzOqQz+4zq2xiDIC4U0m1 hBUz05R+n879I4uBjtstTeYk6R9htso0y6eU/wwDkjCl5Av2me2GrGL4PAnHMc1xJrWl mmFI8Y3CVhEmk/X+26vS0/Iz7MCw4Cff99oDfaF3WACIswbhf//ThP2pMAZqVXYh/U8Z nFgU4YDAm2V2e9yFqNtN9O2TqZU4JHP/W8UmCLhYOr2RhLkiOI/isVgjB+a4Yck9pUb5 eP0w== X-Gm-Message-State: AAQBX9eDx4ZqZGv8WhAmNJLEcezqMM+tq8kR08CHUyw0e7OcGVJ4JE2C LCNQkaIFuOa+BiYr5rQfKDI= X-Google-Smtp-Source: AKy350bnucJw4gSixAcM6YRXxOl3cdTMyr8XA3Op6quq90Gr5VTeNtXQAd+n+AgCsyES/sNATfEm7w== X-Received: by 2002:aca:bc41:0:b0:38b:2ef2:cda2 with SMTP id m62-20020acabc41000000b0038b2ef2cda2mr4031151oif.4.1681220491317; Tue, 11 Apr 2023 06:41:31 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:8571:ecd0:b607:90df]) by smtp.gmail.com with ESMTPSA id v67-20020acade46000000b003646062e83bsm5504347oig.29.2023.04.11.06.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Apr 2023 06:41:30 -0700 (PDT) From: Fabio Estevam To: peng.fan@nxp.com Cc: jh80.chung@samsung.com, aford173@gmail.com, u-boot@lists.denx.de, Fabio Estevam Subject: [PATCH v2] mmc: fsl_esdhc: Do not set UHS_CAPS based on CONFIG_MMC_UHS_SUPPORT Date: Tue, 11 Apr 2023 10:41:25 -0300 Message-Id: <20230411134125.2064478-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Fabio Estevam Since commit 1a7904fdfa7d ("mmc: fsl_esdhc_imx: Use esdhc_soc_data flags to set host caps") the following SD card error is observed on an imx7d-sdb board: U-Boot 2023.04-00652-g487e42f7bc5e (Apr 05 2023 - 22:14:21 -0300) CPU: Freescale i.MX7D rev1.0 1000 MHz (running at 792 MHz) CPU: Commercial temperature grade (0C to 95C) at 35C Reset cause: POR Model: Freescale i.MX7 SabreSD Board Board: i.MX7D SABRESD in non-secure mode DRAM: 1 GiB Core: 100 devices, 19 uclasses, devicetree: separate PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x10 MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... Card did not respond to voltage select! : -110 *** Warning - No block device, using default environment Setting UHS_CAPS only based on the CONFIG_MMC_UHS_SUPPORT config option is not correct because UHS_CAPS has the following definition: #define UHS_CAPS (MMC_CAP(UHS_SDR12) | MMC_CAP(UHS_SDR25) | \ MMC_CAP(UHS_SDR50) | MMC_CAP(UHS_SDR104) | \ MMC_CAP(UHS_DDR50)) and the SD card may not necessarily support all these modes. Remove the UHS_CAPS setting to fix the SD card regression. Fixes: 1a7904fdfa7d ("mmc: fsl_esdhc_imx: Use esdhc_soc_data flags to set host caps") Signed-off-by: Fabio Estevam --- Changes since v1: - Remove setting UHS_CAPS completely. drivers/mmc/fsl_esdhc_imx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 66caf683f7..5e7d9f41b6 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1258,13 +1258,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv, esdhc_write32(®s->tuning_ctrl, val); } - /* - * UHS doesn't have explicit ESDHC flags, so if it's - * not supported, disable it in config. - */ - if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)) - cfg->host_caps |= UHS_CAPS; - if (CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)) { if (priv->flags & ESDHC_FLAG_HS200) cfg->host_caps |= MMC_CAP(MMC_HS_200); -- 2.34.1