From patchwork Mon Jul 15 18:21:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 723 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0DFDB3F0E1 for ; Mon, 15 Jul 2019 20:21:54 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id f25sf10692592pfk.14 for ; Mon, 15 Jul 2019 11:21:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563214913; cv=pass; d=google.com; s=arc-20160816; b=OLLDlqo07Yk+0/mq/0/nSPWCYLmvkjWA3LdrULyi/N/nzQKIMjc9qWCO8/NxXsHTqY 5Sv7VllUNW/QMxMceISl7moE37rpMiXaHOCjdmo9MluHyPH0UG35D4Xlav93ZKdoOoEB Y9uDxFU0iWiCYGuIUbeOcRf9hXjBaffldubtUP2YIM1GJRSn77NESp+47XbQWAXPUltd 2jV92nbnXmLf51qgyhAXpD+kYg70nhQUCVHeXbd86Jt+KKNCRat7tMzFLfC2Id6nsoQD W1G+Go/6EJDQM1wtvpff8hZLWRKJhaEYwDBVNlKrBwH+f7MkEbySbqiJTd33XsYhC0k0 tPNA== 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=4txk8yp80sVcQ/jfsW5GToj+zXh/ACD4HNok5s1whqM=; b=IcBOb7yAHPDbnhM16UKIBTiL6XyxF8tdNFwzhaIhFMLruRIBmmK5igVZwD4Xkxbwqr lP75D62lyk88Ioi0PhJay9NcJyoXMiPyvtOggbWNDyK3M+vI5UlyVMaulVSHhw2z4x1v 7lefAcvyx7WDtQuBaflewkn/+u57NJF9RZDBpkG7+Wia36Xngn2fUJpwshb14DSZzWBW /ie+P67hbRRtynzVr0H6KCb/grfh8KBvsIVbGAlCmBb5WDD8ngSWNN5U1yfBffWZRD+r DXX0hjea6r64kMlLqRaXCJDNhWjB5v7W8ctBKdPgCp4ukXVCCO9wB84vPrVyLh7mbk2c g13g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nOtJJ5Ng; 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=4txk8yp80sVcQ/jfsW5GToj+zXh/ACD4HNok5s1whqM=; b=XLhs+Hnu8JTdGvP/UykHJYy0qQF6bSpyLy00/fMXfXI7In+CmMyOfoU0Up382OIAfP FObx5go3fREsNFT9H+lz74gwkpfhNSgmd9ZOY7SaHDwFOiikAH+o8sl2Q2DTIRWgcSNv vK2TqOHgsTusge7MZxNq5gyYHKpKmVRuJb1R4= 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=4txk8yp80sVcQ/jfsW5GToj+zXh/ACD4HNok5s1whqM=; b=b4XrgCEKyt75SlTRJ/C/B3Ob3mk6Wc6vxLAlHFNmRGvwJPYkHkeb1kF4q0IOpctKtd mOKDHbwIrjsfB8oTaMLNYo+L6ulIh9eUfP7IyjcIZixycEuM+nJBZI0YBN+wiTaFYKq0 tkalF/oaiFXYRG/4pnxaU4gmUWrj9lJJt6JjTFKQx9TX4QYE7ntr0rW5XCi2+zXL7ib9 fKd3gnpWk5Zlkc+voGZzbaXednDK84yTOcwJTB5Lo3qflAQCXT/8ZZTkrC/hLvhwcHQj ggzqr6h2GJn+eFqz61fsy3o3KulbDke2PO1M35ot+AZe902e+08PKGvTAYPx3DHxWZ9v v+xg== X-Gm-Message-State: APjAAAVL9a4FK7CL4cL6PNsOD37MDAzyul7602k2wzUb1hN+RVq540MY 2rsccoayUV/Zya3Ag9Yzz31usXO5 X-Google-Smtp-Source: APXvYqwwc85S+1LW2/FHuNVXxxVxA9+aO+m5yNAhCruIpcZYWn6buGM9tvO6GBtgodJwVn/QgxM4ew== X-Received: by 2002:a63:f807:: with SMTP id n7mr29275253pgh.119.1563214912816; Mon, 15 Jul 2019 11:21:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6452:: with SMTP id s18ls2980925pgv.2.gmail; Mon, 15 Jul 2019 11:21:52 -0700 (PDT) X-Received: by 2002:a65:6546:: with SMTP id a6mr18543789pgw.220.1563214912387; Mon, 15 Jul 2019 11:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563214912; cv=none; d=google.com; s=arc-20160816; b=Iur8kEbG7ptjTiG41W9T/xW10X1lFkj31JU4VIlVJiSJ3SycND8zVLUoUKb81juTGH TgMKAAhgwgutb4PyGhr90kxfjgEotD+iiEzqRQCrbmGv3MycSoxgVOpYOoYZDvfe61aI 1irdj9cCC3A/MEXXvK66AlIvTRJSLVxABY1+IW6OhzEAFNJi8A7drcH8K3viAHRHgeSt biktNV341LT7lQm/bVvwJ9OnlBKXnmZUhp2wEAbYSoFR6fYFYsPtZ7Xte/wflJxlU9Jz /wJoa0vL+RDpQPOuk2yNpz1riWkO/xtKL2KFgqujHFeuIOgGwXqT9I6LO3crvY6cjMJI IRfA== 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=0YK9sxvx6/20fN7RQUyVJZjyj0RELmE6vtRuEvdGvmc=; b=QdaH7gwNiIZh93ebxGy20CajlgLOaDZUJgKakGrexzvxHlK9168SoNvF3TP5DiSVxR a8Lu6NFBAcRBkhUJ+TRmLdHkURiXmBc/OirxUSkr9ehVMWNphf8GTHCVLLHZKOkv3M4y a11VG+IFy9iIpEPbGvILXQv65k8SQ/T7VvEDW/lS3y873mrjwh1WSvljp1iNpKMHOe15 gYp6sHJHML4EYmdaAyb/T5HECvEV6JaL7mm04z+Cdjvzq17EbemYpP+Pk9TatjiajQAt 81AStpecoytfsYVQ6UFHgQXjmV7jCYdTry5W5PKHfPX++K2QEv8wmYp5AXjLAFf7X5vN /wPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nOtJJ5Ng; 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 t12sor9562418pfl.32.2019.07.15.11.21.52 for (Google Transport Security); Mon, 15 Jul 2019 11:21:52 -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:4103:: with SMTP id w3mr17029883pgp.1.1563214911846; Mon, 15 Jul 2019 11:21:51 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id l15sm18152405pgf.5.2019.07.15.11.21.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 11:21:51 -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 09/15] ram: rk3399: Order tsel variables Date: Mon, 15 Jul 2019 23:51:04 +0530 Message-Id: <20190715182110.21336-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190715182110.21336-1-jagan@amarulasolutions.com> References: <20190715182110.21336-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=nOtJJ5Ng; 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: , Order tsel* variable declarations and assignment in proper and meaningful way. No functionality change. Signed-off-by: Jagan Teki Signed-off-by: YouMin Chen Reviewed-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8a983f9bb1..043b27737d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -159,41 +159,48 @@ static void set_ds_odt(const struct chan_info *chan, u32 *denali_phy = chan->publ->denali_phy; u32 tsel_idle_en, tsel_wr_en, tsel_rd_en; - u32 tsel_idle_select_p, tsel_wr_select_dq_p, tsel_rd_select_p; - u32 tsel_wr_select_ca_p, tsel_wr_select_ca_n; - u32 tsel_idle_select_n, tsel_wr_select_dq_n, tsel_rd_select_n; + u32 tsel_idle_select_p, tsel_rd_select_p; + u32 tsel_idle_select_n, tsel_rd_select_n; + u32 tsel_wr_select_dq_p, tsel_wr_select_ca_p; + u32 tsel_wr_select_dq_n, tsel_wr_select_ca_n; u32 reg_value; if (params->base.dramtype == LPDDR4) { tsel_rd_select_p = PHY_DRV_ODT_HI_Z; - tsel_wr_select_dq_p = PHY_DRV_ODT_40; - tsel_wr_select_ca_p = PHY_DRV_ODT_40; + tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_idle_select_p = PHY_DRV_ODT_HI_Z; + tsel_idle_select_n = PHY_DRV_ODT_240; - tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_wr_select_dq_p = PHY_DRV_ODT_40; tsel_wr_select_dq_n = PHY_DRV_ODT_40; + + tsel_wr_select_ca_p = PHY_DRV_ODT_40; tsel_wr_select_ca_n = PHY_DRV_ODT_40; - tsel_idle_select_n = PHY_DRV_ODT_240; } else if (params->base.dramtype == LPDDR3) { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - tsel_wr_select_ca_p = PHY_DRV_ODT_48; + tsel_rd_select_n = PHY_DRV_ODT_HI_Z; + tsel_idle_select_p = PHY_DRV_ODT_240; + tsel_idle_select_n = PHY_DRV_ODT_HI_Z; - tsel_rd_select_n = PHY_DRV_ODT_HI_Z; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; + + tsel_wr_select_ca_p = PHY_DRV_ODT_48; tsel_wr_select_ca_n = PHY_DRV_ODT_48; - tsel_idle_select_n = PHY_DRV_ODT_HI_Z; } else { tsel_rd_select_p = PHY_DRV_ODT_240; - tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; - tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; + tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_idle_select_p = PHY_DRV_ODT_240; + tsel_idle_select_n = PHY_DRV_ODT_240; - tsel_rd_select_n = PHY_DRV_ODT_240; + tsel_wr_select_dq_p = PHY_DRV_ODT_34_3; tsel_wr_select_dq_n = PHY_DRV_ODT_34_3; + + tsel_wr_select_ca_p = PHY_DRV_ODT_34_3; tsel_wr_select_ca_n = PHY_DRV_ODT_34_3; - tsel_idle_select_n = PHY_DRV_ODT_240; } if (params->base.odt == 1)