ram: rk3399: Enable sdram debug functions
authorJagan Teki <jagan@amarulasolutions.com>
Mon, 15 Jul 2019 18:28:55 +0000 (23:58 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 20 Jul 2019 15:59:44 +0000 (23:59 +0800)
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>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>
drivers/ram/rockchip/sdram_rk3399.c

index 9df2f840ab2f71468fe5d62ccfc1aa172d45bd90..c59c985c19a173381ecf454e469c6b9bb196fc45 100644 (file)
@@ -1251,6 +1251,8 @@ static unsigned char calculate_stride(struct rk3399_sdram_params *params)
                }
        }
 
+       sdram_print_stride(stride);
+
        return stride;
 }
 
@@ -1373,11 +1375,14 @@ static int sdram_init(struct dram_info *dram,
                        }
                }
 
+               sdram_print_ddr_info(cap_info, &params->base);
+
                set_ddrconfig(chan, params, channel, cap_info->ddrconfig);
        }
 
        if (params->base.num_channels == 0) {
                printf("%s: ", __func__);
+               sdram_print_dram_type(params->base.dramtype);
                printf(" - %dMHz failed!\n", params->base.ddr_freq);
                return -EINVAL;
        }