• Home
  • Raw
  • Download

Lines Matching refs:dram

363 static void phy_softreset(struct dram_info *dram)  in phy_softreset()  argument
365 struct rk322x_ddr_phy *ddr_phy = dram->chan[0].phy; in phy_softreset()
366 struct rk322x_grf *grf = dram->grf; in phy_softreset()
378 static void set_bw(struct dram_info *dram, u32 bw) in set_bw() argument
380 struct rk322x_ddr_pctl *pctl = dram->chan[0].pctl; in set_bw()
381 struct rk322x_ddr_phy *ddr_phy = dram->chan[0].phy; in set_bw()
382 struct rk322x_grf *grf = dram->grf; in set_bw()
577 static void dram_all_config(const struct dram_info *dram, in dram_all_config() argument
595 writel(sys_reg, &dram->grf->os_reg[2]); in dram_all_config()
600 static int dram_cap_detect(struct dram_info *dram, in dram_cap_detect() argument
605 struct rk322x_service_sys *axi_bus = dram->chan[0].msch; in dram_cap_detect()
612 move_to_config_state(dram->chan[0].pctl); in dram_cap_detect()
614 set_bw(dram, 2); in dram_cap_detect()
615 if (data_training(&dram->chan[0]) == 0) { in dram_cap_detect()
619 set_bw(dram, 1); in dram_cap_detect()
620 move_to_lowpower_state(dram->chan[0].pctl); in dram_cap_detect()
621 phy_softreset(dram); in dram_cap_detect()
622 move_to_config_state(dram->chan[0].pctl); in dram_cap_detect()
623 if (data_training(&dram->chan[0])) { in dram_cap_detect()
635 move_to_access_state(dram->chan[0].pctl); in dram_cap_detect()
685 static int sdram_init(struct dram_info *dram, in sdram_init() argument
690 ret = clk_set_rate(&dram->ddr_clk, in sdram_init()
697 phy_pctrl_reset(dram->cru, dram->chan[0].phy); in sdram_init()
698 phy_dll_bypass_set(dram->chan[0].phy, sdram_params->base.ddr_freq); in sdram_init()
699 pctl_cfg(dram->chan[0].pctl, sdram_params, dram->grf); in sdram_init()
700 phy_cfg(&dram->chan[0], sdram_params); in sdram_init()
701 writel(POWER_UP_START, &dram->chan[0].pctl->powctl); in sdram_init()
702 while (!(readl(&dram->chan[0].pctl->powstat) & POWER_UP_DONE)) in sdram_init()
704 memory_init(&dram->chan[0], sdram_params); in sdram_init()
705 move_to_access_state(dram->chan[0].pctl); in sdram_init()
706 ret = dram_cap_detect(dram, sdram_params); in sdram_init()
709 dram_cfg_rbc(&dram->chan[0], sdram_params); in sdram_init()
710 dram_all_config(dram, sdram_params); in sdram_init()