Lines Matching full:mci

92 static void count_rec(struct mem_ctl_info *mci, u8 rec_cnt, u32 rec_addr)  in count_rec()  argument
94 struct csrow_info *csrow = mci->csrows[0]; in count_rec()
107 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, rec_cnt-1, in count_rec()
118 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, in count_rec()
124 static void count_un_rec(struct mem_ctl_info *mci, u8 un_rec_cnt, in count_un_rec() argument
127 struct csrow_info *csrow = mci->csrows[0]; in count_un_rec()
139 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, in count_un_rec()
150 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, un_rec_cnt-1, in count_un_rec()
159 struct mem_ctl_info *mci = arg; in mcr_isr() local
165 dev_dbg(mci->pdev, "received edac interrupt w/ mcr register 50: 0x%x\n", in mcr_isr()
172 dev_dbg(mci->pdev, "%d recoverable interrupts and %d unrecoverable interrupts\n", in mcr_isr()
190 count_rec(mci, rec_cnt, rec_addr); in mcr_isr()
191 count_un_rec(mci, un_rec_cnt, un_rec_addr); in mcr_isr()
194 dev_dbg(mci->pdev, "received edac interrupt, but did not find any ECC counters\n"); in mcr_isr()
197 dev_dbg(mci->pdev, "edac interrupt handled. mcr reg 50 is now: 0x%x\n", in mcr_isr()
231 static int init_csrows(struct mem_ctl_info *mci) in init_csrows() argument
233 struct csrow_info *csrow = mci->csrows[0]; in init_csrows()
244 dev_err(mci->pdev, "dt: missing /memory node\n"); in init_csrows()
253 dev_err(mci->pdev, "dt: failed requesting resource for /memory node\n"); in init_csrows()
257 dev_dbg(mci->pdev, "dt: /memory node resources: first page %pR, PAGE_SHIFT macro=0x%x\n", in init_csrows()
272 dev_dbg(mci->pdev, "initialized dimm with first_page=0x%lx and nr_pages=0x%x\n", in init_csrows()
283 struct mem_ctl_info *mci; in aspeed_probe() local
314 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); in aspeed_probe()
315 if (!mci) in aspeed_probe()
318 mci->pdev = &pdev->dev; in aspeed_probe()
319 mci->mtype_cap = MEM_FLAG_DDR3 | MEM_FLAG_DDR4; in aspeed_probe()
320 mci->edac_ctl_cap = EDAC_FLAG_SECDED; in aspeed_probe()
321 mci->edac_cap = EDAC_FLAG_SECDED; in aspeed_probe()
322 mci->scrub_cap = SCRUB_FLAG_HW_SRC; in aspeed_probe()
323 mci->scrub_mode = SCRUB_HW_SRC; in aspeed_probe()
324 mci->mod_name = DRV_NAME; in aspeed_probe()
325 mci->ctl_name = "MIC"; in aspeed_probe()
326 mci->dev_name = dev_name(&pdev->dev); in aspeed_probe()
328 rc = init_csrows(mci); in aspeed_probe()
334 platform_set_drvdata(pdev, mci); in aspeed_probe()
337 rc = edac_mc_add_mc(mci); in aspeed_probe()
344 rc = config_irq(mci, pdev); in aspeed_probe()
355 edac_mc_free(mci); in aspeed_probe()
362 struct mem_ctl_info *mci; in aspeed_remove() local
369 mci = edac_mc_del_mc(&pdev->dev); in aspeed_remove()
370 if (mci) in aspeed_remove()
371 edac_mc_free(mci); in aspeed_remove()