Lines Matching refs:mci
39 static void octeon_lmc_edac_poll(struct mem_ctl_info *mci) in octeon_lmc_edac_poll() argument
45 cfg0.u64 = cvmx_read_csr(CVMX_LMCX_MEM_CFG0(mci->mc_idx)); in octeon_lmc_edac_poll()
48 fadr.u64 = cvmx_read_csr(CVMX_LMCX_FADR(mci->mc_idx)); in octeon_lmc_edac_poll()
56 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0, in octeon_lmc_edac_poll()
63 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, 0, 0, 0, in octeon_lmc_edac_poll()
69 cvmx_write_csr(CVMX_LMCX_MEM_CFG0(mci->mc_idx), cfg0.u64); in octeon_lmc_edac_poll()
72 static void octeon_lmc_edac_poll_o2(struct mem_ctl_info *mci) in octeon_lmc_edac_poll_o2() argument
74 struct octeon_lmc_pvt *pvt = mci->pvt_info; in octeon_lmc_edac_poll_o2()
80 int_reg.u64 = cvmx_read_csr(CVMX_LMCX_INT(mci->mc_idx)); in octeon_lmc_edac_poll_o2()
92 fadr.u64 = cvmx_read_csr(CVMX_LMCX_FADR(mci->mc_idx)); in octeon_lmc_edac_poll_o2()
107 edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0, in octeon_lmc_edac_poll_o2()
114 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, 0, 0, 0, in octeon_lmc_edac_poll_o2()
122 cvmx_write_csr(CVMX_LMCX_INT(mci->mc_idx), int_reg.u64); in octeon_lmc_edac_poll_o2()
136 struct mem_ctl_info *mci = to_mci(dev); \
137 struct octeon_lmc_pvt *pvt = mci->pvt_info; \
146 struct mem_ctl_info *mci = to_mci(dev); \
147 struct octeon_lmc_pvt *pvt = mci->pvt_info; \
173 struct mem_ctl_info *mci = to_mci(dev); in octeon_mc_inject_error_type_store() local
174 struct octeon_lmc_pvt *pvt = mci->pvt_info; in octeon_mc_inject_error_type_store()
188 struct mem_ctl_info *mci = to_mci(dev); in octeon_mc_inject_error_type_show() local
189 struct octeon_lmc_pvt *pvt = mci->pvt_info; in octeon_mc_inject_error_type_show()
228 struct mem_ctl_info *mci; in octeon_lmc_edac_probe() local
247 mci = edac_mc_alloc(mc, ARRAY_SIZE(layers), layers, sizeof(struct octeon_lmc_pvt)); in octeon_lmc_edac_probe()
248 if (!mci) in octeon_lmc_edac_probe()
251 mci->pdev = &pdev->dev; in octeon_lmc_edac_probe()
252 mci->dev_name = dev_name(&pdev->dev); in octeon_lmc_edac_probe()
254 mci->mod_name = "octeon-lmc"; in octeon_lmc_edac_probe()
255 mci->ctl_name = "octeon-lmc-err"; in octeon_lmc_edac_probe()
256 mci->edac_check = octeon_lmc_edac_poll; in octeon_lmc_edac_probe()
258 if (edac_mc_add_mc_with_groups(mci, octeon_dev_groups)) { in octeon_lmc_edac_probe()
260 edac_mc_free(mci); in octeon_lmc_edac_probe()
279 mci = edac_mc_alloc(mc, ARRAY_SIZE(layers), layers, sizeof(struct octeon_lmc_pvt)); in octeon_lmc_edac_probe()
280 if (!mci) in octeon_lmc_edac_probe()
283 mci->pdev = &pdev->dev; in octeon_lmc_edac_probe()
284 mci->dev_name = dev_name(&pdev->dev); in octeon_lmc_edac_probe()
286 mci->mod_name = "octeon-lmc"; in octeon_lmc_edac_probe()
287 mci->ctl_name = "co_lmc_err"; in octeon_lmc_edac_probe()
288 mci->edac_check = octeon_lmc_edac_poll_o2; in octeon_lmc_edac_probe()
290 if (edac_mc_add_mc_with_groups(mci, octeon_dev_groups)) { in octeon_lmc_edac_probe()
292 edac_mc_free(mci); in octeon_lmc_edac_probe()
301 platform_set_drvdata(pdev, mci); in octeon_lmc_edac_probe()
308 struct mem_ctl_info *mci = platform_get_drvdata(pdev); in octeon_lmc_edac_remove() local
311 edac_mc_free(mci); in octeon_lmc_edac_remove()