194 lines
8.3 KiB
Diff
194 lines
8.3 KiB
Diff
From patchwork Sun Oct 6 16:28:13 2019
|
|
Content-Type: text/plain; charset="utf-8"
|
|
MIME-Version: 1.0
|
|
Content-Transfer-Encoding: 7bit
|
|
X-Patchwork-Submitter: Simon South <simon@simonsouth.net>
|
|
X-Patchwork-Id: 1172554
|
|
Return-Path: <u-boot-bounces@lists.denx.de>
|
|
X-Original-To: incoming@patchwork.ozlabs.org
|
|
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
|
|
Authentication-Results: ozlabs.org;
|
|
spf=none (mailfrom) smtp.mailfrom=lists.denx.de
|
|
(client-ip=81.169.180.215; helo=lists.denx.de;
|
|
envelope-from=u-boot-bounces@lists.denx.de;
|
|
receiver=<UNKNOWN>)
|
|
Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none)
|
|
header.from=simonsouth.net
|
|
Received: from lists.denx.de (dione.denx.de [81.169.180.215])
|
|
by ozlabs.org (Postfix) with ESMTP id 46mTcR2S2Xz9sN1
|
|
for <incoming@patchwork.ozlabs.org>;
|
|
Mon, 7 Oct 2019 03:30:31 +1100 (AEDT)
|
|
Received: by lists.denx.de (Postfix, from userid 105)
|
|
id CD03BC21EEB; Sun, 6 Oct 2019 16:30:28 +0000 (UTC)
|
|
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de
|
|
X-Spam-Level:
|
|
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable
|
|
autolearn_force=no version=3.4.0
|
|
Received: from lists.denx.de (localhost [IPv6:::1])
|
|
by lists.denx.de (Postfix) with ESMTP id 60E00C21DDC;
|
|
Sun, 6 Oct 2019 16:30:27 +0000 (UTC)
|
|
Received: by lists.denx.de (Postfix, from userid 105)
|
|
id 3DFA2C21EBF; Sun, 6 Oct 2019 16:30:16 +0000 (UTC)
|
|
Received: from mailout.easymail.ca (mailout.easymail.ca [64.68.200.34])
|
|
by lists.denx.de (Postfix) with ESMTPS id B8197C21F19
|
|
for <u-boot@lists.denx.de>; Sun, 6 Oct 2019 16:30:15 +0000 (UTC)
|
|
Received: from localhost (localhost [127.0.0.1])
|
|
by mailout.easymail.ca (Postfix) with ESMTP id D93E0210A0;
|
|
Sun, 6 Oct 2019 16:30:14 +0000 (UTC)
|
|
X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn
|
|
Received: from mailout.easymail.ca ([127.0.0.1])
|
|
by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new,
|
|
port 10024)
|
|
with ESMTP id 6U7MQUmWS2BA; Sun, 6 Oct 2019 16:30:14 +0000 (UTC)
|
|
Received: from localhost.localdomain (unknown [108.162.141.100])
|
|
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128
|
|
bits)) (No client certificate requested)
|
|
by mailout.easymail.ca (Postfix) with ESMTPSA id 2269520D10;
|
|
Sun, 6 Oct 2019 16:30:07 +0000 (UTC)
|
|
From: Simon South <simon@simonsouth.net>
|
|
To: u-boot@lists.denx.de
|
|
Date: Sun, 6 Oct 2019 12:28:13 -0400
|
|
Message-Id: <c633e31b9ceb238153d8f767a2d5681deaaa8985.1570376078.git.simon@simonsouth.net>
|
|
X-Mailer: git-send-email 2.23.0
|
|
In-Reply-To: <cover.1570376078.git.simon@simonsouth.net>
|
|
References: <cover.1570376078.git.simon@simonsouth.net>
|
|
MIME-Version: 1.0
|
|
Subject: [U-Boot] [PATCH 1/2] ram: rk3328: Use correct frequency units in
|
|
function
|
|
X-BeenThere: u-boot@lists.denx.de
|
|
X-Mailman-Version: 2.1.18
|
|
Precedence: list
|
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
|
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
|
|
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
|
|
List-Archive: <http://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>,
|
|
<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>
|
|
|
|
Fix a pair of tests in phy_dll_bypass_set() that used incorrect units
|
|
for the DDR frequency, causing the DRAM controller to be misconfigured
|
|
in most cases.
|
|
|
|
Signed-off-by: Simon South <simon@simonsouth.net>
|
|
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
|
|
---
|
|
drivers/ram/rockchip/sdram_rk3328.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
|
|
index 656696ac3c..0541bbadf0 100644
|
|
--- a/drivers/ram/rockchip/sdram_rk3328.c
|
|
+++ b/drivers/ram/rockchip/sdram_rk3328.c
|
|
@@ -311,12 +311,12 @@ static void phy_dll_bypass_set(struct dram_info *dram, u32 freq)
|
|
setbits_le32(PHY_REG(phy_base, 0x56), 1 << 4);
|
|
clrbits_le32(PHY_REG(phy_base, 0x57), 1 << 3);
|
|
|
|
- if (freq <= (400 * MHz))
|
|
+ if (freq <= 400)
|
|
/* DLL bypass */
|
|
setbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
|
|
else
|
|
clrbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
|
|
- if (freq <= (680 * MHz))
|
|
+ if (freq <= 680)
|
|
tmp = 2;
|
|
else
|
|
tmp = 1;
|
|
|
|
From patchwork Sun Oct 6 16:28:14 2019
|
|
Content-Type: text/plain; charset="utf-8"
|
|
MIME-Version: 1.0
|
|
Content-Transfer-Encoding: 7bit
|
|
X-Patchwork-Submitter: Simon South <simon@simonsouth.net>
|
|
X-Patchwork-Id: 1172555
|
|
Return-Path: <u-boot-bounces@lists.denx.de>
|
|
X-Original-To: incoming@patchwork.ozlabs.org
|
|
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
|
|
Authentication-Results: ozlabs.org;
|
|
spf=none (mailfrom) smtp.mailfrom=lists.denx.de
|
|
(client-ip=81.169.180.215; helo=lists.denx.de;
|
|
envelope-from=u-boot-bounces@lists.denx.de;
|
|
receiver=<UNKNOWN>)
|
|
Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none)
|
|
header.from=simonsouth.net
|
|
Received: from lists.denx.de (dione.denx.de [81.169.180.215])
|
|
by ozlabs.org (Postfix) with ESMTP id 46mTd93q3Qz9sN1
|
|
for <incoming@patchwork.ozlabs.org>;
|
|
Mon, 7 Oct 2019 03:31:09 +1100 (AEDT)
|
|
Received: by lists.denx.de (Postfix, from userid 105)
|
|
id 1F528C21ECF; Sun, 6 Oct 2019 16:30:43 +0000 (UTC)
|
|
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de
|
|
X-Spam-Level:
|
|
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable
|
|
autolearn_force=no version=3.4.0
|
|
Received: from lists.denx.de (localhost [IPv6:::1])
|
|
by lists.denx.de (Postfix) with ESMTP id 6FC76C21ECF;
|
|
Sun, 6 Oct 2019 16:30:42 +0000 (UTC)
|
|
Received: by lists.denx.de (Postfix, from userid 105)
|
|
id 12907C21DD7; Sun, 6 Oct 2019 16:30:31 +0000 (UTC)
|
|
Received: from mailout.easymail.ca (mailout.easymail.ca [64.68.200.34])
|
|
by lists.denx.de (Postfix) with ESMTPS id 401F8C21ED6
|
|
for <u-boot@lists.denx.de>; Sun, 6 Oct 2019 16:30:29 +0000 (UTC)
|
|
Received: from localhost (localhost [127.0.0.1])
|
|
by mailout.easymail.ca (Postfix) with ESMTP id 6259C2109A;
|
|
Sun, 6 Oct 2019 16:30:28 +0000 (UTC)
|
|
X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn
|
|
Received: from mailout.easymail.ca ([127.0.0.1])
|
|
by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new,
|
|
port 10024)
|
|
with ESMTP id reQ6_1IuD0WA; Sun, 6 Oct 2019 16:30:28 +0000 (UTC)
|
|
Received: from localhost.localdomain (unknown [108.162.141.100])
|
|
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128
|
|
bits)) (No client certificate requested)
|
|
by mailout.easymail.ca (Postfix) with ESMTPSA id 42EDE20D10;
|
|
Sun, 6 Oct 2019 16:30:20 +0000 (UTC)
|
|
From: Simon South <simon@simonsouth.net>
|
|
To: u-boot@lists.denx.de
|
|
Date: Sun, 6 Oct 2019 12:28:14 -0400
|
|
Message-Id: <17f58d8cdf7d32de26cb36950fa8676e0dd54d49.1570376078.git.simon@simonsouth.net>
|
|
X-Mailer: git-send-email 2.23.0
|
|
In-Reply-To: <cover.1570376078.git.simon@simonsouth.net>
|
|
References: <cover.1570376078.git.simon@simonsouth.net>
|
|
MIME-Version: 1.0
|
|
Subject: [U-Boot] [PATCH 2/2] ram: rk3328: Fix loading of skew values
|
|
X-BeenThere: u-boot@lists.denx.de
|
|
X-Mailman-Version: 2.1.18
|
|
Precedence: list
|
|
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
|
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
|
|
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
|
|
List-Archive: <http://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>,
|
|
<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>
|
|
|
|
Fix a typo that caused incorrect values to be loaded into the DRAM
|
|
controller's deskew registers.
|
|
|
|
Signed-off-by: Simon South <simon@simonsouth.net>
|
|
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
|
|
---
|
|
drivers/ram/rockchip/sdram_rk3328.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
|
|
index 0541bbadf0..e84c9be6a2 100644
|
|
--- a/drivers/ram/rockchip/sdram_rk3328.c
|
|
+++ b/drivers/ram/rockchip/sdram_rk3328.c
|
|
@@ -394,7 +394,7 @@ static void phy_cfg(struct dram_info *dram,
|
|
copy_to_reg(PHY_REG(phy_base, 0x70),
|
|
&sdram_params->skew.cs0_dm0_skew[0], 44 * 4);
|
|
copy_to_reg(PHY_REG(phy_base, 0xc0),
|
|
- &sdram_params->skew.cs0_dm1_skew[0], 44 * 4);
|
|
+ &sdram_params->skew.cs1_dm0_skew[0], 44 * 4);
|
|
}
|
|
|
|
static int update_refresh_reg(struct dram_info *dram)
|