public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] suniv: fix dramc autofresh freq calculation issue
@ 2023-03-20  0:59 John Sanpe
  2023-04-20 23:41 ` Andre Przywara
  0 siblings, 1 reply; 2+ messages in thread
From: John Sanpe @ 2023-03-20  0:59 UTC (permalink / raw)
  To: jagan, andre.przywara; +Cc: u-boot, John Sanpe

External use mhz to express frequency, autofresh use hz,
no unit conversion is performed when calling, cause dram
instability at low frequency.

Incorporated xboot repair patch for this driver.

Signed-off-by: John Sanpe <sanpeqf@gmail.com>
---
 arch/arm/mach-sunxi/dram_suniv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/dram_suniv.c b/arch/arm/mach-sunxi/dram_suniv.c
index 3aa3ce7627..830fa7895d 100644
--- a/arch/arm/mach-sunxi/dram_suniv.c
+++ b/arch/arm/mach-sunxi/dram_suniv.c
@@ -310,7 +310,7 @@ static u32 dram_get_dram_size(struct dram_para *para)
 		para->size = 64;
 	else
 		para->size = 32;
-	dram_set_autofresh_cycle(para->clk);
+	dram_set_autofresh_cycle(para->clk * 1000000);
 	para->access_mode = 0;
 	dram_para_setup(para);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-20 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20  0:59 [PATCH] suniv: fix dramc autofresh freq calculation issue John Sanpe
2023-04-20 23:41 ` Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox