[51/92] ram: rk3399: Enable sdram debug functions
diff mbox series

Message ID 20190611145135.21399-52-jagan@amarulasolutions.com
State New
Headers show
Series
  • ram: rk3399: Add LPDDR4 support
Related show

Commit Message

Jagan Teki June 11, 2019, 2:50 p.m. UTC
This would help to debug the sdram base parameters while
debugging existing chip or while supporting new sdram type.

It require explicit enablement of CONFIG_RAM_ROCKCHIP_DEBUG
for showing the debug prints.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/ram/rockchip/sdram_rk3399.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index b658d7d1ab..ce38f72374 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -1254,6 +1254,8 @@  static unsigned char calculate_stride(struct rk3399_sdram_params *sdram_params)
 		}
 	}
 
+	sdram_print_stride(stride);
+
 	return stride;
 }
 
@@ -1361,11 +1363,14 @@  static int sdram_init(struct dram_info *dram,
 		debug("Channel ");
 		debug(channel ? "1: " : "0: ");
 
+		sdram_print_ddr_info(cap_info, &sdram_params->base);
+
 		set_ddrconfig(chan, sdram_params, channel, cap_info->ddrconfig);
 	}
 
 	if (sdram_params->base.num_channels == 0) {
 		printf("%s: ", __func__);
+		sdram_print_dram_type(sdram_params->base.dramtype);
 		printf(" - %dMHz failed!\n", sdram_params->base.ddr_freq);
 		return -EINVAL;
 	}