rockchip: rk3399: use actual dram size

Since our sdram driver is ready, we can use the actual size
instead of hard code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/mach-rockchip/rk3399/sdram_rk3399.c b/arch/arm/mach-rockchip/rk3399/sdram_rk3399.c
index 749b52c..536879d 100644
--- a/arch/arm/mach-rockchip/rk3399/sdram_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/sdram_rk3399.c
@@ -1280,6 +1280,8 @@
 
 	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	debug("%s: pmugrf=%p\n", __func__, priv->pmugrf);
+	priv->info.base = 0;
+	priv->info.size = sdram_size_mb(priv) << 20;
 #endif
 	return 0;
 }
@@ -1288,9 +1290,7 @@
 {
 	struct dram_info *priv = dev_get_priv(dev);
 
-	info = &priv->info;
-	priv->info.base = 0;
-	priv->info.size = sdram_size_mb(priv) << 20;
+	*info = priv->info;
 
 	return 0;
 }
@@ -1314,8 +1314,8 @@
 	.ofdata_to_platdata = rk3399_dmc_ofdata_to_platdata,
 #endif
 	.probe = rk3399_dmc_probe,
-#ifdef CONFIG_SPL_BUILD
 	.priv_auto_alloc_size = sizeof(struct dram_info),
+#ifdef CONFIG_SPL_BUILD
 	.platdata_auto_alloc_size = sizeof(struct rockchip_dmc_plat),
 #endif
 };