From: Andre Przywara Date: Mon, 2 Jan 2017 11:48:44 +0000 (+0000) Subject: sunxi: DRAM: fix H3 DRAM size display on aarch64 X-Git-Tag: v2017.03-rc1~164^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a2175696d97eff0f6fae1edfab2bb19e28b9eae;p=u-boot sunxi: DRAM: fix H3 DRAM size display on aarch64 Fix the output of the DRAM size on AArch64 SPLs. Signed-off-by: Andre Przywara Reviewed-by: Alexander Graf Reviewed-by: Simon Glass Acked-by: Maxime Ripard Reviewed-by: Jagan Teki --- diff --git a/arch/arm/mach-sunxi/dram_sun8i_h3.c b/arch/arm/mach-sunxi/dram_sun8i_h3.c index 1311edaf32..9f7cc7fd4c 100644 --- a/arch/arm/mach-sunxi/dram_sun8i_h3.c +++ b/arch/arm/mach-sunxi/dram_sun8i_h3.c @@ -664,6 +664,6 @@ unsigned long sunxi_dram_init(void) mctl_auto_detect_dram_size(¶); mctl_set_cr(¶); - return (1 << (para.row_bits + 3)) * para.page_size * + return (1UL << (para.row_bits + 3)) * para.page_size * (para.dual_rank ? 2 : 1); }