From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Ford Date: Mon, 28 Dec 2020 07:53:38 -0600 Subject: [PATCH 03/13] imx: ddr: imx8m: add print for DRAM rate In-Reply-To: <20201228121710.17235-3-peng.fan@oss.nxp.com> References: <20201228121710.17235-1-peng.fan@oss.nxp.com> <20201228121710.17235-3-peng.fan@oss.nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Dec 28, 2020 at 7:27 AM Peng Fan (OSS) wrote: > > From: Ye Li > > Enable print to show the DRAM rate of current setting and training > result. > > Signed-off-by: Ye Li > Reviewed-by: Peng Fan > Signed-off-by: Peng Fan > --- > drivers/ddr/imx/imx8m/ddr_init.c | 7 ++++--- > drivers/ddr/imx/imx8m/ddrphy_utils.c | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/ddr/imx/imx8m/ddr_init.c b/drivers/ddr/imx/imx8m/ddr_init.c > index 99a67edfb0..65739dbaa7 100644 > --- a/drivers/ddr/imx/imx8m/ddr_init.c > +++ b/drivers/ddr/imx/imx8m/ddr_init.c > @@ -96,7 +96,7 @@ int ddr_init(struct dram_timing_info *dram_timing) > unsigned int tmp, initial_drate, target_freq; > int ret; > > - debug("DDRINFO: start DRAM init\n"); > + printf("DDRINFO: start DRAM init\n"); Why not make this optional? With debug enabled, it will print. This makes extra chatter for everyone. It also undoes: 0d3bc813 ("imx8m: ddr_init: Move ddr_init() messages to debug level") > > /* Step1: Follow the power up procedure */ > if (is_imx8mq()) { > @@ -119,6 +119,7 @@ int ddr_init(struct dram_timing_info *dram_timing) > > initial_drate = dram_timing->fsp_msg[0].drate; > /* default to the frequency point 0 clock */ > + printf("DDRINFO: DRAM rate %dMTS\n", initial_drate); > ddrphy_init_set_dfi_clk(initial_drate); > > /* D-aasert the presetn */ > @@ -185,7 +186,7 @@ int ddr_init(struct dram_timing_info *dram_timing) > tmp = reg32_read(DDRPHY_CalBusy(0)); > } while ((tmp & 0x1)); > > - debug("DDRINFO:ddrphy calibration done\n"); > + printf("DDRINFO:ddrphy calibration done\n"); > > /* Step15: Set SWCTL.sw_done to 0 */ > reg32_write(DDRC_SWCTL(0), 0x00000000); > @@ -240,7 +241,7 @@ int ddr_init(struct dram_timing_info *dram_timing) > > /* enable port 0 */ > reg32_write(DDRC_PCTRL_0(0), 0x00000001); > - debug("DDRINFO: ddrmix config done\n"); > + printf("DDRINFO: ddrmix config done\n"); > > board_dram_ecc_scrub(); > > diff --git a/drivers/ddr/imx/imx8m/ddrphy_utils.c b/drivers/ddr/imx/imx8m/ddrphy_utils.c > index 0f8baefb1f..326b92d784 100644 > --- a/drivers/ddr/imx/imx8m/ddrphy_utils.c > +++ b/drivers/ddr/imx/imx8m/ddrphy_utils.c > @@ -104,7 +104,7 @@ int wait_ddrphy_training_complete(void) > debug("Training PASS\n"); > return 0; > } else if (mail == 0xff) { > - debug("Training FAILED\n"); > + printf("Training FAILED\n"); > return -1; > } > } > -- > 2.28.0 >