@@ -3430,9 +3430,6 @@ static int init_csrows(struct mem_ctl_info *mci)
int nr_pages = 0;
u32 val;
- if (pvt->umc)
- return init_csrows_df(mci);
-
amd64_read_pci_cfg(pvt->F3, NBCFG, &val);
pvt->nbcfg = val;
@@ -3805,6 +3802,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f1x_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f1x_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows;
break;
case 0x10:
@@ -3823,6 +3821,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f1x_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f1x_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows;
break;
case 0x15:
@@ -3857,6 +3856,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f1x_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f1x_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows;
break;
case 0x16:
@@ -3881,6 +3881,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f1x_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f1x_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows;
break;
case 0x17:
@@ -3919,6 +3920,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f17_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f17_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows_df;
if (pvt->fam == 0x18) {
pvt->ctl_name = "F18h";
@@ -3963,6 +3965,7 @@ static int per_family_init(struct amd64_pvt *pvt)
pvt->ops->determine_edac_cap = f17_determine_edac_cap;
pvt->ops->determine_edac_ctl_cap = f17_determine_edac_ctl_cap;
pvt->ops->setup_mci_misc_attrs = f1x_setup_mci_misc_attrs;
+ pvt->ops->populate_csrows = init_csrows_df;
break;
default:
@@ -3976,7 +3979,7 @@ static int per_family_init(struct amd64_pvt *pvt)
!pvt->ops->determine_memory_type || !pvt->ops->determine_ecc_sym_sz ||
!pvt->ops->get_mc_regs || !pvt->ops->ecc_enabled ||
!pvt->ops->determine_edac_cap || !pvt->ops->determine_edac_ctl_cap ||
- !pvt->ops->setup_mci_misc_attrs) {
+ !pvt->ops->setup_mci_misc_attrs || !pvt->ops->populate_csrows) {
edac_dbg(1, "Common helper routines not defined.\n");
return -EFAULT;
}
@@ -4073,7 +4076,7 @@ static int init_one_instance(struct amd64_pvt *pvt)
pvt->ops->setup_mci_misc_attrs(mci);
- if (init_csrows(mci))
+ if (pvt->ops->populate_csrows(mci))
mci->edac_cap = EDAC_FLAG_NONE;
ret = -ENODEV;
@@ -473,6 +473,7 @@ struct low_ops {
unsigned long (*determine_edac_cap)(struct amd64_pvt *pvt);
void (*determine_edac_ctl_cap)(struct mem_ctl_info *mci, struct amd64_pvt *pvt);
void (*setup_mci_misc_attrs)(struct mem_ctl_info *mci);
+ int (*populate_csrows)(struct mem_ctl_info *mci);
};
int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,