Message ID | 20190617073252.27810-20-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBNEGTXUAKGQE4TAABBI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 00A0B3F353 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jun 2019 09:37:26 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id 145sf6536938pfv.18 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jun 2019 00:37:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560757044; cv=pass; d=google.com; s=arc-20160816; b=M50epd88CNaK5JG9gNKxdFe8OlW5/VCBsWp/pUMTkuG25WwwUJ5N3di+cMkkdRBKe8 Jh3LuFw/K0ObdCYxkw3NylbE6/sdZMyl6qx2EGpQ/UWkr+Wg0hJoAuIsYwhpv8aQVtIq FfpYBFiYehkRoMzZk2CekmkFwGz01j1Pw0aSyTyM65dKOTh2k/f1APSIjRWExwPlD9uP D+YvKfccKFvmZLWAiWeguWUKls8qgfVGnFm20beVfUEAybUAbJh6BntasrlpSJeNZIVR dYh878za+h1oba7rVZGc7tgspoxxMoSF+8Dg9pqBZlWss7+aPcLaXQncaI2lxU1tVcoL KLLA== 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=RI5+p/UomMrX/fV+Z5PcCbrqpvJ70Afm5mACy2qMRDQ=; b=t8V1VU8qcOiYgbRzk+1s4FA7lmCdrbQCMbVW2mIWER0WnfK+yOB1z1uaI35RshZly+ ArAZMaI9v3YstbQW9mstOwjJ8Q6lEba1tMn0RlO0iC5GmHRlV38PejNw/eTUOMK9kCtM fFW7f5oaRDbIDBYJR1NlMmYVM/tKBsQeM/5bCAG1pRCRXmMw5jjHB+MWxWv/O/IBs1c4 lw4Sk+2v7pJOUwT6Z2769GC8DUPPyvjmjOSjl6BhwKNpRzWRn8xxDEG21nQPRHRNwy24 mHdt4ipDyvG3a8VNhortC08KncUZnPqPi73oQ3z/NC7lG9DFpKY6DPMEf1fuHSEpUNIO uf5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g7V9UUTT; 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=RI5+p/UomMrX/fV+Z5PcCbrqpvJ70Afm5mACy2qMRDQ=; b=EdAPTCK0zxdX7JFfz9ZIhry2Ju58a+r2w3qHHIsyjk1SRzM7vLy70bo3mWMS0QqMjy qP9ehQgN8hEaQP0zqObrP0aZojqZr5R+ZR+Xf7UmZWxdwu4RXEfYIsJ5wwrgnCwWoMnp 7PV+KJzCI5+yYpGNcRIFldwlxefwb1J+QqdjY= 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=RI5+p/UomMrX/fV+Z5PcCbrqpvJ70Afm5mACy2qMRDQ=; b=OfNVSvftO0K50pTmtjbgjUeyYfzxOtYP3zwxZSP5Os7Ps2iW2xXVA4FPkBTYk9acB6 CIL+7UVZk0lEAN0M0lTx/+NEic0U7nED7V+fUCthjeNF+1I37Dbh2pSt/u7w7aStj+M7 64N3y9m3gkwOnZT+Ft/w6kgQudlYFbt84Z1+wlLuuSTBtDH3eQPQlSJUt2TCrdJ+Msr0 mMrZIoDcPP5X24emzxgjdda5ImYkoQSq7dS/v7+y7IJB5u4yxJH37fdnpFYpiSLcuGLB AFsrDZ0hVHd4zXQD5z9WWx9Hv8eseLK8peFoI/+fciaD4MNUzvzBtcTctdjOygljUtER 9Cxg== X-Gm-Message-State: APjAAAXPz6W6caIA7iGqAzqJnX+QucgdPuuBkFTPiJlXONzonw71H3te 5qDIuYaLf7x1gdjXup45HqJLkopv X-Google-Smtp-Source: APXvYqych2yLyOH0VzC6SrZ2Prv1tBLKdhhh406/+VZwv5oLFkIKFqzdhnjwyy5bYTB3liS4cEwCRw== X-Received: by 2002:a17:902:61:: with SMTP id 88mr28113017pla.50.1560757044820; Mon, 17 Jun 2019 00:37:24 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:28ca:: with SMTP id o193ls3367828pfo.10.gmail; Mon, 17 Jun 2019 00:37:24 -0700 (PDT) X-Received: by 2002:a63:6841:: with SMTP id d62mr47184404pgc.17.1560757044483; Mon, 17 Jun 2019 00:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560757044; cv=none; d=google.com; s=arc-20160816; b=n8sZH7msEE3Ka5EnTeUXPHqa1rjgn6OINs8ZSyesPofIKmadSrRSsehwiPnOT2aB6O L39/iojbVk8Z6Cjtn65pzJzjZnaGDv6TvBHsPeGUw5CsBbSi4JYc/afW0Xyshg9JJGYB dnEmYX+rp8ElkGnjapCR2VtDPUvJX/3fnh9mo7qOovFf9P8Zsi7FecmIEGaGBD4K9qNu sLGsjBpIixsGJZSqY+6zTPYWleGlVzK+NV3HHzUsvwofoiygFz04DTN8YqhwkbpFhqEE BMpU+FKTxUmOsBSgEKWtnATwhJwiJpZtNufo0FchwRPHA4ivioi0yffpjm7V2y0UpbQF a9Cg== 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=s1N1anu3At0P/bqk81w7TSPz1h9XuAST8M/gMm7u8IU=; b=yYUn23or8hbvRTj88oK6I6Ad6dBTskDx1uAN+SovnJU1yqxgtCIvHxNG0qa0Hvulq0 QmKtSTmnYBh9hed1pTuP/A8XKuB7QHzeBmOWVEDI/av4wdQpanSgdn69y6xLRrcosv2R fsB2Zw6KF1bzQbzUfDVzjEf03NT92UumnClNvM1940c+NP2TkbWJlLVXnp9c5ZYSeS83 NthsXWZoaN10Y50nGxo6hPXvsAdcsFgDKfd8koNjNpXerVL3dkbsSq0i+c8CNk0Mefke xVqDXXT7Zaj3v0v6zVUh+3Tg0s9FmUkwyt+eoIMLC+9RLvZI/KHZEP6ODDjcUbEszWmN 1lFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g7V9UUTT; 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 s126sor3487680pfs.37.2019.06.17.00.37.24 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 17 Jun 2019 00:37:24 -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:9197:: with SMTP id x23mr77160492pfa.161.1560757044168; Mon, 17 Jun 2019 00:37:24 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.245]) by smtp.gmail.com with ESMTPSA id m41sm15205998pje.18.2019.06.17.00.37.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 00:37:23 -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: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v2 19/99] ram: rk3399: Add cs0_rw macro Date: Mon, 17 Jun 2019 13:01:32 +0530 Message-Id: <20190617073252.27810-20-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190617073252.27810-1-jagan@amarulasolutions.com> References: <20190617073252.27810-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=g7V9UUTT; 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 72cc9c94cc..2b4745acbf 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -52,6 +52,8 @@ SYS_REG_BK_SHIFT(ch)) #define SYS_REG_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) #define SYS_REG_CS0_ROW_MASK 3 +#define SYS_REG_ENC_CS0_ROW(n, ch) (((n) - 13) << \ + SYS_REG_CS0_ROW_SHIFT(ch)) #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 1a3285892a..1907fc9eac 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1025,8 +1025,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg |= (info->cs0_row - 13) << - SYS_REG_CS0_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel);