diff options
-rw-r--r-- | src/soc/rockchip/rk3288/sdram.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/rockchip/rk3288/sdram.c b/src/soc/rockchip/rk3288/sdram.c index 2698024435..3d547cde25 100644 --- a/src/soc/rockchip/rk3288/sdram.c +++ b/src/soc/rockchip/rk3288/sdram.c @@ -987,7 +987,7 @@ void sdram_init(const struct rk3288_sdram_params *sdram_params) rkclk_configure_ddr(sdram_params->ddr_freq); - for (channel = 0; channel < sdram_params->num_channels; channel++) { + for (channel = 0; channel < 2; channel++) { struct rk3288_ddr_pctl_regs *ddr_pctl_regs = rk3288_ddr_pctl[channel]; struct rk3288_ddr_publ_regs *ddr_publ_regs = @@ -996,6 +996,9 @@ void sdram_init(const struct rk3288_sdram_params *sdram_params) phy_pctrl_reset(ddr_publ_regs, channel); phy_dll_bypass_set(ddr_publ_regs, sdram_params->ddr_freq); + if (channel >= sdram_params->num_channels) + continue; + dfi_cfg(ddr_pctl_regs, sdram_params->dramtype); pctl_cfg(channel, sdram_params); |