Message ID | 20190611145135.21399-19-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBUEA77TQKGQE5AN4IHA@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 429C13F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:53:05 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id g9sf9248732pgd.17 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:53:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264784; cv=pass; d=google.com; s=arc-20160816; b=E6z5MohtQiV+mFWHYgS053IZue5Zy+ui+vq3Ms+tUdm5ZLyTN7rn0HEYWojSmlnDCi AwYhPtO/4sBui25b4pHVBXMlCkel4DbhnJRTzEgWO7Q1N+EI+sq1SJkH8YZ27fkfKwG+ ZT+321+8vKLu7tE69Nik+9W7j0PVDdDIXIenEWAY4tuA/8iSMfdDFd5q9zxuDhgARDoo 0cOt2Qz+aYG5C0zBrFGPb4ewVrP0jhRqjzE+gasGs/wWXiT58HmM4dsZ1WvzrGxeBrcJ FZ1jCGxcoxWpuYdv3no53ylQ5T43xRQnqVMynTKl/xNEZ5uO9BJtu9RBcx9GzP/vx+xc v2pw== 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=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=J45m6nk/h2lkNKFBf4PJHv+SY4gJ2JubdE24Ldi63ae/3hAFjMvVo0Mkf7NGAwF5fT LVHTKb7kekMfqoKOmP9OTEoMRKRIvoC9XIj+ePn1AA8Qvx1J0CqaWyoxV+bkOBKHkaVg /BT0/954oarECC1nLdaayoQuIfA/rYfmEAwCGfIVo6exKtsy2rKjHls2nvGOh6/iokPz v5xPfmecW1j3jgQkTDcMxphIDbqKWkP1mm4/kDFO3TuPrJ2yM3oUc0/DFG9R1OOCZBqm ebG2wB1teOSb6PEChy2IW4W1G2HAt3TKiYRPCwHh4gfUIk5jt2aE3MDKuVbM01pIrork cKfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=T0WdShfc; 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=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=Ki5kWRRMKLEf3YCPYvVeN0FpHcILzaVqf5AMRSmQvWwK23OWiF1MlUZLRoWWHvu2Hg 4SKgdnLigOco+6kdXD+sURQJw7lZtz0/1d+74X3qkT1FiES5t4PiXnHVWjUQMb1Tdxg0 GPBDhkoT+pmA2HuzGqNq6mW0jTW7b9U4F53R0= 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=HngKkcgjNFz2bS672QHjG+HBbHw5dyNC4uK0Aaxl8oM=; b=OxRJPqMIl6ZIIbxf37brxRaXTpGjujMB3FsT7AHECfxE2C0A6v9NiV/lVK3VX05F6Q vuHvNirZX98bU+dpUG6o+7OephHZXfJALrKhKZSKO92C4FGftI67JF9x2orhCgHo5pkm I6erIIp5mp+ct+QCbZmFxKjAZdD+htmJmgo7D4rzLoCeddB3TTSwLkmdxGYsMRn6KyOS kThe6Xz+bd7kZotWdrunn6QvKcThW5qF8gJOhYeHM3Rq6eqw+wSKCGAzAqLJOYs+9UjW EtE0i78yPbazQvm1I6yKaSEkSE5LL2ybXUEl7XVa0UQJHdHk9SXjlHL+SOARxcq3de9z J4yg== X-Gm-Message-State: APjAAAX4M0Pnd46HjSpmGlDjysODcD8Ro5NFYpwVIvFvb4gAn0nucU+8 KVYz09leHYWBxxjPBC88qns2g+zm X-Google-Smtp-Source: APXvYqwjyNuRdpmFsQmkNM2UHg3ZFrQbzECGJsyPshv/MMcGbEg2yYg1U7V4nZ5whskGLP0IEMsl6w== X-Received: by 2002:a17:90a:ff03:: with SMTP id ce3mr27028838pjb.81.1560264784103; Tue, 11 Jun 2019 07:53:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1c1e:: with SMTP id c30ls4511347pgc.14.gmail; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) X-Received: by 2002:a62:160b:: with SMTP id 11mr80603154pfw.30.1560264783779; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264783; cv=none; d=google.com; s=arc-20160816; b=lonPNV5ub//RQ/u9PBW/nQixJ1AMYmUmKqb9j0MSx4RIB9FciC+JJfunTELuWVzPBK /YS4J1M8WPyJXmXG6mSyL011kHEY64KZqP4co+kc+Ug8DsWPbOuFN14U/a6CM5nj61+o 7qYduj77t9Vk+kLPPdlaQxoyqNdrN/FrjUiS602hWr/jlQlQDpCb4f5+DTlrtzMYLAtb 54/+3B4F19EAvpdTVrrXanLpEHd5VUUb3IgL1eDRD006FKcWLCqevnumQQbK5CTZD9yA 2aDntszTQvxFfuGXq5/T/IcyWJre7oceb6acX+DmW4Zckpu9Z5hc+kDvUytFGXl2nvnP eJQQ== 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=o+DRTYHelsXkRTvkcjv8LykYwXl9zXvDsP/xd3l/rlQ=; b=WA2AB+X5R9tFpFyciAyWbOtCmx7CQGG7XnfoY/WQ80IX9vnSEQORE1C+xfuWChe69H sKVKacOZv+PVkPk0sJ9quIWAXuifod/r+GlYyl4eDsK4vvhiV74j6VzkeUhk5CugEb7k 44gkHIEptdB7OlDEGTnDeov420z99/X7BZZ+VcsDEjoUNyELleoRuBYVFhoCB0J9GAG4 6ty0Fhi1l6ZAA4SXxlGv5SsiRUk1sIYRdDj4Kf2VaBHtfQDCS7YJCD5rk8+hdZh1P7KD UWWTjTfp44kZgvCqpzOAoeKRz5ieJI6I6uGvgbCeN+YfG8hkXWK8FqBcAZxe0ljSf32G H42A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=T0WdShfc; 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 a8sor3151606pjs.19.2019.06.11.07.53.03 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:53:03 -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:338b:: with SMTP id n11mr14237563pjb.21.1560264783437; Tue, 11 Jun 2019 07:53:03 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:03 -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 18/92] ram: rk3399: Add cs0_rw macro Date: Tue, 11 Jun 2019 20:20:21 +0530 Message-Id: <20190611145135.21399-19-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=T0WdShfc; 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 3b0557cb6d..5c94dba39e 100644 --- a/arch/arm/include/asm/arch-rockchip/sdram_common.h +++ b/arch/arm/include/asm/arch-rockchip/sdram_common.h @@ -51,6 +51,8 @@ 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_ENC_CS0_ROW(n, ch) (((n) - 13) << \ + SYS_REG_CS0_ROW_SHIFT(ch)) #define SYS_REG_CS1_ROW_SHIFT(ch) (4 + (ch) * 16) #define SYS_REG_CS1_ROW_MASK 3 #define SYS_REG_BW_SHIFT(ch) (2 + (ch) * 16) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 4047b4b7e3..e3555504b0 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1026,8 +1026,7 @@ static void dram_all_config(struct dram_info *dram, sys_reg |= SYS_REG_ENC_RANK(info->rank, channel); sys_reg |= SYS_REG_ENC_COL(info->col, channel); sys_reg |= SYS_REG_ENC_BK(info->bk, channel); - sys_reg |= (info->cs0_row - 13) << - SYS_REG_CS0_ROW_SHIFT(channel); + sys_reg |= SYS_REG_ENC_CS0_ROW(info->cs0_row, channel); sys_reg |= (info->cs1_row - 13) << SYS_REG_CS1_ROW_SHIFT(channel); sys_reg |= (2 >> info->bw) << SYS_REG_BW_SHIFT(channel);