From patchwork Tue Jul 16 11:57:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 761 Return-Path: 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 4C8A73F08F for ; Tue, 16 Jul 2019 13:58:41 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id t18sf2521037pgu.20 for ; Tue, 16 Jul 2019 04:58:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278320; cv=pass; d=google.com; s=arc-20160816; b=YyxVWmw59aBoCYUFZmShGExV2+iMQMviY2JgPfcfkUr2Ia4WCqTnBSa8TQUPsvs/JI Dfsd3tJvyH2PUx2gvfEB84oLX9pkjAR39fuFW+QAduOfb79Zz/qrHaBqgkb72RLxZ5ux dxJPxiptEjRvWsYmU65I6WraeLkNTfLyL4a6cwjdm356BESt7Q0CFZqMa4UhBY7Zf02R BXPgWxjxyga4vTUWd6JVwExlYsH0MOYyiSw4eVEEfeMUYDjBc8ra5gX1ubbo+lcxcaZE ZloNUzxn1X5uSP6cq2MAgRrfkDIKLqTGSyuoA/LY5OnA5PSvn/++H3PxMusloh9Y9zM9 KZoA== 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=kw7hfOs4+yX5x+Ci9Ei8ZMz8xZWMKHMnFAkMWs7HU2WDrzBmuupmsXsW3ogXNbt3P8 1QDGWDRkAxpEi/nVSBk1DJEOZ2nm+HPWsSzHPLJangfwVQtIeNhy93hMnE/du2gZYSh2 WZOT9xOpkqX9prYM+r+z1IYLEhDw4yzOPzKe3KblFxqZKhPp7j+YyLPzPaJs3YqKRs/r CbYxhR85mkTVwSYAAucubdbl96DgvqUgBhJ/BjjFgNTCrVELb13AU0zcgeyk99FPbh4c eVAvbZE9wahHAj3tUpMzQaUhA9rf2EWIfindxXHOtgN7Pto1N63ZEhffLtjBl4mZYe2g iuWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L1qyMjdE; 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=T50gHKBP6gc6r5gomX7Ha89sUoMLWCLv+HrLWsH3k5h0VrTLIgGonGrd/pD0zZz59E O9nSeg3wx/ualcdA10OsyFKxb18MCmESqUmiGMb0uD4fcbScLYTsAC4+X784Zb8DuNyo o/nh5epN7YiNrf0ugz3CUPSfpO/RSzO8Su6wc= 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=LMGsIe6fEhhW3itVRXKY55YRtaYPnf+0RbVrOOIMdqE=; b=aqhW7+pMJiWNuJ5jaNj1tj6ynkj7U1mfrJ304FXmEIjsUjM8Bz0fOLSRCtRi98jMqE uMrciv6Zxbzsth3PBe/lgp8Q/Kw0onlEjRoOjC+uDap/n6a8pEgDMAzf6suBQU/1SgK3 F4cT+nX3BJNebRd2+YbD3wjzkF9QUHDSAJbWTppdZWKLqx/nyM6usYP/KAzc0tYRlTZw XygKlER37WFvixKjwJRQwPCiKDZKYK6clgyxHiEERfyqdaLux8RZ94lpbb58f7Eys5Pz 4cFEIwdb79T6cgYJYfE8r2ESL25834e1trJAWf3x/Aphn1S7BUmK8oGIKHCV683tPkqf ikUQ== X-Gm-Message-State: APjAAAUxTcFk+IGvRCkMzrDADGPIaGbuRp8Rq8ADJFRvP2XpV2L6ntJT KVZnLXGubvZKDGirhhqJatKkj5/l X-Google-Smtp-Source: APXvYqzIqPEjw1erCi6/PPiJtHDm6t/xGIYH+GJPbaqqRwBs9m5JIb5NmQic5F7H6v+f4LxEr3yWZQ== X-Received: by 2002:a17:90a:a407:: with SMTP id y7mr35716915pjp.97.1563278320156; Tue, 16 Jul 2019 04:58:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:5ec4:: with SMTP id s187ls3482624pfb.1.gmail; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) X-Received: by 2002:a63:124a:: with SMTP id 10mr32814709pgs.254.1563278319726; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278319; cv=none; d=google.com; s=arc-20160816; b=Jj0Y/O8Bqc9puYFnchLLq30w5tKslG3QAsHcZqK9xuWuolTCa7SC9nqiHA3bSXA+go g6Zhi8nucRUdxnMI+oSCShs6634vlsbauf9hQTyvnxlCpNhkNUXJhZaI4Ga3In7HmQVM zEtn1hJbEofowYOoXyLszGJVv3kiIrk47Vv8kBmo3kMpqlNxsKPxqZlEC6eTjN/+BKq4 VrTWCyS3FHvw4pt7IFM5Zce933ftmVETwtLZ3N/FMFm9pejvMgLpCquO5vJKsIbmRxUB nCXsOzxVW8yR+Zs+X4RPcseSLeYu9ss+TiiYW7Z8dDjr3Z3ZMt3jnOzGeCoTGF62WwKE Jqlg== 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=kFNo/GXViEG9p7wSNdfRyO+MY25YONaeT6MWxgn+4Hs=; b=erU6agf71ymcAJGwFogxvW3lDdlT99TkthS4eMATrLzjwO3UIR5v9z8HS/q5uB2Sfw Lsp4pYtYk2Xyxfr27AVrST+jl5q7c6l3Ahv5wApA7gjDsjoaHS0HhsOrYuNqaltqELfF MENc64QR64/BH9auVi36k6qw3w2sMEgr8HjNvGd27O6MI/UYhES5u1cD4YaWFd6C2PNv ld+Wzjlo2eqOQsRPcB7cYH1nVXrFKEU2SEIAzy8phbYrGdKHjf6hajTu4eJHyrTHREU7 +beKTGWALmciqm0QarQkt8OIS+D+5IL3HEehvX3xtCUaZOiUp5K8+bNYLlmePmFpghDl DzGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=L1qyMjdE; 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 k4sor10547489pgq.8.2019.07.16.04.58.39 for (Google Transport Security); Tue, 16 Jul 2019 04:58:39 -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:500a:: with SMTP id f10mr2093572pgo.105.1563278319397; Tue, 16 Jul 2019 04:58:39 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.58.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:58:38 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v3 12/57] ram: rk3399: Rename sys_reg with sys_reg2 Date: Tue, 16 Jul 2019 17:27:00 +0530 Message-Id: <20190716115745.12585-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190716115745.12585-1-jagan@amarulasolutions.com> References: <20190716115745.12585-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=L1qyMjdE; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use dram config variable name as sys_reg2 instead of sys_reg since the final variable value is to written into a pmugrf register named as sys_reg2. This reflect the both variable and associated register names are same and also help to add next sys_reg's to add it in future. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 2d3f0f6902..2ef969c07b 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1073,11 +1073,11 @@ static void set_ddrconfig(const struct chan_info *chan, static void dram_all_config(struct dram_info *dram, const struct rk3399_sdram_params *params) { - u32 sys_reg = 0; + u32 sys_reg2 = 0; unsigned int channel, idx; - sys_reg |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); - sys_reg |= SYS_REG_ENC_NUM_CH(params->base.num_channels); + sys_reg2 |= SYS_REG_ENC_DDRTYPE(params->base.dramtype); + sys_reg2 |= SYS_REG_ENC_NUM_CH(params->base.num_channels); for (channel = 0, idx = 0; (idx < params->base.num_channels) && (channel < 2); @@ -1089,15 +1089,15 @@ static void dram_all_config(struct dram_info *dram, if (params->ch[channel].cap_info.col == 0) continue; idx++; - sys_reg |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); - sys_reg |= SYS_REG_ENC_CHINFO(channel); - sys_reg |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); - sys_reg |= SYS_REG_ENC_COL(info->cap_info.col, channel); - sys_reg |= SYS_REG_ENC_BK(info->cap_info.bk, channel); - sys_reg |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); - sys_reg |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); - sys_reg |= SYS_REG_ENC_BW(info->cap_info.bw, channel); - sys_reg |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); + sys_reg2 |= SYS_REG_ENC_ROW_3_4(info->cap_info.row_3_4, channel); + sys_reg2 |= SYS_REG_ENC_CHINFO(channel); + sys_reg2 |= SYS_REG_ENC_RANK(info->cap_info.rank, channel); + sys_reg2 |= SYS_REG_ENC_COL(info->cap_info.col, channel); + sys_reg2 |= SYS_REG_ENC_BK(info->cap_info.bk, channel); + sys_reg2 |= SYS_REG_ENC_CS0_ROW(info->cap_info.cs0_row, channel); + sys_reg2 |= SYS_REG_ENC_CS1_ROW(info->cap_info.cs1_row, channel); + sys_reg2 |= SYS_REG_ENC_BW(info->cap_info.bw, channel); + sys_reg2 |= SYS_REG_ENC_DBW(info->cap_info.dbw, channel); ddr_msch_regs = dram->chan[channel].msch; noc_timing = ¶ms->ch[channel].noc_timings; @@ -1118,7 +1118,7 @@ static void dram_all_config(struct dram_info *dram, 1 << 17); } - writel(sys_reg, &dram->pmugrf->os_reg2); + writel(sys_reg2, &dram->pmugrf->os_reg2); rk_clrsetreg(&dram->pmusgrf->soc_con4, 0x1f << 10, params->base.stride << 10);