From patchwork Tue Jun 11 14:50:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 454 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0BD073F08F for ; Tue, 11 Jun 2019 16:52:07 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id bc12sf7907266plb.0 for ; Tue, 11 Jun 2019 07:52:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264725; cv=pass; d=google.com; s=arc-20160816; b=AfLlFDlx8jWdwJ9c+hun1nny4UADkdcLv+cYZkbrFmnWQoBQxbnH8x+7e/u1rjJfEw mNduBwiB53QxX2pnH2hxDF+/qPKSttCWal9Wfn2Qfsvbeu2vlAJ0t3oXdFcjXSpYsSPT mOgRS/K/xQpnN5ryLpUvi+ZBF3fIb6m00bmlju3nvPqFStkL9up4Lt24OvqkcOofin8i 9MiK4mrh5+Ob+Ckss2KiHQnUMyqNtvPRWIofxh6+Sev5uFlB1fvq5wqIU3reKQfhofvp aIeZgWkcWLj4OSVwL6B/i0J3HaBUtCwJqJqnGMbRVN78A+oyBLobJ4V5ZMWO7PjP+1Tk 0qZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=YSEosTvSWX5JqLiumlHMkiX8WJakD53qEFJVZMVgOnK8hlZV9kQffjpR81NYXYlC2S XxhVo495QxeuigxGp+QiAKAAER1bJ8xmxK7yNvl+vW01ggQoYVA7822rrTEyG5fTh6fk 3PCB+0u64M49sMS5LdWgc8RIroFIVSlTjLUUEe2RfTjf0uIdc/qc8Ha/pHWjpAFjd7ol uOBYCTEPXeQoEKdgRYGF1RlAoOs5t6EpPACG6escpO5bkIP0mawUDtWhz8a83Ui0iYuo E/wQdsPz46Vp6dDNpvYp9rA1yQX9kXEKE7asuWsWJetdP9PTdBxqiD7IUeCWVE8PsC92 4xOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=jsDZHS/B5d2Kip7PH3v2mHEkaI79Xelfcw2I+Ew/Xa2fn9JB8rv27AOGvkYOvjLM+d n4P3Korm0WYsLi+355RRidOTEe2RymCI3Ba5X1TZgdmIKjt1iFsAxNd6H2Cqy+PDh8cR Z/dV4K2Q/N2lgW2LE59YqL7uec6A6Wn4xT26Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=pNCLqFqvR1utyzlR4/p21+CwUReBJRYJ31ZtnOkKn/A=; b=PvQgW6M5wIHSPJGe3883XbnV1Hwe4hU5W/uNwNgfo4K//tQl/MSsa9P+rfneCOLuGx jiQbLntYu+sGx/pUUamo0gPtbCxYBHKQzFw6PhBELBQ6xU58zdk82wu3jqnoyaPL2c6i js+arKh+qJQXDHfqN0DQzMzhFj91/7LYIMaiRMyd7UQJRBmYj7yn00tgyuaA7a17FsEi I7B7Z3/onN3DhLsZVck8HdcFn/UY6RGpD7LhoqS6Uby8FU2Qkp+dIBJV4FHgFetJo51S HSmtHldI7wH5IClJtizB44rZQoVskqt+TT5zk6owAEsngxp7z2Vggxk4YqLYK4PINPxN WqUA== X-Gm-Message-State: APjAAAU7vR7oyXjIzcUfSrF/z7tWeDnuxkCzGacgVnZXTnbyIFdcTPsA 6OD7eMfajaTNH4m1TCCD+ikiAkVW X-Google-Smtp-Source: APXvYqyk0ADYPHo3mbsuMPlvJRWd8PuHXs7ZEd/Z//tYvfXFLCfHTn5Ok41gK+uLXP8VzwmbbxXB1g== X-Received: by 2002:a62:b609:: with SMTP id j9mr65939597pff.145.1560264725829; Tue, 11 Jun 2019 07:52:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a986:: with SMTP id bh6ls4896706plb.8.gmail; Tue, 11 Jun 2019 07:52:04 -0700 (PDT) X-Received: by 2002:a17:90a:8985:: with SMTP id v5mr26828813pjn.136.1560264723960; Tue, 11 Jun 2019 07:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264723; cv=none; d=google.com; s=arc-20160816; b=bLQHZxdd2CuVnrHNaPz51Qto2xAmrsOL73JSBJRLjooZdK0Mu3pGqcI+45pVwWAuju RM3Em5vV4PDHqFzPp5Y8vTcHE9RgqkMLQNcsn/fjXcOvezUJ2jxRjsENqXQrH/BWbqOh lTeK3rpGriCe/yy/NneLrAMLNFHkmFbd2pDCsFhKoK0kGBECawdcTfYpj16SE/TIZz8i s1DfxDMJSF05AgUO8lRYnhDuihY0McYN4C9K7f7PncIfbSZPZCgGDlJJfO/MkvxjmyAr A71Ss2vxdSoV9u5jfmDmQxVGHEKoyK1Kj8pgL1gbscwE3auEj4u5BQOC76kaLmc3lQ6b foHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HMxONh/KgJVsT04KApNrzG3DAJ+oZ016DpNMV5h196I=; b=we5Z9Cthm3+gT4Bx+G7F5NEXe2Wbb2ftuAEO3jjsexlQmRxdiKpYrOjBNc/aggdFX3 H1BrNcsJu47JA3UoaUDZT3DtXcHDtqKR1mUXTsbUT3atmqBfysd20Sw+POXdOYF0H2dL TP8qUwwASID3whBCRPWGhoaB3acuOtxzaEr9mcxJ3eDeECS3S+1MkgzVW9YeY7/kcD9/ OTGUSFGj9f0knAdjvpXEu/6aXrqEvTj/ek9/oSMjKFnjhcw0eN1gwFFIKIKyx5A7aWlP w29O7iToHnBDeT2ZitBQNr3ybsgN4zaTNGCUxvogRfBaFPHXTjwwbqjUAvnGd0uQi4CL UkDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 35sor11862721pgn.16.2019.06.11.07.52.03 for (Google Transport Security); Tue, 11 Jun 2019 07:52:03 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a65:42c3:: with SMTP id l3mr20774745pgp.372.1560264723534; Tue, 11 Jun 2019 07:52:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:02 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 03/92] ram: rk3399: Add proper spaces in data training Date: Tue, 11 Jun 2019 20:20:06 +0530 Message-Id: <20190611145135.21399-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=enuhfKBC; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add proper spaces in the code of data training functions. No functionality change. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8191ab6176..b0850a88a0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -620,8 +620,10 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_100 PI_CALVL_EN:RW:8:2 */ clrsetbits_le32(&denali_pi[100], 0x3 << 8, 0x2 << 8); + /* PI_92 PI_CALVL_REQ:WR:16:1,PI_CALVL_CS:RW:24:2 */ clrsetbits_le32(&denali_pi[92], (0x1 << 16) | (0x3 << 24), @@ -651,9 +653,11 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[100], 0x3 << 8); return 0; @@ -670,8 +674,10 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_60 PI_WRLVL_EN:RW:8:2 */ clrsetbits_le32(&denali_pi[60], 0x3 << 8, 0x2 << 8); + /* PI_59 PI_WRLVL_REQ:WR:8:1,PI_WRLVL_CS:RW:16:2 */ clrsetbits_le32(&denali_pi[59], (0x1 << 8) | (0x3 << 16), @@ -705,6 +711,7 @@ static int data_training_wl(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } @@ -726,8 +733,10 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_80 PI_RDLVL_GATE_EN:RW:24:2 */ clrsetbits_le32(&denali_pi[80], 0x3 << 24, 0x2 << 24); + /* * PI_74 PI_RDLVL_GATE_REQ:WR:16:1 * PI_RDLVL_CS:RW:24:2 @@ -764,9 +773,11 @@ static int data_training_rg(const struct chan_info *chan, u32 channel, (obs_err == 1)) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[80], 0x3 << 24); return 0; @@ -781,8 +792,10 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* PI_80 PI_RDLVL_EN:RW:16:2 */ clrsetbits_le32(&denali_pi[80], 0x3 << 16, 0x2 << 16); + /* PI_74 PI_RDLVL_REQ:WR:8:1,PI_RDLVL_CS:RW:24:2 */ clrsetbits_le32(&denali_pi[74], (0x1 << 8) | (0x3 << 24), @@ -805,9 +818,11 @@ static int data_training_rl(const struct chan_info *chan, u32 channel, else if (((tmp >> 2) & 0x1) == 0x1) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[80], 0x3 << 16); return 0; @@ -822,13 +837,16 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, for (i = 0; i < rank; i++) { select_per_cs_training_index(chan, i); + /* * disable PI_WDQLVL_VREF_EN before wdq leveling? * PI_181 PI_WDQLVL_VREF_EN:RW:8:1 */ clrbits_le32(&denali_pi[181], 0x1 << 8); + /* PI_124 PI_WDQLVL_EN:RW:16:2 */ clrsetbits_le32(&denali_pi[124], 0x3 << 16, 0x2 << 16); + /* PI_121 PI_WDQLVL_REQ:WR:8:1,PI_WDQLVL_CS:RW:16:2 */ clrsetbits_le32(&denali_pi[121], (0x1 << 8) | (0x3 << 16), @@ -845,9 +863,11 @@ static int data_training_wdql(const struct chan_info *chan, u32 channel, else if (((tmp >> 6) & 0x1) == 0x1) return -EIO; } + /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); } + clrbits_le32(&denali_pi[124], 0x3 << 16); return 0;