* [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies
@ 2022-12-05 13:28 Ahmad Fatoum
2022-12-05 13:28 ` [PATCH 2/2] ddr: imx8m: use pr_warn instead of plain prints Ahmad Fatoum
2022-12-07 6:56 ` [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-12-05 13:28 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
When adding a new board with a yet unsupported DDR frequency, PLL
configuration is silently skipped, leading to a later hang during DDRC
configuration. Improve the bring up user experience by printing a
warning in that case. The user is then expected to extend
imx8mm_fracpll_table, so PBL knows how PLLs should be configured for
this new frequency.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/ddr/imx8m/ddrphy_utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ddr/imx8m/ddrphy_utils.c b/drivers/ddr/imx8m/ddrphy_utils.c
index c5d94e305086..3e03d4b75c9e 100644
--- a/drivers/ddr/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx8m/ddrphy_utils.c
@@ -344,6 +344,7 @@ void ddrphy_init_set_dfi_clk(unsigned int drate_mhz, enum ddrc_type type)
case 400: drate = DDR_400; break;
case 100: drate = DDR_100; break;
default:
+ pr_warn("Unsupported frequency %u\n", drate_mhz);
return;
}
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] ddr: imx8m: use pr_warn instead of plain prints
2022-12-05 13:28 [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Ahmad Fatoum
@ 2022-12-05 13:28 ` Ahmad Fatoum
2022-12-07 6:56 ` [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-12-05 13:28 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
We already have a pr_fmt, but we aren't making use of this. Change that.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/ddr/imx8m/ddrphy_utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ddr/imx8m/ddrphy_utils.c b/drivers/ddr/imx8m/ddrphy_utils.c
index 3e03d4b75c9e..98e6ae648aed 100644
--- a/drivers/ddr/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx8m/ddrphy_utils.c
@@ -210,7 +210,7 @@ static void dram_enable_bypass(enum ddr_rate drate)
const struct imx8m_bypass_config *config = &imx8m_bypass_table[drate];
if (!config->valid) {
- printf("No matched freq table entry %u\n", drate);
+ pr_warn("No matched freq table entry %u\n", drate);
return;
}
@@ -239,7 +239,7 @@ static int dram_frac_pll_init(enum ddr_rate drate)
const struct imx8mm_fracpll_config *config = &imx8mm_fracpll_table[drate];
if (!config->valid) {
- printf("No matched freq table entry %u\n", drate);
+ pr_warn("No matched freq table entry %u\n", drate);
return -EINVAL;
}
@@ -284,7 +284,7 @@ static int dram_sscg_pll_init(enum ddr_rate drate)
const struct imx8mq_ssgcpll_config *config = &imx8mq_ssgcpll_table[drate];
if (!config->valid) {
- printf("No matched freq table entry %u\n", drate);
+ pr_warn("No matched freq table entry %u\n", drate);
return -EINVAL;
}
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies
2022-12-05 13:28 [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Ahmad Fatoum
2022-12-05 13:28 ` [PATCH 2/2] ddr: imx8m: use pr_warn instead of plain prints Ahmad Fatoum
@ 2022-12-07 6:56 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-12-07 6:56 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Mon, Dec 05, 2022 at 02:28:34PM +0100, Ahmad Fatoum wrote:
> When adding a new board with a yet unsupported DDR frequency, PLL
> configuration is silently skipped, leading to a later hang during DDRC
> configuration. Improve the bring up user experience by printing a
> warning in that case. The user is then expected to extend
> imx8mm_fracpll_table, so PBL knows how PLLs should be configured for
> this new frequency.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> drivers/ddr/imx8m/ddrphy_utils.c | 1 +
> 1 file changed, 1 insertion(+)
Applied, thanks
Sascha
>
> diff --git a/drivers/ddr/imx8m/ddrphy_utils.c b/drivers/ddr/imx8m/ddrphy_utils.c
> index c5d94e305086..3e03d4b75c9e 100644
> --- a/drivers/ddr/imx8m/ddrphy_utils.c
> +++ b/drivers/ddr/imx8m/ddrphy_utils.c
> @@ -344,6 +344,7 @@ void ddrphy_init_set_dfi_clk(unsigned int drate_mhz, enum ddrc_type type)
> case 400: drate = DDR_400; break;
> case 100: drate = DDR_100; break;
> default:
> + pr_warn("Unsupported frequency %u\n", drate_mhz);
> return;
> }
>
> --
> 2.30.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-07 6:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05 13:28 [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Ahmad Fatoum
2022-12-05 13:28 ` [PATCH 2/2] ddr: imx8m: use pr_warn instead of plain prints Ahmad Fatoum
2022-12-07 6:56 ` [PATCH 1/2] ddr: imx8m: warn about unsupported frequencies Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox