From mboxrd@z Thu Jan 1 00:00:00 1970 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 ABEB4C43334 for ; Mon, 4 Jul 2022 10:00:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9CF3D83A2A; Mon, 4 Jul 2022 12:00:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7FA0082102; Mon, 4 Jul 2022 12:00:25 +0200 (CEST) Received: from mx1.tinet.cat (mx1.dipta.cat [195.76.233.59]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0EC67844C7 for ; Mon, 4 Jul 2022 12:00:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=tinet.cat Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xdrudis@tinet.cat X-ASG-Debug-ID: 1656928816-12aaf258c3152100001-4l7tJC Received: from smtp01.tinet.cat (smtp.tinet.org [195.77.216.131]) by mx1.tinet.cat with ESMTP id sBds1V9x207dv7PU; Mon, 04 Jul 2022 12:00:16 +0200 (CEST) X-Barracuda-Envelope-From: xdrudis@tinet.cat X-Barracuda-Effective-Source-IP: smtp.tinet.org[195.77.216.131] X-Barracuda-Apparent-Source-IP: 195.77.216.131 Received: from begut (50.red-79-152-182.dynamicip.rima-tde.net [79.152.182.50]) by smtp01.tinet.cat (Postfix) with ESMTPSA id 77DCC606060A; Mon, 4 Jul 2022 12:00:16 +0200 (CEST) Date: Mon, 4 Jul 2022 12:00:15 +0200 From: Xavier Drudis Ferran To: Lee Jones Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, cym@rock-chips.com, u-boot@lists.denx.de Subject: Re: [PATCH 2/3] ram: rk3399: Fix faulty frequency change reports Message-ID: <20220704100015.GC1912@begut> X-ASG-Orig-Subj: Re: [PATCH 2/3] ram: rk3399: Fix faulty frequency change reports References: <20220621100729.979275-1-lee.jones@linaro.org> <20220621100729.979275-2-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220621100729.979275-2-lee.jones@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Barracuda-Connect: smtp.tinet.org[195.77.216.131] X-Barracuda-Start-Time: 1656928816 X-Barracuda-URL: https://webmail.tinet.cat:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1425 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.8873 1.0000 3.0919 X-Barracuda-Spam-Score: 3.59 X-Barracuda-Spam-Status: No, SCORE=3.59 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=6.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.99145 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M 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.6 at phobos.denx.de X-Virus-Status: Clean El Tue, Jun 21, 2022 at 10:07:28AM +0000, Lee Jones deia: > Frequency changes to 400MHz are presently reported as: > > lpddr4_set_rate_0: change freq to 400000000 mhz 0, 1 > > This is obviously wrong by 6 orders of magnitude. > > Ensure frequency changes are reported accurately. > Not obvious to me what "mhz" means (mHz? MHz? Hz?) and so not obvious to me by how many orders of magnitude it was wrong but in any case now the message is correct and clear. Tested-by: Xavier Drudis Ferran > Signed-off-by: Lee Jones > --- > drivers/ram/rockchip/sdram_rk3399.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c > index 0af0fa9e7b..34d6c93f95 100644 > --- a/drivers/ram/rockchip/sdram_rk3399.c > +++ b/drivers/ram/rockchip/sdram_rk3399.c > @@ -2552,8 +2552,8 @@ static int lpddr4_set_rate(struct dram_info *dram, > dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq); > > if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) > - printf("%s: change freq to %d mhz %d, %d\n", __func__, > - dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq, > + printf("%s: change freq to %dMHz %d, %d\n", __func__, > + dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq / MHz, > ctl_fn, phy_fn); > } > > -- > 2.37.0.rc0.104.g0611611a94-goog >