Lines Matching refs:pdimm
120 (mtb * pdimm->mtb_ps + (ftb * pdimm->ftb_10th_ps) / 10)
130 dimm_params_t *pdimm, in ddr_compute_dimm_parameters() argument
150 memset(pdimm, 0, sizeof(dimm_params_t)); in ddr_compute_dimm_parameters()
165 memset(pdimm->mpart, 0, sizeof(pdimm->mpart)); in ddr_compute_dimm_parameters()
167 memcpy(pdimm->mpart, spd->mpart, sizeof(pdimm->mpart) - 1); in ddr_compute_dimm_parameters()
170 pdimm->n_ranks = ((spd->organization >> 3) & 0x7) + 1; in ddr_compute_dimm_parameters()
171 pdimm->rank_density = compute_ranksize(spd); in ddr_compute_dimm_parameters()
172 pdimm->capacity = pdimm->n_ranks * pdimm->rank_density; in ddr_compute_dimm_parameters()
173 pdimm->die_density = spd->density_banks & 0xf; in ddr_compute_dimm_parameters()
174 pdimm->primary_sdram_width = 1 << (3 + (spd->bus_width & 0x7)); in ddr_compute_dimm_parameters()
176 pdimm->ec_sdram_width = 8; in ddr_compute_dimm_parameters()
178 pdimm->ec_sdram_width = 0; in ddr_compute_dimm_parameters()
179 pdimm->data_width = pdimm->primary_sdram_width in ddr_compute_dimm_parameters()
180 + pdimm->ec_sdram_width; in ddr_compute_dimm_parameters()
181 pdimm->device_width = 1 << ((spd->organization & 0x7) + 2); in ddr_compute_dimm_parameters()
182 pdimm->package_3ds = (spd->package_type & 0x3) == 0x2 ? in ddr_compute_dimm_parameters()
186 pdimm->mirrored_dimm = 0; in ddr_compute_dimm_parameters()
187 pdimm->registered_dimm = 0; in ddr_compute_dimm_parameters()
191 pdimm->registered_dimm = 1; in ddr_compute_dimm_parameters()
193 pdimm->mirrored_dimm = 1; in ddr_compute_dimm_parameters()
195 pdimm->rcw[3] = val >> 4; in ddr_compute_dimm_parameters()
196 pdimm->rcw[4] = ((val & 0x3) << 2) | ((val & 0xc) >> 2); in ddr_compute_dimm_parameters()
198 pdimm->rcw[5] = ((val & 0x3) << 2) | ((val & 0xc) >> 2); in ddr_compute_dimm_parameters()
200 pdimm->rcw[6] = 0xf; in ddr_compute_dimm_parameters()
205 pdimm->rcw[8] = pdimm->die_density >= 0x6 ? 0x0 : 0x8 | in ddr_compute_dimm_parameters()
206 (pdimm->package_3ds > 0x3 ? 0x0 : in ddr_compute_dimm_parameters()
207 (pdimm->package_3ds > 0x1 ? 0x1 : in ddr_compute_dimm_parameters()
208 (pdimm->package_3ds > 0 ? 0x2 : 0x3))); in ddr_compute_dimm_parameters()
209 if (pdimm->package_3ds || pdimm->n_ranks != 4) in ddr_compute_dimm_parameters()
210 pdimm->rcw[13] = 0xc; in ddr_compute_dimm_parameters()
212 pdimm->rcw[13] = 0xd; /* Fix encoded by board */ in ddr_compute_dimm_parameters()
220 pdimm->mirrored_dimm = 1; in ddr_compute_dimm_parameters()
245 pdimm->n_row_addr = ((spd->addressing >> 3) & 0x7) + 12; in ddr_compute_dimm_parameters()
246 pdimm->n_col_addr = (spd->addressing & 0x7) + 9; in ddr_compute_dimm_parameters()
247 pdimm->bank_addr_bits = (spd->density_banks >> 4) & 0x3; in ddr_compute_dimm_parameters()
248 pdimm->bank_group_bits = (spd->density_banks >> 6) & 0x3; in ddr_compute_dimm_parameters()
255 if (pdimm->ec_sdram_width) in ddr_compute_dimm_parameters()
256 pdimm->edc_config = 0x02; in ddr_compute_dimm_parameters()
258 pdimm->edc_config = 0x00; in ddr_compute_dimm_parameters()
265 pdimm->burst_lengths_bitmask = 0x0c; in ddr_compute_dimm_parameters()
275 pdimm->mtb_ps = 125; in ddr_compute_dimm_parameters()
276 pdimm->ftb_10th_ps = 10; in ddr_compute_dimm_parameters()
283 pdimm->tckmin_x_ps = spd_to_ps(spd->tck_min, spd->fine_tck_min); in ddr_compute_dimm_parameters()
286 pdimm->tckmax_ps = spd_to_ps(spd->tck_max, spd->fine_tck_max); in ddr_compute_dimm_parameters()
296 pdimm->caslat_x = (spd->caslat_b1 << 7) | in ddr_compute_dimm_parameters()
305 pdimm->taa_ps = spd_to_ps(spd->taa_min, spd->fine_taa_min); in ddr_compute_dimm_parameters()
310 pdimm->trcd_ps = spd_to_ps(spd->trcd_min, spd->fine_trcd_min); in ddr_compute_dimm_parameters()
315 pdimm->trp_ps = spd_to_ps(spd->trp_min, spd->fine_trp_min); in ddr_compute_dimm_parameters()
318 pdimm->tras_ps = (((spd->tras_trc_ext & 0xf) << 8) + in ddr_compute_dimm_parameters()
319 spd->tras_min_lsb) * pdimm->mtb_ps; in ddr_compute_dimm_parameters()
322 pdimm->trc_ps = spd_to_ps((((spd->tras_trc_ext & 0xf0) << 4) + in ddr_compute_dimm_parameters()
325 pdimm->trfc1_ps = ((spd->trfc1_min_msb << 8) | (spd->trfc1_min_lsb)) * in ddr_compute_dimm_parameters()
326 pdimm->mtb_ps; in ddr_compute_dimm_parameters()
327 pdimm->trfc2_ps = ((spd->trfc2_min_msb << 8) | (spd->trfc2_min_lsb)) * in ddr_compute_dimm_parameters()
328 pdimm->mtb_ps; in ddr_compute_dimm_parameters()
329 pdimm->trfc4_ps = ((spd->trfc4_min_msb << 8) | (spd->trfc4_min_lsb)) * in ddr_compute_dimm_parameters()
330 pdimm->mtb_ps; in ddr_compute_dimm_parameters()
332 pdimm->tfaw_ps = (((spd->tfaw_msb & 0xf) << 8) | spd->tfaw_min) * in ddr_compute_dimm_parameters()
333 pdimm->mtb_ps; in ddr_compute_dimm_parameters()
336 pdimm->trrds_ps = spd_to_ps(spd->trrds_min, spd->fine_trrds_min); in ddr_compute_dimm_parameters()
338 pdimm->trrdl_ps = spd_to_ps(spd->trrdl_min, spd->fine_trrdl_min); in ddr_compute_dimm_parameters()
340 pdimm->tccdl_ps = spd_to_ps(spd->tccdl_min, spd->fine_tccdl_min); in ddr_compute_dimm_parameters()
342 if (pdimm->package_3ds) { in ddr_compute_dimm_parameters()
343 if (pdimm->die_density <= 0x4) { in ddr_compute_dimm_parameters()
344 pdimm->trfc_slr_ps = 260000; in ddr_compute_dimm_parameters()
345 } else if (pdimm->die_density <= 0x5) { in ddr_compute_dimm_parameters()
346 pdimm->trfc_slr_ps = 350000; in ddr_compute_dimm_parameters()
349 pdimm->die_density); in ddr_compute_dimm_parameters()
357 pdimm->refresh_rate_ps = 7800000; in ddr_compute_dimm_parameters()
360 pdimm->dq_mapping[i] = spd->mapping[i]; in ddr_compute_dimm_parameters()
362 pdimm->dq_mapping_ors = ((spd->mapping[0] >> 6) & 0x3) == 0 ? 1 : 0; in ddr_compute_dimm_parameters()