From f588f59eac0afdfa1a2245ae1a95d4cfec9d943f Mon Sep 17 00:00:00 2001 From: YouMin Chen Date: Wed, 26 Sep 2018 21:22:32 +0800 Subject: [PATCH] driver: ram: rockhip: px30: fix lpddr2 bug set lpddr2 detect max row = 15 to match lpddr2 inc file Change-Id: I8fd57984331d35bafaf263829760204c582d120d Signed-off-by: YouMin Chen --- drivers/ram/rockchip/sdram_px30.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/ram/rockchip/sdram_px30.c b/drivers/ram/rockchip/sdram_px30.c index 940558092b..35149d046e 100644 --- a/drivers/ram/rockchip/sdram_px30.c +++ b/drivers/ram/rockchip/sdram_px30.c @@ -920,7 +920,10 @@ static u64 dram_detect_cap(struct dram_info *dram, /* detect col and bk for ddr3/lpddr3 */ coltmp = 12; bktmp = 3; - rowtmp = 16; + if (dram_type == LPDDR2) + rowtmp = 15; + else + rowtmp = 16; for (col = coltmp; col >= 9; col -= 1) { writel(0, CONFIG_SYS_SDRAM_BASE);