Lines Matching refs:dram
594 static void dram_all_config(const struct dram_info *dram, in dram_all_config() argument
616 dram_cfg_rbc(&dram->chan[chan], chan, sdram_params); in dram_all_config()
618 writel(sys_reg, &dram->pmu->sys_reg[2]); in dram_all_config()
619 rk_clrsetreg(&dram->sgrf->soc_con2, 0x1f, sdram_params->base.stride); in dram_all_config()
622 static int sdram_rank_bw_detect(struct dram_info *dram, int channel, in sdram_rank_bw_detect() argument
627 const struct chan_info *chan = &dram->chan[channel]; in sdram_rank_bw_detect()
653 dram->grf); in sdram_rank_bw_detect()
663 ddr_phy_ctl_reset(dram->cru, channel, 1); in sdram_rank_bw_detect()
665 ddr_phy_ctl_reset(dram->cru, channel, 0); in sdram_rank_bw_detect()
675 static int sdram_col_row_detect(struct dram_info *dram, int channel, in sdram_col_row_detect() argument
680 const struct chan_info *chan = &dram->chan[channel]; in sdram_col_row_detect()
785 static int sdram_init(struct dram_info *dram, in sdram_init() argument
802 ret = clk_set_rate(&dram->ddr_clk, sdram_params->base.ddr_freq); in sdram_init()
810 const struct chan_info *chan = &dram->chan[channel]; in sdram_init()
816 rk_clrsetreg(&dram->sgrf->soc_con2, 0x1f, 0x17); in sdram_init()
818 rk_clrsetreg(&dram->sgrf->soc_con2, 0x1f, 0x1a); in sdram_init()
819 phy_pctrl_reset(dram->cru, publ, channel); in sdram_init()
824 pctl_cfg(channel, pctl, sdram_params, dram->grf); in sdram_init()
858 sdram_params->ch[channel].bw, dram->grf); in sdram_init()
895 sdram_rank_bw_detect(dram, channel, sdram_params); in sdram_init()
908 ret = sdram_col_row_detect(dram, channel, sdram_params); in sdram_init()
921 dram_all_config(dram, sdram_params); in sdram_init()