From patchwork Tue Jun 21 10:07:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 583612 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp1481695mab; Tue, 21 Jun 2022 03:08:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1shBNoKcTZP9zq96maGs6u38TX4awb5/yI2jvfrNGwk6wP+0aApCZPZ89YtGPjDXQ+/CMAf X-Received: by 2002:a62:b514:0:b0:525:1ccd:4506 with SMTP id y20-20020a62b514000000b005251ccd4506mr12358901pfe.8.1655806081773; Tue, 21 Jun 2022 03:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806081; cv=none; d=google.com; s=arc-20160816; b=PrjRllLboVzNIXU81K10xpZ5BSjW+lv6wOsBzFLUhG5U02s/EfYpiF9w/npxfTdG5o 2zZKWjqJTp+7ZDaA2+GbFftVupbR52n1iQxOPp0gVIeMfwxuqFclONCJmn6qQsu2euy7 X3tgTfwHPyyvqY6/cC+xM4n/ClHG88MPqH55BAVnv6Nsg8Gts4BhULOiifUwfFxMnpHd 6HXVUZWp29ADfGZJA+gjV8lDwzc8IrNRSVN6egOqhx7aDFtl8LnGMdP4HO5ED8qTiOIv yPLJZXRGqx7DU8VQfQ8iNNbdtsZhtOXyjUziCvCVj0v7p0WgGT8IKv1b04ssxTIUeF8P 5Ykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UsIQ7csyBJwRcYc0ptEtHopXzRqx4ZG4z/ztYxIySPA=; b=UcaFQg3ElsjHIg8c0ESsyw+eofTlh0kEXSQK+a0rBUtfQCUdCm+jtLvoo81ndoc9j4 uEnMoQd4P12zr7bysuiKjiv9H7mZcGVkbB4Fov41GeZqstghUx4kqA3cPjZEjz56n+Zd 0JnafBddyNwELABdTbAmzDToV3A8g1CuFCVspGCQdOVBEjuLhg7sw3LgvcmojX9a6sLV aRZSGedqNNVcl9VKOg279qtQtLtIFmY4LhVWvBdZsZa8iDvcNe/bCB8qifF1jGVopWqm fTW2n5vx5Ug5r0/+W2v8SOw+Y2pONdKu8sZVBGGvUt+h+NQtLxeuk2KhDT/weww3IoRQ j9xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kQSoGEGh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id v5-20020a62a505000000b005250a05fff7si10788153pfm.50.2022.06.21.03.08.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 03:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kQSoGEGh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 859E683B68; Tue, 21 Jun 2022 12:07:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="kQSoGEGh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 891E7839E9; Tue, 21 Jun 2022 12:07:39 +0200 (CEST) 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 6145883A07 for ; Tue, 21 Jun 2022 12:07:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=lee.jones@linaro.org Received: by mail-wr1-x431.google.com with SMTP id c21so18191573wrb.1 for ; Tue, 21 Jun 2022 03:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UsIQ7csyBJwRcYc0ptEtHopXzRqx4ZG4z/ztYxIySPA=; b=kQSoGEGhuJqeZCNxx/V6uTmv6nB5bjly4VEIBCbzeEonjr8h2TTo7kZgf+D6f6h1WQ pdbKq4IeCNcJz3iQUX9wt1/0A9eyRDbjEX37DJVMearo9wbfWUNebZAqTLZU+R61vvMz jK0AHxAEdgFbdujysS/scCMNLERxuB+0PbxG1PGuWt5NKwp3dBKDF+JTqxP9RX+EPoGp OuWibxQh1cXxhvN7P2IzrM/57W1fNlCOyoYVnDRLJbgml0YSOY1XB9PmkFkoi4OJGKCx PlgsyJhrqbcYiWC+VeK27R65zND8nZ8GksFeRkcV/H0pOpxv3zYYuXX8xTEPvx76CkUc Bqhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UsIQ7csyBJwRcYc0ptEtHopXzRqx4ZG4z/ztYxIySPA=; b=YqM/r4p1kTa9j8+bF+YaC943HIdkOaJmvDBefG2i+X4IjlaVZnJx0kbHIQZ5WA+h9n ZAyb1GB7jhaV8+ELFUhrIznKiq7KLA2zY3ZhS6g1XSGu6ZhfmsHQu/rW9ThcSqo21sc0 YGvK5D4/FTno9R1vYq0xB2DxUgfTcETO4cvqbcU5w2vPA73eQWBH5zuDN2XyZSzGRBdX xQbWk+wDlmUA+/gCLvFWV16ZbRF8DkGjBmGtRTKlul6emibQvEqNJyE1KVCNOmSufhx7 dvBt4U1u4eUVhGMaB01D78CcmBITFT8UjZ/JHIxiGc1lpgtrjSk+sIXVV8m/zQR0yhU/ FUEg== X-Gm-Message-State: AJIora+5DCoixYsp6Q73WbydQY/9Eg7a+Brxjf8sHWHJ8TKkNeyfSsvb TnezMuR/bx142teAMuvgQfyKMT5PX9CkFPTm X-Received: by 2002:a5d:598e:0:b0:218:525b:4743 with SMTP id n14-20020a5d598e000000b00218525b4743mr27143691wri.708.1655806056906; Tue, 21 Jun 2022 03:07:36 -0700 (PDT) Received: from joneslee.c.googlers.com.com (205.215.190.35.bc.googleusercontent.com. [35.190.215.205]) by smtp.gmail.com with ESMTPSA id j19-20020a05600c1c1300b0039c5645c60fsm30368302wms.3.2022.06.21.03.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 03:07:36 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com Cc: cym@rock-chips.com, u-boot@lists.denx.de Subject: [PATCH 2/3] ram: rk3399: Fix faulty frequency change reports Date: Tue, 21 Jun 2022 10:07:28 +0000 Message-Id: <20220621100729.979275-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.37.0.rc0.104.g0611611a94-goog In-Reply-To: <20220621100729.979275-1-lee.jones@linaro.org> References: <20220621100729.979275-1-lee.jones@linaro.org> MIME-Version: 1.0 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 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. Signed-off-by: Lee Jones Reviewed-by: Kever Yang Tested-by: Xavier Drudis Ferran --- 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); }