[U-Boot] [PATCH 3/3] rockchip: rk3328: call sdram_print_ddr_info() at init

Matwey V. Kornilov matwey.kornilov at gmail.com
Wed Oct 16 09:06:12 UTC 2019


Make it possible to use CONFIG_RAM_ROCKCHIP_DEBUG when debuging TPL issues.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov at gmail.com>
---
 drivers/ram/rockchip/Makefile       | 2 +-
 drivers/ram/rockchip/sdram_rk3328.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/ram/rockchip/Makefile b/drivers/ram/rockchip/Makefile
index feb1f82d00..f857abce1f 100644
--- a/drivers/ram/rockchip/Makefile
+++ b/drivers/ram/rockchip/Makefile
@@ -3,7 +3,6 @@
 # Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
 #
 
-obj-$(CONFIG_RAM_ROCKCHIP_DEBUG) += sdram_debug.o
 obj-$(CONFIG_ROCKCHIP_RK3368) = dmc-rk3368.o
 obj-$(CONFIG_ROCKCHIP_RK3128) = sdram_rk3128.o
 obj-$(CONFIG_ROCKCHIP_RK3188) = sdram_rk3188.o
@@ -11,3 +10,4 @@ obj-$(CONFIG_ROCKCHIP_RK322X) = sdram_rk322x.o
 obj-$(CONFIG_ROCKCHIP_RK3288) = sdram_rk3288.o
 obj-$(CONFIG_ROCKCHIP_RK3328) = sdram_rk3328.o
 obj-$(CONFIG_RAM_RK3399) += sdram_rk3399.o
+obj-$(CONFIG_RAM_ROCKCHIP_DEBUG) += sdram_debug.o
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index c2537cc95d..6884f53ae5 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -684,6 +684,8 @@ static int sdram_init(struct dram_info *dram,
 	while ((readl(pctl_base + DDR_PCTL2_STAT) & 0x7) == 0)
 		continue;
 
+	sdram_print_ddr_info(&sdram_ch.cap_info, &sdram_params->base);
+
 	/* do ddr gate training */
 	if (data_training(dram, 0, sdram_params->base.dramtype) != 0) {
 		printf("data training error\n");
-- 
2.16.4



More information about the U-Boot mailing list