Message ID | 20190611145135.21399-21-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBV4A77TQKGQETHZKBHA@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DDAEC3F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:12 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id v62sf9282153pgb.0 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264791; cv=pass; d=google.com; s=arc-20160816; b=bIzGIXV+W7pe6nyoAP+w+7238ioOUFwghNoiCNOFcsPgkl3yDdQRKaLKJP19melwv8 x2IzUrqZcsXQCIIK4uZaDRbn8IxW168zHguXcQxEs0sM1rRCxV+pyMsf9W69uyFYiWQA 8rJMmnzRyhIos/6a+0v5aBWLSv07nt6wuYX8dvsj3nTUGScbrsamex2b7DXms0u6GH4p 2KOHt78ognmN0KR+q0erCIWU5lInRdbW7fqqe8Yr0+HTM6MrX1tY2ByFDqH4Tm++X8eB LUHMaZ6wkvXTRnSmDmsyF1r1A0SZ7yo7XtUrc/usV1r6xoQQxY+OdTi3lxWToLq9wtud t5/A== 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=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=zXhA7kV3uB5VufEQF2+lr0NwA2JOoKIvavEtZNL95/NOnsxobihBqgQm1WGBrgHS7H hf5Q8Mwy79+UsBeQQJB812ABa/yk0S9QqcW9KWioHM8/FS2DaxVhwh01tYOXDwidHenU 1/qemn69m5i2/PdTANfWQdH2gTiv8GwDEHKml4Fu1vAfH+RfxhBJTkQ4gal/X8t2m4he qNETQNdG6T+EBuoOJUuKjo6wJVmygumGAW3WnFKCEvo8tzhzAH/034L5B3lZS4Q5TNg7 JHPHL1brngWrHfwytYXOIn+qyM3YKTWs/a7Ed9OPFaporLMkUP440EQ8C7buw69mjgV5 +6Zg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNjtSAvQ; 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=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=dONI27YqxSSpoHhO1CgYO+3zdUf4k5zrC4sRVKJqGCjFALLPqPHHRsd/k1RV7bytAj LeW1tCz4q1ZJF2MwIX6kVEdMBvZjS1X6ykgo/I1qFUBZZlwMd27SB8ZWrzFmIDkNb/lb N5dlw7iCTbB/tWj/aRO1eWYklgiJF0lfDMzuc= 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=INu6R+FpcMVq9mGhpAfffwgbm7NFvKVyXLdYgIAdTKg=; b=CaY2A3k5jHWNJpgBS/72c7d4DrE25DX7u8r+AruwHiJBCnH9k7oF22JeSa+lqbc6mg e1Sp3F6m5h3eQ1cCCfnf9IVXtE3XNA1EX7ZVJlpp2Be9sCcYDbe8XHZprJfh2e6Nckrk OTwwkif1duYedAoR22DGKRG/uxGxhAZ6Ee0uszd08NBOQ5O6RCjaS8ElGWFAOYkesL4G OW5Wnr3O3MNXDShZmTjSDTs4eR9uqyO/7wQkH0wQPo23mGoE6EAlJzsbiu+eX4yyRaoZ V1KNHIetrv0H3QZGaLRzbj7mjWW5znwwROAgDBdJvIL2nKBvO/xu16ArESsGifB7Raqx M0Pw== X-Gm-Message-State: APjAAAXycHlPFCrEotJ3eyO6Dd+iYLo4Fa9KmQ0w/NZkboebKv2u09pr p4C2AvQaiLNM6iM8ztdf4pQ/a28s X-Google-Smtp-Source: APXvYqztpNK4vMdHStS3NWy7Z/aqJjM18MrD5+KnkToDZc00baC/OujYs+6AEgLdgzzdl5GjpdRFDg== X-Received: by 2002:a17:902:2869:: with SMTP id e96mr73578352plb.203.1560264791741; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5f87:: with SMTP id t129ls1382509pfb.8.gmail; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) X-Received: by 2002:a62:4c5:: with SMTP id 188mr80381156pfe.19.1560264791317; Tue, 11 Jun 2019 07:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264791; cv=none; d=google.com; s=arc-20160816; b=drDJbTAXFt1gAjJjmsnareYnS2tqxNKyVdhR3tPRF0kQobx3hCsqYlCqltskJJDBq8 rLaHepep0o02BJRj4ZJGAlZq4iGmWvhBI/sRbwrqy06a0HVGJ1jNpxmfkP6Sz89L9GBZ C2rZdrvVp6/i52SOa25hQ0INBdg6Ds50xv1kWQmkLwP2wq3ne2OYfEnR09YeIYaCn5ZW GYRkH04DJHH+AZWr8vtXkNZqCkfWqvSDaXRVq7nJvpyxcQniJl9BVL6zd+KDgvBdaRH1 QBmnYvcYUZZeYPrz2tn8XYblj2OQ0vgd1XVT9STqAKhSiCZHJt08Hn/Bo1xyn4OPlRfo DlPw== 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=MNm3PZEpx9MW6pAdvXTKuCFsUheDm0X3VhqqiRiS8iA=; b=LHLgeLW3xK2Tjx+7EZ7L7n926auHi1j6YDZ1DWrWKQqiBxtVlus4eVw+EK+ocrN3E7 EfbkyGD3KzWWDGrVfWEZWj5QF4uRaPV7tdn9qQKOuLkZrtpdIUJIXAJnMnfC0Vq+963m ZG99dWmN1yOoQiRqqrTICLr2e9uQQCitzvnZ7MD59UtRRrcRDhlzLjLBwZoRzrCbkU2h iMDB0YeTvYc/Ae8obWqfYau9z1mwGM0DbQf7UaNO/erXOxknan33vnw+mcZpxm8cjvjk 6pEOw4eo5ARemXP0vQYxv+NwNZLN54YeFL65+2CJQYXFsSGPvfdA9yTry4G5VDscmLwn LrIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RNjtSAvQ; 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 z3sor1810487pln.53.2019.06.11.07.53.11 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:53:11 -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:31a4:: with SMTP id x33mr47571153plb.331.1560264790880; Tue, 11 Jun 2019 07:53:10 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:10 -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 20/92] ram: rk3399: Add bw enc macro Date: Tue, 11 Jun 2019 20:20:23 +0530 Message-Id: <20190611145135.21399-21-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=RNjtSAvQ; 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 a4b1742438..7e0b491859 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -59,6 +59,7 @@ 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)) #define SYS_REG_DBW_SHIFT(ch) ((ch) * 16) #define SYS_REG_DBW_MASK 3 #define SYS_REG_ENC_DBW(n, ch) ((2 >> (n)) << SYS_REG_DBW_SHIFT(ch)) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index f69194f29b..3241bc285e 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1028,7 +1028,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_BK(info->bk, channel); sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, 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_BW(info->bw, channel); sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); ddr_msch_regs = dram->chan[channel].msch;