Lines Matching refs:mrc_params

24 static __maybe_unused int prepare_mrc_cache(struct mrc_params *mrc_params)  in prepare_mrc_cache()  argument
42 memcpy(&mrc_params->timings, cache->data, cache->data_size); in prepare_mrc_cache()
47 static int mrc_configure_params(struct mrc_params *mrc_params) in mrc_configure_params() argument
60 mrc_params->boot_mode = prepare_mrc_cache(mrc_params); in mrc_configure_params()
61 if (mrc_params->boot_mode) in mrc_configure_params()
62 mrc_params->boot_mode = BM_COLD; in mrc_configure_params()
64 mrc_params->boot_mode = BM_FAST; in mrc_configure_params()
66 mrc_params->boot_mode = BM_COLD; in mrc_configure_params()
76 mrc_params->ecc_enables = 0; in mrc_configure_params()
80 mrc_params->scrambling_enables = 1; in mrc_configure_params()
82 mrc_params->scrambling_enables = 0; in mrc_configure_params()
84 mrc_params->dram_width = fdtdec_get_int(blob, node, "dram-width", 0); in mrc_configure_params()
85 mrc_params->ddr_speed = fdtdec_get_int(blob, node, "dram-speed", 0); in mrc_configure_params()
86 mrc_params->ddr_type = fdtdec_get_int(blob, node, "dram-type", 0); in mrc_configure_params()
88 mrc_params->rank_enables = fdtdec_get_int(blob, node, "rank-mask", 0); in mrc_configure_params()
89 mrc_params->channel_enables = fdtdec_get_int(blob, node, in mrc_configure_params()
91 mrc_params->channel_width = fdtdec_get_int(blob, node, in mrc_configure_params()
93 mrc_params->address_mode = fdtdec_get_int(blob, node, "addr-mode", 0); in mrc_configure_params()
95 mrc_params->refresh_rate = fdtdec_get_int(blob, node, in mrc_configure_params()
97 mrc_params->sr_temp_range = fdtdec_get_int(blob, node, in mrc_configure_params()
99 mrc_params->ron_value = fdtdec_get_int(blob, node, in mrc_configure_params()
101 mrc_params->rtt_nom_value = fdtdec_get_int(blob, node, in mrc_configure_params()
103 mrc_params->rd_odt_value = fdtdec_get_int(blob, node, in mrc_configure_params()
106 mrc_params->params.density = fdtdec_get_int(blob, node, in mrc_configure_params()
108 mrc_params->params.cl = fdtdec_get_int(blob, node, "dram-cl", 0); in mrc_configure_params()
109 mrc_params->params.ras = fdtdec_get_int(blob, node, "dram-ras", 0); in mrc_configure_params()
110 mrc_params->params.wtr = fdtdec_get_int(blob, node, "dram-wtr", 0); in mrc_configure_params()
111 mrc_params->params.rrd = fdtdec_get_int(blob, node, "dram-rrd", 0); in mrc_configure_params()
112 mrc_params->params.faw = fdtdec_get_int(blob, node, "dram-faw", 0); in mrc_configure_params()
114 debug("MRC dram_width %d\n", mrc_params->dram_width); in mrc_configure_params()
115 debug("MRC rank_enables %d\n", mrc_params->rank_enables); in mrc_configure_params()
116 debug("MRC ddr_speed %d\n", mrc_params->ddr_speed); in mrc_configure_params()
118 (mrc_params->scrambling_enables) ? "SCRAMBLE_EN" : ""); in mrc_configure_params()
121 mrc_params->params.density, mrc_params->params.cl, in mrc_configure_params()
122 mrc_params->params.ras, mrc_params->params.wtr, in mrc_configure_params()
123 mrc_params->params.rrd, mrc_params->params.faw); in mrc_configure_params()
130 struct mrc_params mrc_params; in dram_init() local
136 memset(&mrc_params, 0, sizeof(struct mrc_params)); in dram_init()
137 ret = mrc_configure_params(&mrc_params); in dram_init()
142 mrc_init(&mrc_params); in dram_init()
143 if (mrc_params.status) in dram_init()
146 gd->ram_size = mrc_params.mem_size; in dram_init()
162 memcpy(cache, &mrc_params.timings, sizeof(struct mrc_timings)); in dram_init()