[{"id":3676686,"web_url":"http://patchwork.ozlabs.org/comment/3676686/","msgid":"<adzaOC0mgP5vfZUr@sumit-xelite>","list_archive_url":null,"date":"2026-04-13T11:57:44","subject":"Re: [PATCH] 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 09, 2026 at 12:36:20PM +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. Hence, try to get max-frequency if clock-frequency is not\n> present.\n> \n> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>\n> ---\n>  drivers/mmc/msm_sdhci.c | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c\n> index 66f3cf2de4f..2e6120f18ff 100644\n> --- a/drivers/mmc/msm_sdhci.c\n> +++ b/drivers/mmc/msm_sdhci.c\n> @@ -71,8 +71,8 @@ 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, \"clock-frequency\", (uint *)(&clk_rate)) &&\n> +\t    ofnode_read_u32(node, \"max-frequency\", (uint *)(&clk_rate)))\n>  \t\tclk_rate = 201500000;\n\nLooks like clock-frequency is just a leftover from legacy DT nodes. Now\non Qcom platforms, upstream DT is used. So let's just add max-frequency\ncheck compliant with DT bindings and drop check for clock-frequency.\n\n-Sumit\n\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=BQ/Oi9EZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=\"BQ/Oi9EZ\";\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\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\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 4fvQs33CLCz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 21:57:59 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 47283839DF;\n\tMon, 13 Apr 2026 13:57:56 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id F2EA783F75; Mon, 13 Apr 2026 13:57:54 +0200 (CEST)","from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254])\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 F29DA839D5\n for <u-boot@lists.denx.de>; Mon, 13 Apr 2026 13:57:52 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id C3A326091C;\n Mon, 13 Apr 2026 11:57:51 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 09783C19421;\n Mon, 13 Apr 2026 11:57:47 +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.6 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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,\n RCVD_IN_VALIDITY_RPBL_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=1776081471;\n bh=P+tgrOGL4d7TqY0KMVyxOlhdrMleRYqb3K+VCwx9+yc=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=BQ/Oi9EZR4zidCTjZV0Pk9aj4pfnKoPCDJu9HHQPU0IAVKI1GJcdBEfs2WK9cpsj3\n XlhFDV+Dv0fY+bAcEkZXAUrJ7/QVJzaWi340EFh9oYKENCSdXds5lCC4LcWa0mu/gd\n 7f+cWO2xgN7JHCpRU01rU3UNlNaL8/rEh3/0BYGTJr017YEkXrX/3U4+jOOYzA1LiF\n 5SGxt7j+PdxbYwnpqqn+hB0MVxdgKa6/Juli/AgQBLsHbIIw+zSqpDUxT4F23rs4/n\n lNX7/sxBerC6hqHYSD8LvwRKOD7b/3tIOrr3hRkzBWAvG4p8K0yH/LelhaQrw68daw\n xrOHnZ9qoMz0Q==","Date":"Mon, 13 Apr 2026 17:27:44 +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, patrice.chotard@foss.st.com,\n u-boot-qcom@groups.io, u-boot@lists.denx.de","Subject":"Re: [PATCH] mmc: msm_sdhci: Use max-frequency to get clock rate","Message-ID":"<adzaOC0mgP5vfZUr@sumit-xelite>","References":"<20260409070620.3655875-1-varadarajan.narayanan@oss.qualcomm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260409070620.3655875-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"}}]