Lines Matching full:mci
93 static void bluefield_gather_report_ecc(struct mem_ctl_info *mci, in bluefield_gather_report_ecc() argument
97 struct bluefield_edac_priv *priv = mci->pvt_info; in bluefield_gather_report_ecc()
125 edac_mc_handle_error(ecc_type, mci, error_cnt, 0, 0, 0, in bluefield_gather_report_ecc()
126 0, 0, -1, mci->ctl_name, ""); in bluefield_gather_report_ecc()
140 edac_mc_handle_error(ecc_type, mci, error_cnt, in bluefield_gather_report_ecc()
143 syndrom, ecc_dimm, 0, 0, mci->ctl_name, ""); in bluefield_gather_report_ecc()
146 static void bluefield_edac_check(struct mem_ctl_info *mci) in bluefield_edac_check() argument
148 struct bluefield_edac_priv *priv = mci->pvt_info; in bluefield_edac_check()
155 if (mci->edac_cap == EDAC_FLAG_NONE) in bluefield_edac_check()
165 bluefield_gather_report_ecc(mci, single_error_count, 1); in bluefield_edac_check()
171 bluefield_gather_report_ecc(mci, double_error_count, 0); in bluefield_edac_check()
180 static void bluefield_edac_init_dimms(struct mem_ctl_info *mci) in bluefield_edac_init_dimms() argument
182 struct bluefield_edac_priv *priv = mci->pvt_info; in bluefield_edac_init_dimms()
183 int mem_ctrl_idx = mci->mc_idx; in bluefield_edac_init_dimms()
189 dimm = mci->dimms[i]; in bluefield_edac_init_dimms()
237 mci->edac_cap = EDAC_FLAG_NONE; in bluefield_edac_init_dimms()
239 mci->edac_cap = EDAC_FLAG_SECDED; in bluefield_edac_init_dimms()
247 struct mem_ctl_info *mci; in bluefield_edac_mc_probe() local
277 mci = edac_mc_alloc(mc_idx, ARRAY_SIZE(layers), layers, sizeof(*priv)); in bluefield_edac_mc_probe()
278 if (!mci) in bluefield_edac_mc_probe()
281 priv = mci->pvt_info; in bluefield_edac_mc_probe()
291 mci->pdev = dev; in bluefield_edac_mc_probe()
292 mci->mtype_cap = MEM_FLAG_DDR4 | MEM_FLAG_RDDR4 | in bluefield_edac_mc_probe()
294 mci->edac_ctl_cap = EDAC_FLAG_SECDED; in bluefield_edac_mc_probe()
296 mci->mod_name = DRIVER_NAME; in bluefield_edac_mc_probe()
297 mci->ctl_name = "BlueField_Memory_Controller"; in bluefield_edac_mc_probe()
298 mci->dev_name = dev_name(dev); in bluefield_edac_mc_probe()
299 mci->edac_check = bluefield_edac_check; in bluefield_edac_mc_probe()
301 /* Initialize mci with the actual populated DIMM information. */ in bluefield_edac_mc_probe()
302 bluefield_edac_init_dimms(mci); in bluefield_edac_mc_probe()
304 platform_set_drvdata(pdev, mci); in bluefield_edac_mc_probe()
307 rc = edac_mc_add_mc(mci); in bluefield_edac_mc_probe()
320 edac_mc_free(mci); in bluefield_edac_mc_probe()
328 struct mem_ctl_info *mci = platform_get_drvdata(pdev); in bluefield_edac_mc_remove() local
331 edac_mc_free(mci); in bluefield_edac_mc_remove()