From: Kotaro Hayashi <hayashi.kotaro@socionext.com>
Date: Mon, 19 Dec 2016 02:14:04 +0000 (+0900)
Subject: ARM: uniphier: fix delay fixup code in LD11 UMC init
X-Git-Tag: v2025.01-rc5-pxa1908~7665^2~11
X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20%24image.RelPermalink%20%7D%7D?a=commitdiff_plain;h=7d75254b3d0dcc3231eca11c4c5143972ce25232;p=u-boot.git

ARM: uniphier: fix delay fixup code in LD11 UMC init

The ddrphy_shift_rof_hws() never writes back the shifted delay value
to the register, which makes this function non-effective.

Signed-off-by: Kotaro Hayashi <hayashi.kotaro@socionext.com>
[masahiro: add git log]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

diff --git a/arch/arm/mach-uniphier/dram/umc-ld11.c b/arch/arm/mach-uniphier/dram/umc-ld11.c
index 7dab00c024..97a9fef24c 100644
--- a/arch/arm/mach-uniphier/dram/umc-ld11.c
+++ b/arch/arm/mach-uniphier/dram/umc-ld11.c
@@ -271,6 +271,7 @@ static void ddrphy_shift_rof_hws(void __iomem *phy_base, const int pos_shift[][2
 			rdqnsd = clamp(rdqnsd + ddrphy_hpstep(neg_shift[block][byte], dx, phy_base),
 				       0U, 0xffU);
 			lcdlr1 = (lcdlr1 & ~(0xffff << 8)) | (rdqsd << 8) | (rdqnsd << 16);
+			writel(lcdlr1, phy_base + PHY_DXLCDLR1(dx));
 			readl(phy_base + PHY_DXLCDLR1(dx)); /* relax */
 		}
 	}