From: Piotr Dymacz Date: Sun, 25 Sep 2016 21:01:46 +0000 (+0200) Subject: Set/unset SRAM REQ ACK bit, based on CPU and AHB clocks in DRAM setup X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8ef919aec333064644804411b5e5fb914a04ee17;p=oweals%2Fu-boot_mod.git Set/unset SRAM REQ ACK bit, based on CPU and AHB clocks in DRAM setup --- 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 /*