diff options
-rw-r--r-- | drivers/edac/highbank_l2_edac.c | 17 | ||||
-rw-r--r-- | drivers/edac/highbank_mc_edac.c | 5 |
2 files changed, 13 insertions, 9 deletions
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c index 10d3d298b640..2f193668ebc7 100644 --- a/drivers/edac/highbank_l2_edac.c +++ b/drivers/edac/highbank_l2_edac.c | |||
@@ -50,8 +50,15 @@ static irqreturn_t highbank_l2_err_handler(int irq, void *dev_id) | |||
50 | return IRQ_HANDLED; | 50 | return IRQ_HANDLED; |
51 | } | 51 | } |
52 | 52 | ||
53 | static const struct of_device_id hb_l2_err_of_match[] = { | ||
54 | { .compatible = "calxeda,hb-sregs-l2-ecc", }, | ||
55 | {}, | ||
56 | }; | ||
57 | MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); | ||
58 | |||
53 | static int highbank_l2_err_probe(struct platform_device *pdev) | 59 | static int highbank_l2_err_probe(struct platform_device *pdev) |
54 | { | 60 | { |
61 | const struct of_device_id *id; | ||
55 | struct edac_device_ctl_info *dci; | 62 | struct edac_device_ctl_info *dci; |
56 | struct hb_l2_drvdata *drvdata; | 63 | struct hb_l2_drvdata *drvdata; |
57 | struct resource *r; | 64 | struct resource *r; |
@@ -90,7 +97,9 @@ static int highbank_l2_err_probe(struct platform_device *pdev) | |||
90 | goto err; | 97 | goto err; |
91 | } | 98 | } |
92 | 99 | ||
93 | dci->mod_name = dev_name(&pdev->dev); | 100 | id = of_match_device(hb_l2_err_of_match, &pdev->dev); |
101 | dci->mod_name = pdev->dev.driver->name; | ||
102 | dci->ctl_name = id ? id->compatible : "unknown"; | ||
94 | dci->dev_name = dev_name(&pdev->dev); | 103 | dci->dev_name = dev_name(&pdev->dev); |
95 | 104 | ||
96 | if (edac_device_add_device(dci)) | 105 | if (edac_device_add_device(dci)) |
@@ -129,12 +138,6 @@ static int highbank_l2_err_remove(struct platform_device *pdev) | |||
129 | return 0; | 138 | return 0; |
130 | } | 139 | } |
131 | 140 | ||
132 | static const struct of_device_id hb_l2_err_of_match[] = { | ||
133 | { .compatible = "calxeda,hb-sregs-l2-ecc", }, | ||
134 | {}, | ||
135 | }; | ||
136 | MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); | ||
137 | |||
138 | static struct platform_driver highbank_l2_edac_driver = { | 141 | static struct platform_driver highbank_l2_edac_driver = { |
139 | .probe = highbank_l2_err_probe, | 142 | .probe = highbank_l2_err_probe, |
140 | .remove = highbank_l2_err_remove, | 143 | .remove = highbank_l2_err_remove, |
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c index 79cb872eef5f..82211915e3b0 100644 --- a/drivers/edac/highbank_mc_edac.c +++ b/drivers/edac/highbank_mc_edac.c | |||
@@ -233,9 +233,10 @@ static int highbank_mc_probe(struct platform_device *pdev) | |||
233 | mci->mtype_cap = MEM_FLAG_DDR3; | 233 | mci->mtype_cap = MEM_FLAG_DDR3; |
234 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | 234 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; |
235 | mci->edac_cap = EDAC_FLAG_SECDED; | 235 | mci->edac_cap = EDAC_FLAG_SECDED; |
236 | mci->mod_name = dev_name(&pdev->dev); | 236 | mci->mod_name = pdev->dev.driver->name; |
237 | mci->mod_ver = "1"; | 237 | mci->mod_ver = "1"; |
238 | mci->ctl_name = dev_name(&pdev->dev); | 238 | mci->ctl_name = id->compatible; |
239 | mci->dev_name = dev_name(&pdev->dev); | ||
239 | mci->scrub_mode = SCRUB_SW_SRC; | 240 | mci->scrub_mode = SCRUB_SW_SRC; |
240 | 241 | ||
241 | /* Only a single 4GB DIMM is supported */ | 242 | /* Only a single 4GB DIMM is supported */ |