[{"id":3679391,"web_url":"http://patchwork.ozlabs.org/comment/3679391/","msgid":"<aeYcrW_rJ_ehVYb7@sumit-xelite>","list_archive_url":null,"date":"2026-04-20T12:31:41","subject":"Re: [PATCH v2] mmc: msm_sdhci: Use max-frequency to get clock rate","submitter":{"id":90400,"url":"http://patchwork.ozlabs.org/api/people/90400/","name":"Sumit Garg","email":"sumit.garg@kernel.org"},"content":"On Thu, Apr 16, 2026 at 10:41:51AM +0530, Varadarajan Narayanan wrote:\n> msm_sdc_clk_init() uses clock-frequency to get the clock rate for SDC\n> clocks. However, the DT files seem to use max-frequency for the same.\n> Since msm_sdc_clk_init() doesn't find clock-frequency in the DT, it sets\n> 201500000 as the clock rate and this results in timeout errors on IPQ\n> platforms.\n> \n> Additionally, clock-frequency is not DT bindings compliant. Hence, get\n> clock rate using DT bindings compliant max-frequency.\n> \n> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>\n> ---\n>  drivers/mmc/msm_sdhci.c | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n\nReviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>\n\n-Sumit\n\n> \n> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c\n> index 66f3cf2de4f..aaa87923604 100644\n> --- a/drivers/mmc/msm_sdhci.c\n> +++ b/drivers/mmc/msm_sdhci.c\n> @@ -71,8 +71,7 @@ static int msm_sdc_clk_init(struct udevice *dev)\n>  \n>  \tvar_info = (void *)dev_get_driver_data(dev);\n>  \n> -\tret = ofnode_read_u32(node, \"clock-frequency\", (uint *)(&clk_rate));\n> -\tif (ret)\n> +\tif (ofnode_read_u32(node, \"max-frequency\", (uint *)(&clk_rate)))\n>  \t\tclk_rate = 201500000;\n>  \n>  \tret = clk_get_bulk(dev, &prv->clks);\n> -- \n> 2.34.1\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=tdayIP3m;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"tdayIP3m\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sumit.garg@kernel.org"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzlH16dWSz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 22:31:57 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 685D184312;\n\tMon, 20 Apr 2026 14:31:53 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 3EDAE8431E; Mon, 20 Apr 2026 14:31:52 +0200 (CEST)","from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id C53A384366\n for <u-boot@lists.denx.de>; Mon, 20 Apr 2026 14:31:49 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id 3149843E8C;\n Mon, 20 Apr 2026 12:31:48 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id B8464C2BCB6;\n Mon, 20 Apr 2026 12:31:44 +0000 (UTC)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1776688308;\n bh=dg4spvgBzBYTcw9BQXGS9eqVUzmbVXv+nkpyyWt23fY=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=tdayIP3m2grCJvTx6v2NM6XdwXzitT7OxPAdfbaM+kStuCMDP9pEab6uuhsa3X7et\n eCcJQp6UcgQrclijXUaYDXhBvngqXnmc8Fb0yV8JD/0VmiuPQ/RIEa3bVpbgZnEcCm\n T+i9HU+LvKj4oVZTHBfXEOM8zxLxzG1mirj+cl5CYmzuz19DzMJtA/rhBuZQpHOnsJ\n LfiyJXf6o8Ua5nLd+3KvYsrz5AWtC0z0qMbFEbWZBvyIvAP2sZt419NJvSS5P2H/bJ\n xXviJA8Xv6UUeq+wAdg1fZuP/RwuquN4y+b4hy+ErPVXj7rR/KRySV+W8WnpRj35yZ\n XZLIaNan8nSag==","Date":"Mon, 20 Apr 2026 18:01:41 +0530","From":"Sumit Garg <sumit.garg@kernel.org>","To":"Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>","Cc":"casey.connolly@linaro.org, neil.armstrong@linaro.org, peng.fan@nxp.com,\n jh80.chung@samsung.com, trini@konsulko.com,\n loic.poulain@oss.qualcomm.com, u-boot-qcom@groups.io, u-boot@lists.denx.de","Subject":"Re: [PATCH v2] mmc: msm_sdhci: Use max-frequency to get clock rate","Message-ID":"<aeYcrW_rJ_ehVYb7@sumit-xelite>","References":"<20260416051151.2825532-1-varadarajan.narayanan@oss.qualcomm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260416051151.2825532-1-varadarajan.narayanan@oss.qualcomm.com>","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]