Message ID | 20190617073252.27810-17-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBKUGTXUAKGQE6Y5VKXQ@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 21D973F072 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jun 2019 09:37:16 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id s4sf7226302pgr.3 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 17 Jun 2019 00:37:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560757035; cv=pass; d=google.com; s=arc-20160816; b=LjnMVp2yDihZCLmAL43mUfF4USnfBgiSHv4uVa1WEH4tqDurt9997JtakXNV68/cnm TPz5HkZJYVK1oMNduYUoW54FlGqnD+1J/eijQj0e1ozdvjU7A93y/hmwIusRkA9dxQIU vTcqBFQ2qt5IqQK00eChr4zXbaHWPF8Q9VHu9HfVlD/D2E+DtyuBVn+UeXNNeiJK4mth 2f7TGTMvbWEA7lEQZrSuTpezZ/7ZCt64K9PSqLu47J+wGEXx0kOWmv2rhOB8j3iV8a4V PwvsJys7Clh6sq7V4OlmSlVJqo4uGLY7MMCBGw9+CykM+VmK3jM9n4SRetsBBM0DdsXf eQuw== 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=HFuipCxw76bXXYBSn6zk1wnb95vn3eOGMRQ+yi0y150=; b=eFWTubelQQ8VRpFCwZuQwAwGULO57ygkufWjWHZdFCymeOoaPELErVSBBQ5RJ7PjKd mok9RD8nlAQ9UbMQ39a0Q2eMArp2De0CyVsegs2KavD0h2I09h+/4h2vF0iegdBKfPYz tq94gf3SeQYT/XvFVp/9gMA9wjNEOPqXBqEL3si5QtPHYGXmsc49t8/xSrGwX6eNEene oCyGGlHRyd8q6W2E6xDxc9xkhCkOpvY7dMHROPKUBtY5nNhd6k90bQmUZxR0T68+fdLl 3NfVfuC+kMX1C/SeOYDGUkJm9f/mtpu6fMR0VzY4UxFgiGUv49EYr5vWcTUDgAdd6887 HneA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aDk35/8s"; 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=HFuipCxw76bXXYBSn6zk1wnb95vn3eOGMRQ+yi0y150=; b=Yrf8JaSFx0izxS4a1+t1m2vHX/Adr8nuEp7WLiN1B6xQ6ak7USKkjts6Iu0vOxYZft ol00yIdPRTxx9Vaus6+Clafm4XDinGFaC/D2Z07xu7qGXhwbdYqjeVIuXvSSKqDEJE+1 ex/CR3pYZmvP+rms6lyrEtujN/a7VNU20OObU= 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=HFuipCxw76bXXYBSn6zk1wnb95vn3eOGMRQ+yi0y150=; b=ZSyDglbqosjp/zudXdAogSgAsN3d9aIHqPeQF3TADc75wHpMvWrdpkx6XsTj5S7A4d JixHHfN+jiM1NMxAO8FLVS9ReY2En4p/zL6vzV6huNhnDgNF/Ny2CNm4LAW93UD1xN/1 zxSQC07Vqh8ReDWyGUqAJmUab58HeH7hxfM5jT+pUgTVvAlLx+UeGYuPZpuXm3YwMnf2 wRTb4EDpXxw6wJktxU2sLEGF8AhZ/wydBpBO+p7tcCzm+iWs9FWS7Sf2NzAhVjfi8+yQ X4q+A2l3qxMxQS6i06UHEZkhmr013SrhOkfbwgARxIG75fzh/Qe04dYeMdoH4w4y9J1S XdnQ== X-Gm-Message-State: APjAAAVL9MWrMWBdCwh99VwjwgRP5Wu3HDJC7jCSHxmcxpdzGlNQvrgO KwZlijRKPi549++u/ccTfpmQ7b3G X-Google-Smtp-Source: APXvYqwY3VEtaFQ/0ejOrmxjPvJbroPFTjaz9XylOS3S/xcTFaTGXJC3NEczi9kzg03buh5b0Fw/SA== X-Received: by 2002:a63:31c7:: with SMTP id x190mr47725052pgx.376.1560757034905; Mon, 17 Jun 2019 00:37:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:52d2:: with SMTP id g201ls555715pfb.9.gmail; Mon, 17 Jun 2019 00:37:14 -0700 (PDT) X-Received: by 2002:a65:4009:: with SMTP id f9mr17791541pgp.110.1560757034444; Mon, 17 Jun 2019 00:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560757034; cv=none; d=google.com; s=arc-20160816; b=xGoAc97vO1a83RuundGq463+QRfupeSSm2yTZcH5aR1ZF2dzPpyyTZZ5jTK4dwDx+V CiRq8VvQlzRVYWVxGTQnem+gi8IalsQmKzpWpyh5ZeCL2JzOzRDG60JL7ncBeoJVz3D2 RItmSQAc2ZdA1PEBoCgoOHwrrhp7VluX035XZ/oIS/G1GhsIuRLi8peUF7fnZP1SU3PI PcoLSQfiQ/WjNFGspbwf/LxR/zXr8AMWCtD4WuxoTTiHTICsRPQrt+AIEX0rOxBA72ca A6As9tsb9FUVvz03kruWKJSDGAOGgFpsBWB/ryau8itOURWW0IB9RaLa43vLvpN33grq gmcA== 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=eTIwIuvfrXarYBFBkIvKvzP/euv267yR+rTP9T/M9Gc=; b=dILXKbYu2c5GbRl+j9dbyds1v/qc1K72Bpa/zmWnLlAvmZ6g0QY4OC7Sliz1mOscKE jO6PiaI0UtVW2a0fx4GuJ/w064LwM4e3Qv+nLjqpx2GaGso3o5+6PQLSgfd5u97zsRr9 5clFVdHpXa78G4ECFSD+1fBbGWmU8k0yayDZaDlgcfz32JsFK1ocsjlcqM/Qz6j16uvg +iR92jWW/kzmEBMrNMjPDHfr2EvmHFJkSGiFbeV7/6tkF7FMCqtSzJ36WiaSB+er7BfC vpHABXJAjVgaCJqUDOYO+AiEcpWrCwbCYatRlDUoxvvcxAn5QETHOPeyQh1xBCt+XrPN SJ/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aDk35/8s"; 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 n24sor10152391pgv.64.2019.06.17.00.37.14 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 17 Jun 2019 00:37:14 -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:404a:: with SMTP id h10mr6114479pgp.262.1560757034093; Mon, 17 Jun 2019 00:37:14 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.245]) by smtp.gmail.com with ESMTPSA id m41sm15205998pje.18.2019.06.17.00.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 00:37:13 -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: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v2 16/99] ram: rk3399: Add column enc macro Date: Mon, 17 Jun 2019 13:01:29 +0530 Message-Id: <20190617073252.27810-17-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190617073252.27810-1-jagan@amarulasolutions.com> References: <20190617073252.27810-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="aDk35/8s"; 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 e2173aeeea..8cb564960d 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -45,6 +45,7 @@ SYS_REG_RANK_SHIFT(ch)) #define SYS_REG_COL_SHIFT(ch) (9 + (ch) * 16) #define SYS_REG_COL_MASK 3 +#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_CS0_ROW_SHIFT(ch) (6 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index acc8f17491..ed2e0f54a2 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, sys_reg |= SYS_REG_ENC_ROW_3_4(info->row_3_4, channel); sys_reg |= SYS_REG_ENC_CHINFO(channel); sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); - sys_reg |= (info->col - 9) << SYS_REG_COL_SHIFT(channel); + sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= info->bk == 3 ? 0 : 1 << SYS_REG_BK_SHIFT(channel); sys_reg |= (info->cs0_row - 13) << SYS_REG_CS0_ROW_SHIFT(channel);