Message ID | 20190716115745.12585-22-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBD7YW3UQKGQEDIFYRHI@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D8E7C3F08F for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 16 Jul 2019 13:59:12 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id k9sf10058829pls.13 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 16 Jul 2019 04:59:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563278351; cv=pass; d=google.com; s=arc-20160816; b=hojLZo4wLqG09hvDv/DnKZZ2ydaxClNVVE/k++5F4oxCSNZfHeSWcdMNU91Wlqwfs3 28VM3IhAOtSCDXShe9ozUcKPJxT3kDL3IKkgkVlFA0v7dZFZtFAmxbSoXlpmPqjNvsBA m1uhpxDl9ifyUhkdQOmsnumvXGSHfRhpgQNv2MihRXDxTPHb3ozlIf4ZfZTy01sPDC/F fePumCKRLW8acVBbp2wEXQ4+dASNz3J3wOMNuPyrfF+nnuZzKjoXIpddURSYI1Jvl1Iv L67XUKG3FOSZJ3EpzbP58z4HROPDX+FaNWG69RJUTUd28s1UyL/G8Yt0QL0e5waSkzyC u3Pg== 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=UU5f3BodhAR75ga0Ty8vIMMKy1EbyoRT2YAhNiqlM1l+ghCjqjeX2TgHKqFkzTBa81 aLbpxyRSlj0vzo2lqHsxkI7G6xe0pLtoNSk4hgaTH/k4vD9k1X+6FfJ+ONxj0TcqdSQY 2JvK+iVpv6CIirfDhBN03kr+odDRoqSOQhJOVONJ61HxlgfAi62p4gxuITnvPmLX+J2k NeK7GI2pimqECH+NqActG1sCP2f1e9yBXaW4w5mYhbGCa06v8qshjiqw0wlQJR1G2axU Nr6wOumLsLLH0f7jPGdOAa1MBTwSUKugW6NiG5vHzRPcU2PnpKFbv2rxBNCXrJXMPimi hemg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GNUk3RW4; 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=CN5g1G9mWXblhMZlgrVlH00ACojijksi0x0J9Gn1t9W/e02vHaY0Lyxn+xRJriGFTk yYjU4w4scO99BM6emyclJQ9lVVmCw3hoVYjtcDr41/B/Ft9nCcLRz43AfgDXs7k6k7Bm 4Kwt/MQuf4G86C/4vt4Zl80Nj6yeFP8lAn014= 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=XyqG7FAFyGKUFol+PT10qjiI9WRvGw9YOxTWjgUMYtI=; b=DcqsSwjof5t6nYy0Bdr19jYf0Sbjaf+o11loa76vcSTTTRK5Aam2ZfAKfQ5TlvSMk4 l0CWZqRvyefB0DvogmQME/Auc1IdENnmnr0iZBW8QkpQzCt6hUXr2qjbYVJ2Lx7byHIT GsdpPqJL/B2oEu7gnHSyjJX4Rc0wEr3Se06uHtG+h6oycAIW7HFVJEYU/cYygcSdgcgV kpcbJDoIcwnrpQoF+aBLLhmSlEurEzBesw49g+Mqk17V9VokdvCC1iT6ipr4wB7dpkZP JMC3aghEQjmiMU+NCUW628l2a7yjE4r+xDbI/RqP9BImSv47QyeSwJ8ODGW5nVKsoWRu Bg8w== X-Gm-Message-State: APjAAAXPFcNGiIoUPV67tfar7Z0XbwO29kQqOqk2LYg+Lp0twSHSWHBF p5pAMPrIq0/dSX6mZH8yJyCsL6R1 X-Google-Smtp-Source: APXvYqydofgmQezvIvxH+XL06+VF70v3Yy79up/sbnH1ZfbpRcIYexILEKsGSqDh0dJUzhUuwHeQHQ== X-Received: by 2002:a17:902:8547:: with SMTP id d7mr35420716plo.171.1563278351725; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1654:: with SMTP id 81ls3485360pfw.2.gmail; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) X-Received: by 2002:a63:774c:: with SMTP id s73mr31510376pgc.238.1563278351289; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278351; cv=none; d=google.com; s=arc-20160816; b=XyqGsAq0ipWaRW9Nj90HRkqM8s1Ao3izhSdUvGYpGZjfnDjaifb0BwWQYK17QERhRO X42mvnowbIXMrbrB54WoXgzVWhCGkwdBvdLOAoLgTSlvOcudgPDrt3qOa+YlBd4vfni8 1njPUviIEX0gIinnZgb9lK8duv7LMHeGqz/Zo6X/J2Ib6Dwjb0l9peoWYw8dJ3xRuMZx jqRt2x/iI72TKFvMqUdh+6OJ1OnbwYU29wOT+CK9IFp0tYEi2sGdkicYkhZ8lOS3d1+e 5ziZ7HflCXnNev3y6OgpNTZYUvajnwmL8eW2do1jwVKoCzaHhutFrHkQpLUghGPyEX1E jrMA== 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=bflvW+JotwkqbODWpg7GKUWBSsmpB52BPlZ06Am3kg0=; b=zJ8YP5YisB+CTpsEOlhdEYV35yMPQ+exXM5aSfCwKPbp1cSwNCr1iJZdMYD6qv2amp Qc8FBVHu7IeqP0D9tlUUKZNY7eaXJ3OJJPWcJ+1+7DQfgIRqFqBpdSEkS+r2ThEXiIhK Q6lNyFHDEoE+JSzLkfgDLfEyMKmD7Sg4WarNutsbRpif4SHhQd3oUugGttXwD8KNvYEB b+0VR5XeUTDLEGfEP4GyDHyKlFXyJaNKzXV6hVoaKqg4M/F0h44d7MCch7LbLiK9afSm tyUrA6m6QzTfY+Ers6j0RcQM4rSPtJbfaeh2C0nMEqYAskLrIGPAZ/1/XjPxnN72lieR MKuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=GNUk3RW4; 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 ck2sor23961197plb.1.2019.07.16.04.59.11 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 16 Jul 2019 04:59: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:2a29:: with SMTP id i38mr35055086plb.46.1563278351007; Tue, 16 Jul 2019 04:59:11 -0700 (PDT) Received: from localhost.localdomain ([49.206.201.107]) by smtp.gmail.com with ESMTPSA id z24sm36269566pfr.51.2019.07.16.04.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 04:59: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: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v3 21/57] ram: rk3399: Add lpddr4 rank mask for ca training Date: Tue, 16 Jul 2019 17:27:09 +0530 Message-Id: <20190716115745.12585-22-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=GNUk3RW4; 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
|
On 2019/7/16 下午7:57, Jagan Teki wrote: > Add rank_mask based on the rank number for lpddr4. > > This would keep the ca data training loop based on the > desired rank mask value instead of looping for all values. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > Signed-off-by: YouMin Chen <cym@rock-chips.com> Reviewed-by: Kever Yang <Kever.yang@rock-chips.com> Thanks, - Kever > --- > drivers/ram/rockchip/sdram_rk3399.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c > index a49677285d..8ecc3a1b74 100644 > --- a/drivers/ram/rockchip/sdram_rk3399.c > +++ b/drivers/ram/rockchip/sdram_rk3399.c > @@ -687,7 +687,10 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, > /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ > writel(0x00003f7c, (&denali_pi[175])); > > - rank_mask = (rank == 1) ? 0x1 : 0x3; > + if (params->base.dramtype == LPDDR4) > + rank_mask = (rank == 1) ? 0x5 : 0xf; > + else > + rank_mask = (rank == 1) ? 0x1 : 0x3; > > for (i = 0; i < 4; i++) { > if (!(rank_mask & (1 << i)))
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index a49677285d..8ecc3a1b74 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -687,7 +687,10 @@ static int data_training_ca(const struct chan_info *chan, u32 channel, /* clear interrupt,PI_175 PI_INT_ACK:WR:0:17 */ writel(0x00003f7c, (&denali_pi[175])); - rank_mask = (rank == 1) ? 0x1 : 0x3; + if (params->base.dramtype == LPDDR4) + rank_mask = (rank == 1) ? 0x5 : 0xf; + else + rank_mask = (rank == 1) ? 0x1 : 0x3; for (i = 0; i < 4; i++) { if (!(rank_mask & (1 << i)))