Message ID | 20190611145135.21399-15-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBQEA77TQKGQEZRN6KPY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 665B03F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:52:49 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id 5sf9754468pff.11 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:52:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264768; cv=pass; d=google.com; s=arc-20160816; b=Rg6rSP+06tFivHVyz2ufVPcP8vofG0AXKC9DdF4yu4fTki7JVayctb4h0ia1FfTRuN SKY5tQ1ILqs4KCDi2+NYLdQ3/4qVLUw2xsR5Ev/R4rc+ZRIo8hAT3qMthMUY72wLpWl6 /rxsobiU+j2uQ4G3w+SNAZop84JhG1cmqMxtUCv7XfejkHJNTaEVy7XLtV1mojNGEPxm eL8qEpSug5v7AtWZleRHwcBHTsjsWvc9J7pxjgsBX5TgNJpwwA87HrO70EnYWmK0Qp7V Ftev4P80/RDVDIXEL7h+p18ArUbxsAfNOM57sh3wxXn3iN4VlNiGlKWnWGD+7T5TBO5G w10w== 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=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=zo7TCYprleuWKEpaUjoEZyQH23ze65xQY9nGRZMptpsdf248DM7MNwsYbEr4G/8cVQ SsdWPE7+vDG3xhknsm/8r0tTxuouaWZfDIpa/irpkvugm/ecuTOGr4X8S8Cj0xQ5jJXF PmcgFS02oZTGIDKz1GQ9lh5UG+MX80g4fGrF+em1KKeTuFEyBW+q7pB4vzl8osfHfB0e vqXsabhjlztf1M1D6+yPyy9RvTGw/Tv4dRP/HcvskVa4DsdP/N3nU7IEEPhqcEXFf9xD 6iIbcSg79zH/hlVQFHkdntS5LSOKyh1wNaR1CAGfBxnW0yrPi/dAV3bwtaWT+QqekMom eYHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WOqYtO7p; 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=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=Pd1ltpyoVzqChXwRs+8wPhLV6kc5VeAF2nNaueMiUFfpoHAUcAMfjCevK93AOmlbNQ JOsEFlVVpPi11wrsOf+fLL2HWCm5FHhfr2Kvscc4L4nZgD0AS0pgSZTdhQ9RkikzNDzV MvI/U5XIQ85YRUa/7nj1P1cMdSaBVNJcdWrGc= 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=jEtYh+2Ikuy/HLQJOzLQm/h02NqEne0DNQHeuFhkQls=; b=BqA0pxtU1GbshI5WcHa7KTN1+/z5d8jlC1D4oRwdWs9CxdU/cgSuy0o10B/vymlvo1 HjB6rViwt/DYvJq7eNqdf1n/nZisG7ZJ9MbCJXeKS+uwDUduyMcebvJzBebcs9q9mpR9 fU2oknHgJqJI1D2hnZtR4OwW5R8CKgplRyCfDrL6wwyw7vGLDrESQZ6mOYr/l2uEH2m5 xKlzfN6bSml+w6hY2gxP7kmANPe+sdZX118iJIkrTa+bYjFu5D7yd9ge+39gvKcAm4hL CQSxSe22ezY0AuwsjWG7KSsX1L6dihMqUS39+eGY8KmpbfcdBDXPR4XcxrFUEPzsRXHA tOJQ== X-Gm-Message-State: APjAAAVG4hoWIFcxQR40nLUp89FyYUjj2fNmGv8VqYVUEHQjDjT08F3k kPhULCQQr1xLOPJKhJLNgxfV8A8H X-Google-Smtp-Source: APXvYqzvqBYVKxuZ1LjEjXBigGogtcvh2AD+K23k7H+EW3zaZ5nKshTNaX7D6aSc4scijP4ysv6krQ== X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr2695467pjq.42.1560264768212; Tue, 11 Jun 2019 07:52:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8a8f:: with SMTP id p15ls4699058plo.2.gmail; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) X-Received: by 2002:a17:902:bb97:: with SMTP id m23mr11942760pls.141.1560264767842; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264767; cv=none; d=google.com; s=arc-20160816; b=d2XJgwFbkuAaVMaiMJrQ0IdeNGgnMnFO7WJLFAyGDeMOde0AyT5CPN9cEgwi67ozHh Az4114L6OPXtqlkpeMYDb0xWPqBSjJyojgNCEXBKBuFEtfxGfRI1M6Qbo8Vxnig7mc1l FPblUqQip9yUYbBuxrwIAo2urce20O3CGwbtX4YCuerZpnUfTac9yleuoYKCHL79vlvM xbsweiDNBfpou1DGhcOretNJKu6DwHXAWtjq7Z0hK+0UWtc+iJQhitdJET05L034zFE8 Bd9+MPvCfU6k9fueuholID0fTW6qgdbgc+00feniLVGKdI8Atu+0nzZA1A/TH/g7vEDl o+pg== 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=zIjqoFzVPVjK6wSUMlYVGkBeRuPJRs8ssaeE+J5e+do=; b=WJ5coE0HdoN1xWzDUYo0JxGn/tmrVIiECpbeVHHJfZ2gx4zYfGWfvsjyx3KTaCmQpD 6bI91ly/eS8+m3oCW2yz07kJPfMocSYHPZf+03qEAN67QziBWSvlLpODb5ACC4Wisxkr AVGrN8xDkTqG5kogClkbTn2VLBNjk2NcU7EM0UP97M3w4AegFciortlHuWBCduk3iwHo 7PSH2lElnaXw/C5YTfLtqdjQDrv+JHTfWHIDEbDNgFdfIeyN+mufUbwpBkg4gph6Qzm2 Fo0uw0JMrKohzJlVxM905OWEqkx+8Emy1kyurpN43tkl9PtvZ6HI3PapSPqqnGcKo9EF kptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WOqYtO7p; 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 bc5sor15046549plb.1.2019.06.11.07.52.47 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:52:47 -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:988a:: with SMTP id s10mr76925747plp.304.1560264767536; Tue, 11 Jun 2019 07:52:47 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:47 -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 14/92] ram: rk3399: Add rank enc macro Date: Tue, 11 Jun 2019 20:20:17 +0530 Message-Id: <20190611145135.21399-15-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=WOqYtO7p; 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 68ae8e8371..2dfbc75bb7 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -40,6 +40,8 @@ #define SYS_REG_ENC_NUM_CH(n) (((n) - 1) << 12) #define SYS_REG_RANK_SHIFT(ch) (11 + (ch) * 16) #define SYS_REG_RANK_MASK 1 +#define SYS_REG_ENC_RANK(n, ch) (((n) - SYS_REG_RANK_MASK) << \ + SYS_REG_RANK_SHIFT(ch)) #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) #define SYS_REG_COL_MASK 3 #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 0feb5d1e10..d801ee691c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1023,7 +1023,7 @@ static void dram_all_config(struct dram_info *dram, idx++; sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= (info->rank - 1) << SYS_REG_RANK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cs0_row - 13) <<