Message ID | 20190611145135.21399-26-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB3EA77TQKGQEZDNVKKA@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4890F3F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:33 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id t2sf4044668plo.10 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264812; cv=pass; d=google.com; s=arc-20160816; b=gvK1m3MBybLNU+kXvT+44oLoaDvEYXiObdv9gXJFQfXMiZymvdjzVZb13BRLEPnm9y saprsnwgiEZ14JzQufdCVOoTRyZ0r6wzh0bdq4ViE7ls3mc9vkkG+/pnFebmLKlb5A3/ r5k9CEdGBj8lbzdWTOtUymoXo9Kk6Sc2AEskxw6cfOqtOQFzWfMNK06IEayf2SYdBlBV Rs6GyqiPHkZ9SSyc9G++I0/xAY8G/VeTQJ2dEQ65anIF3WDevF8h/JbxO0O8obdo+xEA u7LNEkV1xtFf1Iq5IxBJgCU//X2hRigtZIZ22ki7dRFjoVP2LuRCykjT6ZEguc9GJEQZ XpBw== 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=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=cPjCaG8izK6LlP5KV5AYxRf/mUlBQ1qqLQd21rr4aVC1j5BS5z8o9XWAUjD9YPfmHC gqcG62CdQ+SqCDfUT2AzeyaGxMedE56AdlN1PkliRb5Y1yY65JAXyNfRhi/yTGx4BQz/ Z4e6gDfhbI3Vmw5dwLSijZPLClhRelcEWbQxf0TdPBc2uu+0/K2ZDh94/NJas3TxJXcc Z95L0PH2Yj2P0nJOm8SFhf6XskTA3gGCRYhJqDE7wyuXHaRwr0LI4WL8XNL8DtMd3xt6 uZSGig3ZaZzwrugUtjtDjI7HBic3xYtaFc3B9Lkyhl1LSZ+DnaVdqDeOyESuf4UDhJg1 ZCig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oYsE0zkx; 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=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=q55F4mvM0zZcSTrpFpXkRFxGFB0h+ePejyIArxEvBYRDQZm0/EqezXfgr3og/QnXMk TmD+OxliYi0yXlmzoymYEgjgXY2zjfUFs5LYzSuggTKhMvEnt7WdmSe3sSbCZ90CCu3Y TDN/AwF6rfX1de6nwUZsGWAXYcrr/dSYQSmgo= 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=1kKZxmhtLUnh8/v9CEVIUwG2Klt7x7OJeWq52t3B0n4=; b=dgF99FurLpGHNZmcz4DxrfkJSKZZBJLaLXhRL6JcremO/UqqEMeNEt23/N496qj3GU l9UK6VaxHCJNw72ziYN1oKVsfZb4VQ1ZRJFkxqaiWukhA2l0PeDOxy8qZyASL3kX6loz if0/mZY4d6h0eStbrhqwhInXdaK5rB19u3bP9SdR5yqE6gYSvOvSceXKFiADP9k3upAm EvhvNMe1wwxrKg51xkfpnXfXX1G70yXJ1BUL2Zy9WrKdciDTmThL3M3EaWNpJL/8+sIA xSX00/OqGDXGNS0+JRVZRusLTzz5jh4NPB44o2NsM2KyGTUzquOayZ4uBoeyDjgKHyPr Q8Fw== X-Gm-Message-State: APjAAAVB1rL2hdVT/DUMHOYhggCvF1FFWL5s4uyx1k0MhOm3asEig0JW MkBsjlogbgckrNshDMCE73tK0Ra2 X-Google-Smtp-Source: APXvYqyEnjua8zR4EeeDrJ339teO5qDvzzs4yQu0YvopqgIAF6nnh0/V7pTaDRIqJW1MGukYOl+ITg== X-Received: by 2002:a17:902:8b87:: with SMTP id ay7mr73753858plb.97.1560264812076; Tue, 11 Jun 2019 07:53:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:24f:: with SMTP id 76ls4515866pgc.10.gmail; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) X-Received: by 2002:a63:7ca:: with SMTP id 193mr20402557pgh.240.1560264811641; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264811; cv=none; d=google.com; s=arc-20160816; b=B0KnUiE5BcATMd25OGXjvgg5Yu6XFgNFYN/6oZHGn3cralJTlBhVhJYFJ8GsPn9BCJ tzxadKpzAEu1S7f81MNVJFciev/GsjZpmMp1Gei//RQ3MKqRFZjv1tOu4b/WaJOjQhme UNShK+5G7GgHA5M7GzixadHZOq/Vl/0fwJukjezgifXSxzThRMLgO/THKNTOHAy6FVkd pqknf+6OSgBk40m7UcxJcbDRR9Mz0AyIoxd4QiQLk1ML+57nWMUjFmMhmvwB53VVFnEE gBvR+mfCgL+Qv/dTLQaLXt+YFTWLD+ngSBccwyMhfZybkusHJsmOcA6BZyPLwf+ftcTn 4YfQ== 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=aY2/dWps+z0RNlJTkm62+j81bSU4w14s3hjMynspne4=; b=eTHeycXdhE/7jKYPqbVD7wcCmp71YtEMMJulzCNYVEy0ETlP4oMCbV2XVKvs1iczx6 YqIaixwu8L2s6axvfYKbUDWqM9sAIhmXoukaAHsgLHJEl98hkTitojpJUkyWKvY7eKYX vb6C9uGRtGw5LEEEos5V2bMCI1KI+0tz1qwPgmna81C1hO3r1iG1C+1bG6sdYX2fDZ1F t+6nexTvmWZwuGXC7MQsW2efR8UdDHdIqEzgNkJsuxke0xorHcaSgQThHJ56khFJt7zm cl4+8FZGN6+5MK7e2aVAwsEpyKurKVjkPJEEiHTiF9IXDMfbsP4nNpQLdjqKu+bkDH+Z TlCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oYsE0zkx; 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 70sor15447027ple.41.2019.06.11.07.53.31 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:53:31 -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:a17:902:778d:: with SMTP id o13mr25644519pll.82.1560264811322; Tue, 11 Jun 2019 07:53:31 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:30 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Simon Glass <sjg@chromium.org>, Philipp Tomsich <philipp.tomsich@theobroma-systems.com>, Kever Yang <kever.yang@rock-chips.com>, YouMin Chen <cym@rock-chips.com>, u-boot@lists.denx.de Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH 25/92] ram: rk3399: Add ddr version enc macro Date: Tue, 11 Jun 2019 20:20:28 +0530 Message-Id: <20190611145135.21399-26-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=oYsE0zkx; 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: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/arch/arm/include/asm/arch-rockchip/sdram_common.h b/arch/arm/include/asm/arch-rockchip/sdram_common.h index 637a0de902..8021ca21ed 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -28,6 +28,7 @@ * [1:0] dbw_ch0 */ #define SYS_REG_DDRTYPE_SHIFT 13 +#define DDR_SYS_REG_VERSION 2 #define SYS_REG_DDRTYPE_MASK 7 #define SYS_REG_NUM_CH_SHIFT 12 #define SYS_REG_NUM_CH_MASK 1 @@ -60,6 +61,7 @@ #define SYS_REG_DBW_MASK 3 #define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) +#define SYS_REG_ENC_VERSION(n) ((n) << 28) #define SYS_REG_ENC_CS0_ROW(n, os_reg2, os_reg3, ch) do { \ (os_reg2) |= (((n) - 13) & 0x3) << (6 + 16 * (ch)); \ (os_reg3) |= ((((n) - 13) & 0x4) >> 2) << \ diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d77a8310cd..5b87524b7c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1033,7 +1033,9 @@ static void dram_all_config(struct dram_info *dram, if (info->cs1_row) SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, sys_reg3, channel); + sys_reg3 |= SYS_REG_ENC_CS1_COL(info->col, channel); + sys_reg3 |= SYS_REG_ENC_VERSION(DDR_SYS_REG_VERSION); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings;