Message ID | 20190611145135.21399-20-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBU4A77TQKGQE4WT462Q@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 EDFD83F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:08 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id i26sf9740887pfo.22 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264787; cv=pass; d=google.com; s=arc-20160816; b=mAjAB1PEj7dPyCKwIXPZ/aCZaPy71qp86aDe/VQwi7SvNlEqiFWqMVQdpYqHwWCOGZ 7a/KtAyk/qZdfvRwc8hzCkyd544/YoTGnMfxuiDEGwbP/SOeW6IjAnMWX6ubdBbYFLJ2 DuoolBvtLfK0ElRfLTdIaQAPAAef2+zDi4JgO7Uanza/aV+CFytdmBxsjfINXogYuxug fyTO8OlasYHnZm3DnJvGvg+fDDIznRrZXIqXFN5+lOYmvUvX9jq8/N38fLFDfNK6QRDe pmLpnBQOT/tPHQYbm//7PhzMd6cMcTm9FxqfMpKsg/QQZ6050pYA5iQfkkgZPPDlh1H8 jlLQ== 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=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=kxw65XtO6TfxYfAqnN+hEblzvLfFhylxmQFiE7ulntb4y9u9z31nKEPIa/b3IN2J1P 1xJRRZZ8nXMn0POlntrW22xuMUi5LoqqCY86W1cGbDpwPQdwM4F9AvJNzDaX3KkfVnOg avU7NFxnfQKkTsTUUKLyu7gn/FQDGF68Lh89krc1UWhbf8HvhwT6oy86ri93HUommeJF +CYXZhT4IPOGqN88TLaglHzqzI2eAxI9DVHOcBWz7KWBmVXIBW26wenw+oR+MRCpgSHy BT9J3MEyCUyOHT7Pmh4dVGtd45xjnedM+obHQxBlyQOkeYmlGtrtVDFk2ZZ2LEI/1EuN aCyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="a/eJ/2kS"; 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=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=YEn/TPnW8c4AlL4t3JZgpKZWwjvNLmSLKI2loiATxUx3VBiE0U+ljNuEHhf2m0W3ZL NB4VsYXpPDm26aam99HcFBdTl/qq1F+uCakCOTSN4GzM6MjwHCCy0hzdejfoxMqMCcNq b+IIzOfHlFifT+88NNCRqovK9Z1SHI2CNXvGM= 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=5WjvWUZr0p4DsRsUogHD/6X+FiMh1NhuID+bpbpLQ5E=; b=H4ZKkXaWJwG1JUy0WKdZr+1Xu7arKeOlMC3C677AB2y10JHJASxptKgiL1fYXhZr24 HY+memXXWrM5pBYeiLAz9nR24nvtNzWk6BLROYWtWceMi6lgofrTX5LuwQa32AfK1AIa ylfRd32SaMFwg6D6mMYO3is4xFGrPNTMzCPhknZ6zNAUMYvPVl0pWH28CwFH68Bq46Ac VQa3xTXJuyhcdfqMqg4Xdg9kq08n8OO88Pv61ss77AybJltUqxbrFSo0NJNpK9IbIg8r 1EbAhTVCA7X2Cboazi+zso7abZcdUryVl0XZ4ryzGIWZ8PD6bltLB7fHZ4JsEDDDE+OZ EiJQ== X-Gm-Message-State: APjAAAWN9HzQBIKzAbEn6iEUlp8ycDz1wIeMJ+FepBrSTT8xz+kipXO1 B/sP66IR5Pe1DevY2RcxWWugvqWF X-Google-Smtp-Source: APXvYqwEhsMtYD+QrDj5aSWy9MqAQK+X3aEo08bHZoXZM9Myi9ZU6CB0glb34xibUr1skKWgqrN28A== X-Received: by 2002:a65:51cb:: with SMTP id i11mr20090222pgq.390.1560264787715; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1382468pfb.8.gmail; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) X-Received: by 2002:a62:5e42:: with SMTP id s63mr78006260pfb.78.1560264787292; Tue, 11 Jun 2019 07:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264787; cv=none; d=google.com; s=arc-20160816; b=mw2syTN1uVNRxlOKQpDSL0JHdATwG9pDVIKID0YN66rtJyWexJhyfbcFxRNrR57NY5 QOMqA/Znuch+CTdxHBSn9fTc7tdvTg2LdXtvjjgg5i83Hb9UMz4f4GUAaoGdviWCNw79 7lwG7LffsTMTNbXAOiHJ0cG484CN0tUdpCTJsks91qcZ5jGy1oZwg/+NL9BhC3dd/mwM gGoeCawFV3LDCSAlpgXYnKsk2c6zx9e8U5S2s//OUz1R98avTdkJgRU96HLLJfr6EmZt ZMNqgtO/8UKpmHRKYn14uwnK+cdO8IMNIASyUGBJBLkkM22CCH6hQrEHhGhYjg01PUeA 1EPQ== 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=59prPU8wNA7H+Ep8x38GhAOTW8bSdYKxRxuLXaLFotU=; b=p3x/UoMEqR+4GuzPpebF2ZitPEbbLZ5n+xpgjcPLdGzfylCDzwAnCwgRwYsxWE66zM QN6wslFBsyEjQoF/H4Ry3xONbgJuU3AcOefhdtvwMSjr8KVs3/47MlqDJqzvXWlVctzR A4pZ/xkbrzaMB3coUxOKSe2hC9S8M2F1cd3mTScKJg6jVZiiemVfH3V7IpcPadbdwXVL 3YezsTbnn6R4tL8HMyQ4BYyldXoWdANk7OdyZ7uy3o4/RfZkpbPt5dilAWNW/X27MXdv IuH5dHesF8d8LhAVaBR+0qlrva5SkTtkCr82RjD3rZx4nJzfCWyB8fKbRagoetm0Y4pN bQjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="a/eJ/2kS"; 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 b18sor12004942pgi.7.2019.06.11.07.53.07 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:53:07 -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:a63:9548:: with SMTP id t8mr20561291pgn.256.1560264786926; Tue, 11 Jun 2019 07:53:06 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:06 -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 19/92] ram: rk3399: Add cs1_rw macro Date: Tue, 11 Jun 2019 20:20:22 +0530 Message-Id: <20190611145135.21399-20-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="a/eJ/2kS"; 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 5c94dba39e..a4b1742438 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -55,6 +55,8 @@ 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_ENC_CS1_ROW(n, ch) (((n) - 13) << \ + SYS_REG_CS1_ROW_SHIFT(ch)) #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) #define SYS_REG_BW_MASK 3 #define SYS_REG_DBW_SHIFT(ch) ((ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index e3555504b0..f69194f29b 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1027,8 +1027,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= SYS_REG_ENC_BK(info->bk, 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 |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel);