Message ID | 20190611145135.21399-17-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBSEA77TQKGQEUKRI4ZA@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 97D533F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:52:57 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id t64sf7529574pgt.8 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:52:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264776; cv=pass; d=google.com; s=arc-20160816; b=RIcAKl4A4Nyb8xrQfxXTcz6IPh5AomSRxdU392/GaFXL0XfkmKcS//JuMohvDUO+6g jQW1iNnxB4HlY4D82Vh/bORAJ/VFcpkTAnp/WrG21wtF66633mtA7GWkYxN1Nb5Nip+f YljOvw/7ui5H7Lu+KqsILIC/lygevB8lNXyWpPtpmIFLc69O4/SqonE0yFbS6IQHFAJ2 0WtE77Ri4+sQ7BkN/m1GjubC1yTs1ts9mD5pUXYbecnm/3ghjunCoWWO+/0vfKejXm8k fl8ku0FRXcafGikt7T6gUPZJW3wlh6QZytumzd6LPKkFZkKm2wFiMe1H/YORm1wnpLuT 5Seg== 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=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=dWHVKlRYDc50qK1v8m2Z4Vo2M8yl4uNm3e9LAtRyFRHbmvIhLLNm5XRmhXHgCiNcru zrAyXgqpenRGLzvMI2tVUealdRq4fFYkYQYtlfOs9c3mp9cXF6hLDGVD5/J/r+Jn17ZB sImEdVAsfPNbRNV77PVxgpcUwngISKwoxKYMjIEcyM4KJPwIIAwaDx8LS7ieKuP402xH uBT5nR0ufqCcqrA22n1DnH4O4GQ1d/ugcLcS2wmI1L1aTrx1xHr5lQmEn57fGixtQRt1 Hk0xTvbRy9BXrX//9n/mqQF81vQJF3U/Q9NA5c9RBTG34LOLdiNcwzCwUqNut0KRINy9 qq7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LO0Q6OJm; 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=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=AVGY/Jr093oY0IuUs9LKzBCKv7tBdQzA2kE/5roDeb8ZIwNhNdLDlwACThSOY2QGmR ekKVniltii4lwojhSe71l/7rOPbAOIVBrbE9G9alBYS656fqmK+6XtJk23tObNCOKo77 HzUYvCk4U5VsS7f4ZTyqqECohlLkvma/rzxtA= 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=NH+4RCvJgLLzfQ3tZeAFVNO4iUDFnqu68fDbUkAYqSM=; b=rToVNzgbTQ6jjsGASGkUcZAfmpDRv4e2lmkgIbPTsdeZharwNFbhHvuz0+HWPaHY6F rTn/stH9s6b1BtwrFxYBS8+0BoGpe+xzSiaBsqtoFSXPZ6Kcfu8pgo8GLmdIG8bjf573 8rOO4oRaIumYPGkwm7uWQLqfHbmOVJeE7+/hviMetmH3AOSW5ESy++LHFNdLaNWILj4J CPqpH10j1zoVKuPAieHhwwpaKdgkDjoCGQsy5sYLAEKaSXHUEvRh+Udy+MtlSNgsJ9kt lLIfmSWOhzEFRmbYlP0BBSc9XPdRIbPpvl5ruXTQ4pDGl0UbuWZlkML5PSkKOyxLHPhF setg== X-Gm-Message-State: APjAAAUR5Hj1SfyFV+utystMTCfcfeIocEwI1vipHBCg1kw9iD+c/bPB uFW3Knt+nkKSezP+36dtZGEG/6kr X-Google-Smtp-Source: APXvYqzqnLXQnoxnVuau35JAXbprAxigbzPW0jteJPOmZuzngOA0cNRGEz7th9VRj+NwQf7U4QT+Ow== X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr29841271plb.277.1560264776235; Tue, 11 Jun 2019 07:52:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:760d:: with SMTP id k13ls4888630pll.14.gmail; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) X-Received: by 2002:a17:90a:de14:: with SMTP id m20mr26792816pjv.36.1560264775843; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264775; cv=none; d=google.com; s=arc-20160816; b=FoogpwpCahhgV6IkslmVqLBbp/hCauvr/w+FkoO8fLv8pX37AwbWbKwZA96KJ4Fgr9 J+wrFxPDsDMF+oPF6nWwN2+2LIjKLHsYNyG3x1JYs+alhJi0u8eKXDhBdvCFLOcSnUot wMh9gaU/kTHk1ay6aqs9BEhXoVDZR0MAwNlROO8kGIyi1kRMhEVyh/ghRszN92912akJ SAojEtNEjw/Q3Px1xWrswCQXd1ykm5COORQamN5/ssu7n31p5FQhGs/zcjr0H6PWQZxl v8NNF+O5eTkMXKYiUwsaaDNVTxj20QQVdqaHwvjFlw9MbqKT8puhawJHaX+Rg/fz16uX Wgxg== 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=HRSwurai7D05BObAUlQE3Iz1vMMyKc3TU8vO7TNNVG4=; b=MHTtytzz+ZhKI47GCAFNtMdPstdjwwv1K+qIbl5AY3veS6hCuhRxGt2LQHeh7dmMgB Iyfigix0niUahShEPm0gygCDasVrAnBI4K4agkMMozkQNkaO+UO4Jjbt6Ef6u3A1nxn6 GxpTY2g2MH6xPvqFWAuDWOhme4OS9Dt9I+3BjHz39I36UEgJ4JL23+YEbWK+vLcDjbv1 DUalXlCY8Oxb3fKFS+mt8pxupkFGMvmJPG+gA6jWpCZbjr6ecBV631/DGzapoZVF4KtO riyMlWCjQUMqOuo49rDiDKLz1Y/55FPwmh+nn3v9+JwFdLC9bZx2EnBTOWqLoBHsAiWy Rkow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LO0Q6OJm; 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 v75sor3152685pjb.26.2019.06.11.07.52.55 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:52:55 -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:90a:fa07:: with SMTP id cm7mr6440701pjb.138.1560264775502; Tue, 11 Jun 2019 07:52:55 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:55 -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 16/92] ram: rk3399: Add bk enc macro Date: Tue, 11 Jun 2019 20:20:19 +0530 Message-Id: <20190611145135.21399-17-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=LO0Q6OJm; 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 8e809e8dd6..8a71e8ad87 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -47,6 +47,8 @@ #define SYS_REG_ENC_COL(n, ch) (((n) - 9) << SYS_REG_COL_SHIFT(ch)) #define SYS_REG_BK_SHIFT(ch) (8 + (ch) * 16) #define SYS_REG_BK_MASK 1 +#define SYS_REG_ENC_BK(n, ch) (((n) == 3 ? 0 : 1) << \ + 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_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index ad6c74374a..2614fef407 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1025,7 +1025,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= SYS_REG_ENC_COL(info->col, channel); - sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); + sys_reg |= SYS_REG_ENC_BK(info->bk, channel); sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel); sys_reg |= (info->cs1_row - 13) <<