From 8ef919aec333064644804411b5e5fb914a04ee17 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 25 Sep 2016 23:01:46 +0200 Subject: [PATCH] Set/unset SRAM REQ ACK bit, based on CPU and AHB clocks in DRAM setup --- u-boot/cpu/mips/ar7240/qca_dram.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/u-boot/cpu/mips/ar7240/qca_dram.c b/u-boot/cpu/mips/ar7240/qca_dram.c index ad173ce..86fc3f1 100644 --- a/u-boot/cpu/mips/ar7240/qca_dram.c +++ b/u-boot/cpu/mips/ar7240/qca_dram.c @@ -833,6 +833,14 @@ void qca_dram_init(void) /* If DDR_CLK < 2 * AHB_CLK, set DDR FSM wait control to 0xA24 */ if (ddr_clk < (2 * ahb_clk)) qca_soc_reg_write(QCA_DDR_FSM_WAIT_CTRL_REG, 0xA24); + + /* If CPU clock < AHB clock, set SRAM REQ ACK */ + if (cpu_clk < ahb_clk) + qca_soc_reg_read_set(QCA_DDR_CTRL_CFG_REG, + QCA_DDR_CTRL_CFG_SRAM_REQ_ACK_MASK); + else + qca_soc_reg_read_clear(QCA_DDR_CTRL_CFG_REG, + QCA_DDR_CTRL_CFG_SRAM_REQ_ACK_MASK); #endif /* -- 2.25.1