• Home
  • Raw
  • Download

Lines Matching refs:spd

86 compute_ranksize(const struct ddr4_spd_eeprom_s *spd)  in compute_ranksize()  argument
96 if ((spd->density_banks & 0xf) <= 7) in compute_ranksize()
97 nbit_sdram_cap_bsize = (spd->density_banks & 0xf) + 28; in compute_ranksize()
98 if ((spd->bus_width & 0x7) < 4) in compute_ranksize()
99 nbit_primary_bus_width = (spd->bus_width & 0x7) + 3; in compute_ranksize()
100 if ((spd->organization & 0x7) < 4) in compute_ranksize()
101 nbit_sdram_width = (spd->organization & 0x7) + 2; in compute_ranksize()
102 package_3ds = (spd->package_type & 0x3) == 0x2; in compute_ranksize()
103 if ((spd->package_type & 0x80) && !package_3ds) { /* other than 3DS */ in compute_ranksize()
108 die_count = (spd->package_type >> 4) & 0x7; in compute_ranksize()
129 const generic_spd_eeprom_t *spd, in ddr_compute_dimm_parameters() argument
143 if (spd->mem_type) { in ddr_compute_dimm_parameters()
144 if (spd->mem_type != SPD_MEMTYPE_DDR4) { in ddr_compute_dimm_parameters()
154 retval = ddr4_spd_check(spd); in ddr_compute_dimm_parameters()
166 if ((spd->info_size_crc & 0xF) > 2) 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()
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()
175 if ((spd->bus_width >> 3) & 0x3) 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()
183 (spd->package_type >> 4) & 0x7 : 0; in ddr_compute_dimm_parameters()
188 switch (spd->module_type & DDR4_SPD_MODULETYPE_MASK) { in ddr_compute_dimm_parameters()
192 if (spd->mod_section.registered.reg_map & 0x1) in ddr_compute_dimm_parameters()
194 val = spd->mod_section.registered.ca_stren; in ddr_compute_dimm_parameters()
197 val = spd->mod_section.registered.clk_stren; in ddr_compute_dimm_parameters()
219 if (spd->mod_section.unbuffered.addr_mapping & 0x1) in ddr_compute_dimm_parameters()
221 if ((spd->mod_section.unbuffered.mod_height & 0xe0) == 0 && in ddr_compute_dimm_parameters()
222 (spd->mod_section.unbuffered.ref_raw_card == 0x04)) { in ddr_compute_dimm_parameters()
225 if (spd->mapping[i] == udimm_rc_e_dq[i]) in ddr_compute_dimm_parameters()
229 60 + i, spd->mapping[i], in ddr_compute_dimm_parameters()
231 ptr = (u8 *)&spd->mapping[i]; in ddr_compute_dimm_parameters()
240 printf("unknown module_type 0x%02X\n", spd->module_type); 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()
274 if ((spd->timebases & 0xf) == 0x0) { 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()
297 (spd->caslat_b2 << 15) | in ddr_compute_dimm_parameters()
298 (spd->caslat_b3 << 23); in ddr_compute_dimm_parameters()
300 BUG_ON(spd->caslat_b4 != 0); 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()
323 spd->trc_min_lsb), spd->fine_trc_min); in ddr_compute_dimm_parameters()
325 pdimm->trfc1_ps = ((spd->trfc1_min_msb << 8) | (spd->trfc1_min_lsb)) * in ddr_compute_dimm_parameters()
327 pdimm->trfc2_ps = ((spd->trfc2_min_msb << 8) | (spd->trfc2_min_lsb)) * in ddr_compute_dimm_parameters()
329 pdimm->trfc4_ps = ((spd->trfc4_min_msb << 8) | (spd->trfc4_min_lsb)) * in ddr_compute_dimm_parameters()
332 pdimm->tfaw_ps = (((spd->tfaw_msb & 0xf) << 8) | spd->tfaw_min) * 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()
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()