Message ID | 20190611145135.21399-18-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBTEA77TQKGQEAPCLWGI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 75AE83F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:01 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id a13sf9259755pgw.19 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264780; cv=pass; d=google.com; s=arc-20160816; b=EaKuorEoNUiduTTxdSLVOwJhguRWukpa9mhK7t0awgQLvgomDUHhyzODmvDfY7efbp VhZKYzXl0+wCHCzx0iyTO5Lfm9O0oNfkRABdNI4xBg/WMX+6Ygo12BC23j3mRptCg/Ue T8rPVaGGNDyTWY2MyyLISNMsP9oqxy9+bBU0wp/7FlxnddDjBwCFof+ip37pbjZuG12v JBhZld6AjKTxFFvZWM9KLUpa8H1JISO6VeEq7ooZq9lOBhRqNwxepfmGYBBT8l6yRXaU eEmXxNUCZgQwsm0Yt5RHgCopG43lPJdLC39RceDqfW77Hfi+lGfrSvKJhTt7T1OZlimT TneQ== 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=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=EGMlE7VtRR5JmucOOleQV0QGuYRilS74pxQlmAQTTPS/Vxvn9q/ui8/eOyiPNoojw+ jUEUFT/GUGYpMN4PceZHxJw82bzLUj2ItqZO856TGd08s/BcjQUHcfM/OXPTqHD79CXl aXg4HR9TmPb/oNdsnAxlKvA7Xwg8Hpp4358zkBY0iKvwD45s1cvEPIGa6pTxasSpNbsj KAjJj+a+4vRE9EDtxry82Id3By0MOqX5yC6Y7NkUTeFa9RGhyWDErAbnpU9PLCa0hWb9 kI5zUZ7IsPHEnq/H/wgU5/ruh9T1915pSr9NtErlO72r3vDeh83YIJ6hzGQAZq+WwmBT VvBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jvVjp8hb; 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=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=EMZ4uSoCegAjEP1unireRMlYUqxQ69QpxcQjHjPElvh+m3cfPmQuTB9KYLMWNpFqzW EO2I61rfb7T/dkfvIvXOxRsz6gjzLt38/MCruHsT6ZQms11T37roPPlMiY+Oxtav0MxN 3EGr0rz3pPzwPBvZBkgyhGLjfmV9pcmcv9+y0= 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=wuQwjVA18kLC0ZiUNXzCZWw2hkGUUklBgsioBWsp7Kk=; b=BpmFdqPIHexxykQcOYUZ/7TUQrKSSJu/RU/QMjCGoPGLLLvTogM/h5fJVH6Pr3QUi8 nHbWir1YoZjRwAAtGD/Bcjg9ra7kPga4PF8jjqYAdDDtW9rX3onsQ33k1XqVMwmGNfVM v82DJ1wh5oFAPUCjrjym1SFxwoZfIqF0qAnxhXX9KkgG3yU/6TbqGKNYYW7mwZ+OFm4m YyUT1sT1JcsKIBrAsKb/ed2VjdvGQPMmdyhtm7UJW028tC9jxnUHWYt3jq/i5s2XOME0 nM7DCgy5omRtbwsTr1DdlCaQy93nC1jWW485AXjgTcq67qOgOjvohObF4wNuNhUrnVF0 mSUA== X-Gm-Message-State: APjAAAXSDJu28Gl5+nuuiRJxJRdOmKeazyhS4ao/d12qIhBBX3R9VZT3 6C0+W9bIvpVPiHpD0xj+hRm2QOvZ X-Google-Smtp-Source: APXvYqxPWSAqbErgQzfDxjtzB5wvqgJPUAQSWQdmxV2Sk9i32FwCzCKeUGqtki2xBpnNjCA9Mlaydg== X-Received: by 2002:a63:ee0a:: with SMTP id e10mr20400305pgi.28.1560264780154; Tue, 11 Jun 2019 07:53:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:868b:: with SMTP id g11ls4890440plo.15.gmail; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) X-Received: by 2002:a17:902:bb8f:: with SMTP id m15mr11127048pls.84.1560264779803; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264779; cv=none; d=google.com; s=arc-20160816; b=QfsTeNbLx6c1n9HvrpZEm7oqgxgBJfYzQ/mtqGEvwXG0G8c3pbvXZ0NeR3Uv/mOI48 LVMez+nHKgeKE4Pf8F7nuHwoxwIkBgQCgN8HJWhuldKXGOvk7erZdYy7r7XDxu8rJEjJ hJRMEujzFOiYJQhaPtOOATdf1gwsVMbtRhKIRSvpXU577D7tnjRfUk1/+/mVgbix7x4b TNVti4JGwXNkKKz/z5B623p/Xmh28oJJXP5i/I2jFA5+Hblgl6rqzx/Twz6z9AedksAO vDhCEcILHgXRnXUmDs+n1FFx5zE7ELj8h2tg5nY8BV/RunDITtqT/N9GzrM5tZ6KHnnf BsXg== 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=R+1CMpZiNEH+ushANNr2dTBii85xIEL+0FGwdkiznWY=; b=Sw4gHIK+9TpIxO2X4Ynk9xx1rv1G6oAZjRCFH2eLmRjLN83ayEpXjj+EAyTUHOVoLm uf91LL4YmZOtA6dmQ5bA/DSIZ/f/mNH2LPmwmJzjGqqmSMs3J6qlGU+B3X/aWvB350Bl hfGQt9xPOU2UDH07T7S4tZSO8vfuEWKBhZrgzqXmmxb7GF0wk0cdNFhamxzFqiFirk2j 81Sjh0uRtyA30WSM0bpT7no7wyauuaryImshupWwsqd2d1XUZmC9VAhlyX2YlxM+PH7H LptRRxeLwqjxqtNvJA0idtzzT2tdBT5wyJa5V4Jbo9FzitaKF0rsNO5YimA11Dhih+az jojQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=jvVjp8hb; 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 36sor15300775pla.71.2019.06.11.07.52.59 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:52:59 -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:934b:: with SMTP id g11mr63998336plp.245.1560264779500; Tue, 11 Jun 2019 07:52:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:52:59 -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 17/92] ram: rk3399: Add dbw enc macro Date: Tue, 11 Jun 2019 20:20:20 +0530 Message-Id: <20190611145135.21399-18-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=jvVjp8hb; 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 8a71e8ad87..3b0557cb6d 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -57,6 +57,7 @@ #define SYS_REG_BW_MASK 3 #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)) /* 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 2614fef407..4047b4b7e3 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1031,7 +1031,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel); - sys_reg |= (2 >> info->dbw) << SYS_REG_DBW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = &sdram_params->ch[channel].noc_timings;