diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-01-22 15:13:31 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-02-08 08:35:40 +0100 |
commit | 205a77e12cd1ca107bcf02fe0d11b557e60231a5 (patch) | |
tree | 45abf96d7acaaa36b8883c38edc9669fff5498fb | |
parent | e5471b2b72faec78412d069b1d47f3b3ac579182 (diff) | |
download | barebox-205a77e12cd1.tar.gz barebox-205a77e12cd1.tar.xz |
ddr: imx8m: add missing DDR clock rates
ddrphy_init_set_dfi_clk() is called to translate a scalar clock rate
as specified by board code into PLL parameters, which are configured.
enum ddr_rate describes the possible DDR rates and so far
ddrphy_init_set_dfi_clk() supported all of them, except for 2600 and
2376 MHz, rendering these two rates unusable.
Fix this by adding support for them into ddrphy_init_set_dfi_clk.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20240122141331.3438235-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/ddr/imx/imx8m_ddr_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ddr/imx/imx8m_ddr_init.c b/drivers/ddr/imx/imx8m_ddr_init.c index 8b829645c0..d9a5d589f2 100644 --- a/drivers/ddr/imx/imx8m_ddr_init.c +++ b/drivers/ddr/imx/imx8m_ddr_init.c @@ -219,9 +219,9 @@ enum ddr_rate { DDR_3720, DDR_3200, DDR_3000, - DDR_2600, /* Unused */ + DDR_2600, DDR_2400, - DDR_2376, /* Unused */ + DDR_2376, DDR_1600, DDR_1000, /* Unused */ DDR_1066, @@ -450,7 +450,9 @@ static void ddrphy_init_set_dfi_clk(struct dram_controller *dram, unsigned int d case 3720: drate = DDR_3720; break; case 3200: drate = DDR_3200; break; case 3000: drate = DDR_3000; break; + case 2600: drate = DDR_2600; break; case 2400: drate = DDR_2400; break; + case 2376: drate = DDR_2376; break; case 1600: drate = DDR_1600; break; case 1066: drate = DDR_1066; break; case 667: drate = DDR_667; break; |