ram: rockchip: rv1126: Control ddr init prints via DEBUG
Control the ddr init print messages via RAM_ROCKCHIP_DEBUG instead of printing by default. This gives an option to configs to enable these prints or not. Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
		
							parent
							
								
									e869b3485c
								
							
						
					
					
						commit
						4fadeecb62
					
				|  | @ -3358,22 +3358,33 @@ static void ddr_set_rate_for_fsp(struct dram_info *dram, | ||||||
| 	if (get_wrlvl_val(dram, sdram_params)) | 	if (get_wrlvl_val(dram, sdram_params)) | ||||||
| 		printascii("get wrlvl value fail\n"); | 		printascii("get wrlvl value fail\n"); | ||||||
| 
 | 
 | ||||||
|  | 	if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { | ||||||
| 		printascii("change to: "); | 		printascii("change to: "); | ||||||
| 		printdec(f1); | 		printdec(f1); | ||||||
| 		printascii("MHz\n"); | 		printascii("MHz\n"); | ||||||
|  | 	} | ||||||
| 	ddr_set_rate(&dram_info, sdram_params, f1, | 	ddr_set_rate(&dram_info, sdram_params, f1, | ||||||
| 		     sdram_params->base.ddr_freq, 1, 1, 1); | 		     sdram_params->base.ddr_freq, 1, 1, 1); | ||||||
|  | 
 | ||||||
|  | 	if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { | ||||||
| 		printascii("change to: "); | 		printascii("change to: "); | ||||||
| 		printdec(f2); | 		printdec(f2); | ||||||
| 		printascii("MHz\n"); | 		printascii("MHz\n"); | ||||||
|  | 	} | ||||||
| 	ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1); | 	ddr_set_rate(&dram_info, sdram_params, f2, f1, 2, 0, 1); | ||||||
|  | 
 | ||||||
|  | 	if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { | ||||||
| 		printascii("change to: "); | 		printascii("change to: "); | ||||||
| 		printdec(f3); | 		printdec(f3); | ||||||
| 		printascii("MHz\n"); | 		printascii("MHz\n"); | ||||||
|  | 	} | ||||||
| 	ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1); | 	ddr_set_rate(&dram_info, sdram_params, f3, f2, 3, 1, 1); | ||||||
|  | 
 | ||||||
|  | 	if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) { | ||||||
| 		printascii("change to: "); | 		printascii("change to: "); | ||||||
| 		printdec(f0); | 		printdec(f0); | ||||||
| 		printascii("MHz(final freq)\n"); | 		printascii("MHz(final freq)\n"); | ||||||
|  | 	} | ||||||
| 	ddr_set_rate(&dram_info, sdram_params, f0, f3, 0, 0, 1); | 	ddr_set_rate(&dram_info, sdram_params, f0, f3, 0, 0, 1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -3465,6 +3476,7 @@ static int rv1126_dmc_init(struct udevice *dev) | ||||||
| 	save_rw_trn_result_to_ddr(&rw_trn_result); | 	save_rw_trn_result_to_ddr(&rw_trn_result); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | 	if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) | ||||||
| 		printascii("out\n"); | 		printascii("out\n"); | ||||||
| 
 | 
 | ||||||
| 	return ret; | 	return ret; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue