diff mbox series

[2/3] ram: rk3399: Mark existing prints via RAM_ROCKCHIP_DEBUG

Message ID 20200713200635.651032-2-jagan@amarulasolutions.com (mailing list archive)
State New, archived
Headers show
Series [1/3] ram: rk3399: Drop debug stride in driver | expand

Commit Message

Jagan Teki July 13, 2020, 8:06 p.m. UTC
Right now all these debug statements are printing on the
console to make sure proper dram initialization happens.  

Mark them into RAM_ROCKCHIP_DEBUG would be more meaningful
and work like before since the RAM_ROCKCHIP_DEBUG is by
default yet.

No functionality changes.

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

Comments

Kever Yang July 18, 2020, 12:15 p.m. UTC | #1
On 2020/7/14 上午4:06, Jagan Teki wrote:
> Right now all these debug statements are printing on the
> console to make sure proper dram initialization happens.
>
> Mark them into RAM_ROCKCHIP_DEBUG would be more meaningful
> and work like before since the RAM_ROCKCHIP_DEBUG is by
> default yet.
>
> No functionality changes.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/ram/rockchip/sdram_rk3399.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
> index d2f3fde236..670925420d 100644
> --- a/drivers/ram/rockchip/sdram_rk3399.c
> +++ b/drivers/ram/rockchip/sdram_rk3399.c
> @@ -2551,8 +2551,10 @@ static int lpddr4_set_rate(struct dram_info *dram,
>   		lpddr4_set_ctl(dram, params, ctl_fn,
>   			       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq);
>   
> -		printf("%s: change freq to %d mhz %d, %d\n", __func__,
> -		       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq, ctl_fn, phy_fn);
> +		if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
> +			printf("%s: change freq to %d mhz %d, %d\n", __func__,
> +			       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq,
> +			       ctl_fn, phy_fn);
>   	}
>   
>   	return 0;
> @@ -2966,8 +2968,10 @@ static int sdram_init(struct dram_info *dram,
>   			params->base.num_channels++;
>   		}
>   
> -		printf("Channel ");
> -		printf(channel ? "1: " : "0: ");
> +		if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
> +			printf("Channel ");
> +			printf(channel ? "1: " : "0: ");
> +		}
>   
>   		if (channel == 0)
>   			set_ddr_stride(dram->pmusgrf, 0x17);
diff mbox series

Patch

diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index d2f3fde236..670925420d 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -2551,8 +2551,10 @@  static int lpddr4_set_rate(struct dram_info *dram,
 		lpddr4_set_ctl(dram, params, ctl_fn,
 			       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq);
 
-		printf("%s: change freq to %d mhz %d, %d\n", __func__,
-		       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq, ctl_fn, phy_fn);
+		if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG))
+			printf("%s: change freq to %d mhz %d, %d\n", __func__,
+			       dfs_cfgs_lpddr4[ctl_fn].base.ddr_freq,
+			       ctl_fn, phy_fn);
 	}
 
 	return 0;
@@ -2966,8 +2968,10 @@  static int sdram_init(struct dram_info *dram,
 			params->base.num_channels++;
 		}
 
-		printf("Channel ");
-		printf(channel ? "1: " : "0: ");
+		if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
+			printf("Channel ");
+			printf(channel ? "1: " : "0: ");
+		}
 
 		if (channel == 0)
 			set_ddr_stride(dram->pmusgrf, 0x17);