aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@linaro.org>2013-10-10 12:23:38 -0400
committerRobert Richter <rric@kernel.org>2013-11-04 16:43:18 -0500
commita72b8859fd3941cc1d2940d5c43026d2c6fb959e (patch)
treed2ef84f8fc228330808958e001a694810ce579be /drivers/edac
parent959f58544b7f20c92d5eb43d1232c96c15c01bfb (diff)
edac, highbank: Fix interrupt setup of mem and l2 controller
Register and enable interrupts after the edac registration. Otherwise incomming ecc error interrupts lead to crashes during device setup. Fixing this in drivers for mc and l2. Signed-off-by: Robert Richter <robert.richter@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Cc: stable <stable@vger.kernel.org> # 3.6+ Signed-off-by: Robert Richter <rric@kernel.org>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/highbank_l2_edac.c18
-rw-r--r--drivers/edac/highbank_mc_edac.c18
2 files changed, 20 insertions, 16 deletions
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c
index c2bd8c6a4349..10d3d298b640 100644
--- a/drivers/edac/highbank_l2_edac.c
+++ b/drivers/edac/highbank_l2_edac.c
@@ -90,28 +90,30 @@ static int highbank_l2_err_probe(struct platform_device *pdev)
90 goto err; 90 goto err;
91 } 91 }
92 92
93 dci->mod_name = dev_name(&pdev->dev);
94 dci->dev_name = dev_name(&pdev->dev);
95
96 if (edac_device_add_device(dci))
97 goto err;
98
93 drvdata->db_irq = platform_get_irq(pdev, 0); 99 drvdata->db_irq = platform_get_irq(pdev, 0);
94 res = devm_request_irq(&pdev->dev, drvdata->db_irq, 100 res = devm_request_irq(&pdev->dev, drvdata->db_irq,
95 highbank_l2_err_handler, 101 highbank_l2_err_handler,
96 0, dev_name(&pdev->dev), dci); 102 0, dev_name(&pdev->dev), dci);
97 if (res < 0) 103 if (res < 0)
98 goto err; 104 goto err2;
99 105
100 drvdata->sb_irq = platform_get_irq(pdev, 1); 106 drvdata->sb_irq = platform_get_irq(pdev, 1);
101 res = devm_request_irq(&pdev->dev, drvdata->sb_irq, 107 res = devm_request_irq(&pdev->dev, drvdata->sb_irq,
102 highbank_l2_err_handler, 108 highbank_l2_err_handler,
103 0, dev_name(&pdev->dev), dci); 109 0, dev_name(&pdev->dev), dci);
104 if (res < 0) 110 if (res < 0)
105 goto err; 111 goto err2;
106
107 dci->mod_name = dev_name(&pdev->dev);
108 dci->dev_name = dev_name(&pdev->dev);
109
110 if (edac_device_add_device(dci))
111 goto err;
112 112
113 devres_close_group(&pdev->dev, NULL); 113 devres_close_group(&pdev->dev, NULL);
114 return 0; 114 return 0;
115err2:
116 edac_device_del_device(&pdev->dev);
115err: 117err:
116 devres_release_group(&pdev->dev, NULL); 118 devres_release_group(&pdev->dev, NULL);
117 edac_device_free_ctl_info(dci); 119 edac_device_free_ctl_info(dci);
diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c
index 4695dd2d71fd..7a78307588bc 100644
--- a/drivers/edac/highbank_mc_edac.c
+++ b/drivers/edac/highbank_mc_edac.c
@@ -189,14 +189,6 @@ static int highbank_mc_probe(struct platform_device *pdev)
189 goto err; 189 goto err;
190 } 190 }
191 191
192 irq = platform_get_irq(pdev, 0);
193 res = devm_request_irq(&pdev->dev, irq, highbank_mc_err_handler,
194 0, dev_name(&pdev->dev), mci);
195 if (res < 0) {
196 dev_err(&pdev->dev, "Unable to request irq %d\n", irq);
197 goto err;
198 }
199
200 mci->mtype_cap = MEM_FLAG_DDR3; 192 mci->mtype_cap = MEM_FLAG_DDR3;
201 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; 193 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED;
202 mci->edac_cap = EDAC_FLAG_SECDED; 194 mci->edac_cap = EDAC_FLAG_SECDED;
@@ -217,10 +209,20 @@ static int highbank_mc_probe(struct platform_device *pdev)
217 if (res < 0) 209 if (res < 0)
218 goto err; 210 goto err;
219 211
212 irq = platform_get_irq(pdev, 0);
213 res = devm_request_irq(&pdev->dev, irq, highbank_mc_err_handler,
214 0, dev_name(&pdev->dev), mci);
215 if (res < 0) {
216 dev_err(&pdev->dev, "Unable to request irq %d\n", irq);
217 goto err2;
218 }
219
220 highbank_mc_create_debugfs_nodes(mci); 220 highbank_mc_create_debugfs_nodes(mci);
221 221
222 devres_close_group(&pdev->dev, NULL); 222 devres_close_group(&pdev->dev, NULL);
223 return 0; 223 return 0;
224err2:
225 edac_mc_del_mc(&pdev->dev);
224err: 226err:
225 devres_release_group(&pdev->dev, NULL); 227 devres_release_group(&pdev->dev, NULL);
226 edac_mc_free(mci); 228 edac_mc_free(mci);