Message ID | 20190611145135.21399-24-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBY4A77TQKGQEXGHFRSY@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 ECE013F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:24 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id d2sf7882254pla.18 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264803; cv=pass; d=google.com; s=arc-20160816; b=0LNVWWu5cHTRpEGX+MVfKlZDLtvA/6HrKvyNV4R0WNqIFSA6qmAtZrVd8pSbkHWiVk ZoTrfFfxMO2737upJRejgj6NNzKcBsqvohmXR48oppV1ipKUjYEQ2ZlDZhI33ooUWRMP uGdO2L6uJ18YkARfJVEAQ6BV4K5WVf7T0CWHYOYU5DJRPe9/psODppIpBYBiNixkk5gI 476+nr3a28S2HRvyLwrxCdSbhMqWk/XLV6sfQvgUqnS/uUK32edp2H+BoQQf1FLM/9H2 223/xnqfF2i/BZXZlUIcIHtJtTYAyDorqUJXc2JIMXytalp3d2G9c9eQ95jJpdgoM/nh iF6w== 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=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=Lpfh0cJeZZjsJaf8NUtTVkICeC9rqDHVYsrHoZEXT0YcWLjK8KTjcU/IohHjDDz2eT ucJ9XzhvbaHYzO93JdSAaWZttcKQt/uxyGCyE1wh0RuuL2XgpVrD6EiPl8z/+eSrHSXv QUO3ZKfAZlbpPNwhtQvOW6u9pHpKRyQOmGuSmQWdDSKch1emsJhB9Reh9hs66G1Aw3NI IeMZ+vXeUZrIkVcFr4s7D5IxSSyh7ajrmv32Dypwnbxq00hu+C+fetPKGdASfIVvpNbt nEL+jSoNvPIeH0cvIKTpMUFKmUb3xMFXyRg2gRiVwLJMkbgl2osd7/gZj3jSEy65Sksf Y5Lw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNai4f/l"; 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=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=P9qVhCT6Tss2C+2s3WzhA6v86Aq5KPdBCgVbsoJ1stBMIiA0S8hGutkPFnaWk/bn2T +mR5oSWaRMjihtnHL72Eft47R9zGT34Pro474QlCvaWU8i81xMbO5codD+UwMkicMnH1 ACJ73cB2l/+3ZYXz0s+ed0BldK6eJ7GDarEsA= 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=TukY46kCU1naBUTkbim+cYewULfIiQrLutXBmvPC6lA=; b=UyiFZgmJLfUtIvwDnXWGM3KigSMRjnlNCrQaH1YppCM4PIUIN8+58GhQLqx2IEB3dT K+FJrRT5K+OprW7ml5Va3KCE8fTk3UFYvKiqUP/7qDl+Ug+ekFqpYE4Ai6BPFJjpjZfr +Zpiusd7SctjNzJ+vc5K6ridsY9+xQJ2Tg1wGU8dZlIY3LXRG02/6+j9QZrg86slWgHq E5GrNpAcC/PanwKxuWYr1F+TpWaAgYjsZQM/BGuVs3CD0BQ4CouLkoD2HWSvU0wjVMNC qo/n5Q2P3Kg/oL04lUlf6/pXwPbVRzIqB+HqtFDbutlzN1Wi2Bn0kg7nFuRxPUxh6Hpp hZ6A== X-Gm-Message-State: APjAAAXMJy0MkffpjzWt2O8s20e96lgHNGN3Bp78b0Ih3xqQ+ik8FddD IG+0a+2kLGX7zI22nDLMNUzoIS0v X-Google-Smtp-Source: APXvYqyL1ok5ltZ/cpISqEZGM86QviRXHOT9QKgsjpao3p3xiE7JbyxpZtOjmM0W/DTvYlulzXxvsw== X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr58869558plp.71.1560264803747; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:2ec6:: with SMTP id u189ls4508855pgu.11.gmail; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) X-Received: by 2002:a62:585:: with SMTP id 127mr78667197pff.231.1560264803410; Tue, 11 Jun 2019 07:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264803; cv=none; d=google.com; s=arc-20160816; b=eOAZW6iC7uR0VeAKEpofp8BgjSnri2Y8ojrVOLVVRmMg0EY+JEVhntrOUspQRvTJkf FQkfgx5zlLvR7o2TPb4lw6OXZajRZo+y5H/VRu8PM8Z+73Aun1dM95OhMwmCfclacizK n54iXUD/cNuS4GadmO692ZWXzXJNaatLoFq3p6TYGMi+quFuWZQK9NFSHB9bPxf6Ighi Ghm3OPwLnYwQAvzk84/tGub6xSnKFyIGGzZLzdQ6z6pAaFgetg2oM8xbSs1L/Uhcr7yb sRzMPZ+sGoIjfdAQJhPooGnjn8GE9ARae9mPU3GIEicDQnXaTeTXWBwEsk2yOMW5M8Lm pV0A== 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=0Etejk+5Q0mwhnZIra8dhkmYg9eLKyz9+3kQ98m+KvY=; b=TQVIwkVEY/VoK/FtFl2QCZuYodr5UDt71RH2C5lH9wESEB3FB8H/9pMUqlym0oFAGy Si5QTZyRrjH2qXK5YgsO8olkiYFdTGLaZtKw1CifdYgfu1GCOBA9cHix2569HDITNnhY kFzh1nla9D8vyO9ETj1SCwgcsbhkbVNELcd24XPGUXg+k6Hiuy5+o+Sx38UeCF8dXH1D Z1pBv2SuMhk2sEjCBlBTOk+vS+NZMP840AT5FXBXFK7oB4JCsq0nfvEzGQOZXYM3dREc IsWjQwk+YUKKuyXNTzUmF37smci6/y/9l1dEiwoVVfxSPbfcMRtLeZbHuT/DCOAiuGBs hP4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNai4f/l"; 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 e1sor864980pgo.57.2019.06.11.07.53.23 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:53:23 -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:450b:: with SMTP id n11mr20075968pgq.174.1560264802960; Tue, 11 Jun 2019 07:53:22 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:22 -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 23/92] ram: rk3399: Update cs1_row to use sys_reg3 Date: Tue, 11 Jun 2019 20:20:26 +0530 Message-Id: <20190611145135.21399-24-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="gNai4f/l"; 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 3d1d5badb4..dc7275656e 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -53,8 +53,6 @@ #define SYS_REG_CS0_ROW_MASK 3 #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_ENC_BW(n, ch) ((2 >> (n)) << SYS_REG_BW_SHIFT(ch)) @@ -68,6 +66,14 @@ (5 + 2 * (ch)); \ } while (0) +#define SYS_REG_ENC_CS1_ROW(n, os_reg2, os_reg3, ch) do { \ + (os_reg2) &= (~(0x3 << (4 + 16 * (ch)))); \ + (os_reg3) &= (~(0x1 << (4 + 2 * (ch)))); \ + (os_reg2) |= (((n) - 13) & 0x3) << (4 + 16 * (ch)); \ + (os_reg3) |= ((((n) - 13) & 0x4) >> 2) << \ + (4 + 2 * (ch)); \ + } while (0) + /* Get sdram size decode from reg */ size_t rockchip_sdram_size(phys_addr_t reg); diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2408246d0d..772fde9732 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1027,10 +1027,12 @@ static void dram_all_config(struct dram_info *dram, sys_reg2 |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg2 |= SYS_REG_ENC_COL(info->col, channel); sys_reg2 |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cs1_row, channel); sys_reg2 |= SYS_REG_ENC_BW(info->bw, channel); sys_reg2 |= SYS_REG_ENC_DBW(info->dbw, channel); SYS_REG_ENC_CS0_ROW(info->cs0_row, sys_reg2, sys_reg3, channel); + if (info->cs1_row) + SYS_REG_ENC_CS1_ROW(info->cs1_row, sys_reg2, + sys_reg3, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings;