Lines Matching refs:dram
532 static void dram_all_config(const struct dram_info *dram, in dram_all_config() argument
554 dram_cfg_rbc(&dram->chan[chan], chan, sdram_params); in dram_all_config()
557 ddr_rank_2_row15en(dram->grf, 0); in dram_all_config()
559 ddr_rank_2_row15en(dram->grf, 1); in dram_all_config()
561 writel(sys_reg, &dram->pmu->sys_reg[2]); in dram_all_config()
564 static int sdram_rank_bw_detect(struct dram_info *dram, int channel, in sdram_rank_bw_detect() argument
569 const struct chan_info *chan = &dram->chan[channel]; in sdram_rank_bw_detect()
572 ddr_rank_2_row15en(dram->grf, 0); in sdram_rank_bw_detect()
595 dram->grf); in sdram_rank_bw_detect()
605 ddr_phy_ctl_reset(dram->cru, channel, 1); in sdram_rank_bw_detect()
607 ddr_phy_ctl_reset(dram->cru, channel, 0); in sdram_rank_bw_detect()
625 static int sdram_col_row_detect(struct dram_info *dram, int channel, in sdram_col_row_detect() argument
630 const struct chan_info *chan = &dram->chan[channel]; in sdram_col_row_detect()
653 ddr_rank_2_row15en(dram->grf, 1); in sdram_col_row_detect()
709 static int sdram_init(struct dram_info *dram, in sdram_init() argument
722 ret = clk_set_rate(&dram->ddr_clk, sdram_params->base.ddr_freq); in sdram_init()
729 const struct chan_info *chan = &dram->chan[channel]; in sdram_init()
733 phy_pctrl_reset(dram->cru, publ, channel); in sdram_init()
738 pctl_cfg(channel, pctl, sdram_params, dram->grf); in sdram_init()
754 sdram_params->ch[channel].bw, dram->grf); in sdram_init()
774 sdram_rank_bw_detect(dram, channel, sdram_params); in sdram_init()
787 ret = sdram_col_row_detect(dram, channel, sdram_params); in sdram_init()
796 dram_all_config(dram, sdram_params); in sdram_init()