13 #include <linux/module.h>
18 #include <asm/machdep.h>
39 dev_dbg(mci->
pdev,
"ECC CE err on node %d, channel %d, ar = 0x%016llx\n",
40 priv->
node, chan, ar);
43 address = (ar & 0xffffffffe0000000ul) >> 29;
45 address = (address << 1) | chan;
48 syndrome = (ar & 0x000000001fe00000ul) >> 21;
62 dev_dbg(mci->
pdev,
"ECC UE err on node %d, channel %d, ar = 0x%016llx\n",
63 priv->
node, chan, ar);
66 address = (ar & 0xffffffffe0000000ul) >> 29;
68 address = (address << 1) | chan;
83 fir = in_be64(&priv->
regs->mic_fir);
85 if (fir != priv->prev_fir) {
91 addreg = in_be64(&priv->
regs->mic_df_ecc_address_0);
93 cell_edac_count_ce(mci, 0, addreg);
96 addreg = in_be64(&priv->
regs->mic_df_ecc_address_1);
98 cell_edac_count_ce(mci, 1, addreg);
101 addreg = in_be64(&priv->
regs->mic_df_ecc_address_0);
103 cell_edac_count_ue(mci, 0, addreg);
106 addreg = in_be64(&priv->
regs->mic_df_ecc_address_1);
108 cell_edac_count_ue(mci, 1, addreg);
116 out_be64(&priv->
regs->mic_fir, fir);
117 (
void)in_be64(&priv->
regs->mic_fir);
121 fir = in_be64(&priv->
regs->mic_fir);
159 "Initialized on node %d, chanmask=0x%x,"
160 " first_page=0x%lx, nr_pages=0x%x\n",
184 dev_dbg(&pdev->
dev,
"MIC_MNT_CFG = 0x%016llx\n", reg);
192 "Yuck ! No channel populated ? Aborting !\n");
195 dev_dbg(&pdev->
dev,
"Initial FIR = 0x%016llx\n",
199 num_chans = chanmask == 3 ? 2 : 1;
203 layers[0].is_virt_csrow =
true;
205 layers[1].size = num_chans;
206 layers[1].is_virt_csrow =
false;
223 cell_edac_init_csrows(mci);
228 dev_err(&pdev->
dev,
"failed to register with EDAC core\n");
249 .probe = cell_edac_probe,
253 static int __init cell_edac_init(
void)
257 mic_df_ecc_address_0) != 0xf8);
259 mic_df_ecc_address_1) != 0x1b8);
261 mic_df_config) != 0x218);
265 mic_mnt_cfg) != 0x210);
272 static void __exit cell_edac_exit(
void)