summaryrefslogtreecommitdiff
path: root/drivers/ram
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2019-07-16 17:27:10 +0530
committerKever Yang <kever.yang@rock-chips.com>2019-07-20 23:59:44 +0800
commitc716bf67f5eb54ed64538f7ce70b36da04c55352 (patch)
tree9b6288a35908cf75f75a9651d7af7c4ad37a2228 /drivers/ram
parent3dae87da89e4c9edb4da9e05bde2e10bb98bd885 (diff)
downloadu-boot-c716bf67f5eb54ed64538f7ce70b36da04c55352.tar.gz
ram: rk3399: Add lpddr4 rank mask for wdql training
Add rank_mask based on the rank number for lpddr4. This would keep the wdql 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>
Diffstat (limited to 'drivers/ram')
-rw-r--r--drivers/ram/rockchip/sdram_rk3399.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index b7cad9274b..3f20aba939 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -925,7 +925,10 @@ static int data_training_wdql(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)))