Message ID | 20190611145135.21399-36-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBE4B77TQKGQEFXQWUXQ@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3C5E83F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 16:54:13 +0200 (CEST) Received: by mail-pg1-f199.google.com with SMTP id k36sf4779783pgl.7 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 11 Jun 2019 07:54:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264852; cv=pass; d=google.com; s=arc-20160816; b=zapn5fKeUA7mcbGV7as9nvugILCIHnEVSB+aIVf5cVnkWcmQojG4zeHXK3q3ixxYZV 8sfdH3V6yxoSUKYwYfsl/it9x+TLQWAcXiZuCj4WLzofhtInlWE7ajxEDnxNScHvvuso N+q4S86yHgx83BxXcCw/ZJ8jCK0IjRicCkSpfWZHap8TsGBL+PU10SUlSCzsr8szH13q wUh2YYB9eE3SGVWHQvwuqr8t4Zt0OPsnbvhp5hthhezZ0zPuX4Cf8YnxevsClrXSwRGk vwuMYoeLcHJfeDyht5iG1Z3a/ebKFwGktAuI0jRPbK20/NoOHe2mCVHNJaO+VleOUX4U Vpfg== 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=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=t7DPfeBGvmQp2Q80pYMQwZVOkct09oY3K6dlBX+jHtnbBHtmcVc8A3YLKipVQBcqG4 4LQC5O0Q4WwrROXS8Ghso+Hv4XgGa/cpsarz+JIwt5fAydhZv82AE4SA+zP9ZaYoEa+p PY8t68KMV1O+BqtKBIr+azf7EVjU7/e91M/DCpuQIQnDnVzsMQqmCzYc3YLuSKasvX7t 13fzw5A+97kkKs5U2jhs7o9HM8bhV13faCwHRmBGsKJ5Sgc0Qt5Y6a1VdTkQ563d7/cf /Xoq4Ia1NgDsnmYT+0J9CEz0mWSx0aEng86vzItbUvYUa6uMySdntgGkc5YIbjr2UsC+ hZew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gvx4Nazy; 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=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=qwEl0KdqTddRBmr5YGWTjq1m8ejgReXv2bhz5WIlvkZlZQ6ciOTsZxFkxNgqIrEU0O DEuaGICY7keX4aj2sQtj6LsYH22EW5ckehb1Bc4BWkCUlM6SX6BUlhKHTdvXxXqS48Ka 030kM+JDkbLrkw0a9iGTSfoMODxjaa6yTG5eE= 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=1gzqH0P7BCJp07nN6hUDnyS0nxqKJZ7uAlaxPQQ1sZQ=; b=HS8iPV6lGrf2f8ckpZhm7L7pwn5gM8ANvbfsmx2VDzp4I4EqWaSPS1pCHVUcPRJInM /PDUMEaNuMRh44zXGGYU6btlKm1Yi9fo7qpcWlxxgPBTOnTP75byGkZKpFBWHeHnMyr/ n46cYV5HBhFxGCIbRa6craEBWezX6IZfwfMEtbuhon+8hrekppJqrwXwK9jyqIvDn2NW 7V9NlQwrboMiNi8LIQ9KhEGnoZzqZ3Cj2GBzsZREZVRW6jKN9KrS1vCiknleAkS5TlE5 ba7uBs4Za9Pui40ieT4bLoR6wk6fEltcoufPn7xdzEmdiWbpaidlqLwA9e+YLr4wcz/X qRPQ== X-Gm-Message-State: APjAAAVuUMwE1uBYr2xlqDazduQDBj/EbvC68uNdqwPgIja43lGkZEGE eUpCqfHid6Bq53N6lqUc2Vbh3M+d X-Google-Smtp-Source: APXvYqxr96lfJ+doGWIuLKeXzLMgGW8Aet7wyTdRSQerWxuTo4mrAGALdhgwFvgOnct6fwlT0juKfA== X-Received: by 2002:a63:610d:: with SMTP id v13mr20346631pgb.341.1560264851876; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:2b89:: with SMTP id l9ls4897055plb.9.gmail; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) X-Received: by 2002:a17:90a:25e6:: with SMTP id k93mr6329855pje.100.1560264851512; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264851; cv=none; d=google.com; s=arc-20160816; b=VoMGgWlcSAx5Rir899EFX8vxGG4M6rAqt2llYeFWpEpklRLvcrN47RrFXekjrIeNDC YizygXHvqINSj/vNhozNdI8MRRQqB+Xol6iQhyj1P8FNgf+ny2vIDRm8yPayMUQws+uj ZfaYZ8BFe7xbW0F0De2B3ec1NashRnl7SBC/ABdLXQIvO5ZXKs33Au3e6A63b24WRlji zYLemqx9gpH7zS55ftjc9VdwPQqOLY46hYHaYngP2ONN9kMtJCUgaI56dnDxi4h6xuJ1 nEHHlIyzUVuHJY6XMPCrZIkle+LlqmNWRfyhuYO58yUboqG+Z3YBtr6+j2ZJrDDXvIzK c3uQ== 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=LqdRoMBofZUwal7ZnZtD8e6Bzf9aoQ3r4aEYfycEPCo=; b=Jd7SLOsJl3TWzSyWDcINP3rXqhymqwtOLTAI+EilkEX7RzJDL6drr6lIAWbg+E4wjQ TCfIz8A7K/vkeKkccnGqyzKLnyVGuJFX3392msHzlkDoTsSqI15kzFMPUnx0VI55sLOl /Dcmwuux5rBjmc8VmWjFarhqcqWOfm2oOg9E1TVcjTNDDYbuJzuKd6YeB5t9g04RvB1Y 62f/LceuOTvjmsov+l5ofFqOIC3i2ZQJbaILV/EAdmqOzdAKlj4HHE/DrvbgwDh9kjHc m5QjdXRCLRkrOHn1yU6ufNXeqfUSyb53kZKRRVaAK13sCRjvmnJ3qea9UAylf5Z8WlY9 g+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gvx4Nazy; 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 d5sor7483519plr.38.2019.06.11.07.54.11 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 11 Jun 2019 07:54: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:bb90:: with SMTP id m16mr9745579pls.54.1560264851186; Tue, 11 Jun 2019 07:54:11 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.54.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:54: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 35/92] ram: rk3399: Move pwrup_srefresh_exit to dram_info Date: Tue, 11 Jun 2019 20:20:38 +0530 Message-Id: <20190611145135.21399-36-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=gvx4Nazy; 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/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index bbf56f29ae..7ca76d304f 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -49,6 +49,7 @@ struct chan_info { struct dram_info { #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) + u32 pwrup_srefresh_exit; struct chan_info chan[2]; struct clk ddr_clk; struct rk3399_cru *cru; @@ -487,8 +488,8 @@ static int phy_io_config(const struct chan_info *chan, return 0; } -static int pctl_cfg(const struct chan_info *chan, u32 channel, - const struct rk3399_sdram_params *sdram_params) +static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan, + u32 channel, const struct rk3399_sdram_params *sdram_params) { u32 *denali_ctl = chan->pctl->denali_ctl; u32 *denali_pi = chan->pi->denali_pi; @@ -496,7 +497,6 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, const u32 *params_ctl = sdram_params->pctl_regs.denali_ctl; const u32 *params_phy = sdram_params->phy_regs.denali_phy; u32 tmp, tmp1, tmp2; - u32 pwrup_srefresh_exit; int ret; const ulong timeout_ms = 200; @@ -516,7 +516,8 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, writel(sdram_params->phy_regs.denali_phy[911], &denali_phy[911]); writel(sdram_params->phy_regs.denali_phy[912], &denali_phy[912]); - pwrup_srefresh_exit = readl(&denali_ctl[68]) & PWRUP_SREFRESH_EXIT; + dram->pwrup_srefresh_exit = readl(&denali_ctl[68]) & + PWRUP_SREFRESH_EXIT; clrbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT); /* PHY_DLL_RST_EN */ @@ -592,7 +593,7 @@ static int pctl_cfg(const struct chan_info *chan, u32 channel, debug("DRAM (%s): phy locked after %ld ms\n", __func__, get_timer(tmp)); clrsetbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT, - pwrup_srefresh_exit); + dram->pwrup_srefresh_exit); return 0; } @@ -1176,7 +1177,7 @@ static int sdram_init(struct dram_info *dram, if (channel >= sdram_params->base.num_channels) continue; - ret = pctl_cfg(chan, channel, sdram_params); + ret = pctl_cfg(dram, chan, channel, sdram_params); if (ret < 0) { printf("%s: pctl config failed\n", __func__); return ret;
Add pwrup_srefresh_exit to be part of dram_info so-that the it can help to support pwrup_srefresh_exit in individual channels while starting pctl in future. No functionality change. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/ram/rockchip/sdram_rk3399.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)