Message ID | 20190611145135.21399-16-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBREA77TQKGQE3KG5QUY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 877CA3F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:52:53 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id c3sf7890437plr.16 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:52:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264772; cv=pass; d=google.com; s=arc-20160816; b=pZXXDw4XIQfX1z15AgcNxlQqQMuVn84/9LyUKdLRnO7LzVThp0dK+SLmKeQ/vFdkgs r0DkhtRozRdQm0hAHLbKgt+7+MmUEXHrUcn/LH3Kf7YYQzvH5XGlkN8v8uu77OJH/mZO +m4/e9AGIW9aL4f4bLr87MsZs8rVudDssAiItWm+AHzDGxXRJm+YgDlyEI6Jcoq0Is2R wlhgL9pyZPn1VKmusTq3t4BJVGG684sOTIAN2Ubxzan/gxg1yZzv02sMSKFFFn0KA0B9 52GfcfeJJAr39Ozlds0TZdd/biJ4GgTj1zeFFNipBB421+oMgrznHC2sD08aOFXImVBY GcuQ== 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=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=wHGCAUCiqUwGoTsElugAuT31Qboh1OuEXs7HHi0CD7l3kod3dOf9PnOwwYfotPJPBk jyqi3NeY7Jk4gAF+BzkTmC8E7njIvCvZyIGj0xEjhbNt2a7OdeiHJ7Z3Oi9sFbfEfJ1f 6YrWg1wGJR8wBGYbrIIj44Jhcts6+lWBpOVoc8Aa83GKX8TE3B0KXDQD7EAVT43tuWGI Lg9g+9g1xVj8R4y4MWcXAToBarcJQSrseBwYPxZ4Tezr2qJq342MT6JgQbegyckXyPDb dyaISUadWDYb6AyI2u3jD/E5hlmsvC/5B8nI0FbFzXGLKw+r2d+rI2bYSUHscRc58sWa 5/jQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gIs775IM; 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=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=N85m0cGCqsmdWC5YMMF6oRcUQtrpBy/HH5aR27gpSl/85xMTy4tJXGkCprFlqm2lVc YJltNXi7Sk5RmGASp+GbE2XwWbLoz6QljBtVBHJ9T1LExX+oqxxQJBjXCoi/wTqR79+P QAqQXl823OP+CGW2Sxd396Y90GUF/J2mpgOwQ= 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=5S2/ejDKRLJqdU9KkER6jpRtWoG1kgF3rJMJyfFW43U=; b=dCWxMpv5w22kgLVC7KyygKC6SnfAo5CEs8HLm/oS3e0QjoRL0TdyJv7sV2X59e2grh AqwofjSsSsiH1Gmgx372sQ7CsPTjtfiAelQiDOHC79clOT7WMmfwX8HLVPKx8dWRtJwe dJjs1/jKM4NRDaMA1rui9AZDxeE1lhOqF6ZDN9iw+NWc9sruOpjpgdLqOXOv5iIjrOH3 8ckUxiuZsPWC4CW5bskOtnu0YNchONGnyjUj77OCjd0Nl9GETCNPh2GGX8ccxos1wTmT pjuvHlsYhG+qJOkUAyq4JjP1ubrJ/OejpmJbfI1c9alMdPxZEYoFU33XSvZAzHlfriGp guYA== X-Gm-Message-State: APjAAAVuu91aKmgO2RL2Yv3/OtJRmMjSQd4S9l7CJZsbkfu+pM3meLhk tDD6qOfo5HyeycyH9MzOD3HjZci1 X-Google-Smtp-Source: APXvYqxVST4JduPAgYCL1pwulGMi61hDGDfwgOXGz4q0ElJgovCEnIY53bj7UaT8EOf/E72vvoi/VA== X-Received: by 2002:a05:6a00:6:: with SMTP id h6mr16346529pfk.237.1560264772367; Tue, 11 Jun 2019 07:52:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c015:: with SMTP id h21ls4513180pgg.3.gmail; Tue, 11 Jun 2019 07:52:52 -0700 (PDT) X-Received: by 2002:a63:5656:: with SMTP id g22mr5360994pgm.280.1560264771916; Tue, 11 Jun 2019 07:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264771; cv=none; d=google.com; s=arc-20160816; b=yqN5VdaoT4m8KRpwwR4vHbSdTP8X1gRy08vDAk0m2FDx8QWj1x9qDUpFbOqUKtQSzz 4mNymwFWo5JuL64j6wyKfUUoIWuoj4DYMJvBlbRbJ9z4VTLcc5vZjKhqtrqeZ4BuERPn Aoud5L7/p6+UcH76aJnuSbhhg+iYFu6DcqTlengMN9AQp7y2Rxg3lDx7cBmAC5zF605h MQ8t14GvmAw9VQafizJdQnnjSOFoeVi6rRRZBdogB+ZJ/8KHYdwkdb07bba7oCLBElN5 tQvyV0sp8M13rTUZdBTM9dvTp2h7B8hUco2QEK44ZvEhrEmw3irrlBHTLs+e9XAgoLlJ YFVg== 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=mdI9PCaGo4TDtVipfZ1bMvIbsyS7+2mosHhrJOFIAC4=; b=EysKMfb0gfi/wv/9g7WcKsuwtrLTMgdPj4in/5kbN5cWPwf7zswUrdJUtbXz469QGq WKxJbJ2kq4XQtdRbQm8BDePNoSV7pq/joisZriYcqNC5Edj02NFJFUN2Z3fIGb53BcBm jPnO+Cpcb6uc/HP22Vb+d58K6Itt2xqaBml1VPD1oKMntFl+kD3TF4KM3jZOoaQ6itJ3 C2dFlRlH6nUK1l7eo+/3Q5y5+4eiTBAYfSogz90TYEIQjSFr6Ach0ak1WmI0YqM68+5I e5BGuskG+jgyWbakpk3XEbQI7drvBoew07SWDyW29nDi4kHO3E0DTP4JywUPtzKGKxix K16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gIs775IM; 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 x27sor6359346pfo.43.2019.06.11.07.52.51 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:52:51 -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:aa7:9a92:: with SMTP id w18mr51117563pfi.167.1560264771564; Tue, 11 Jun 2019 07:52:51 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:51 -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 15/92] ram: rk3399: Add column enc macro Date: Tue, 11 Jun 2019 20:20:18 +0530 Message-Id: <20190611145135.21399-16-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=gIs775IM; 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 2dfbc75bb7..8e809e8dd6 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -44,6 +44,7 @@ SYS_REG_RANK_SHIFT(ch)) #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) #define SYS_REG_COL_MASK 3 +#define SYS_REG_ENC_COL(n, ch) (((n) - 9) << SYS_REG_COL_SHIFT(ch)) #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) #define SYS_REG_BK_MASK 1 #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d801ee691c..ad6c74374a 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1024,7 +1024,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); - sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); + sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel);