aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/ppc4xx_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/ppc4xx_edac.c')
-rw-r--r--drivers/edac/ppc4xx_edac.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index b9f0c20df1aa..c1f0045ceb8e 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -184,8 +184,7 @@ struct ppc4xx_ecc_status {
184 184
185/* Function Prototypes */ 185/* Function Prototypes */
186 186
187static int ppc4xx_edac_probe(struct platform_device *device, 187static int ppc4xx_edac_probe(struct platform_device *device)
188 const struct of_device_id *device_id);
189static int ppc4xx_edac_remove(struct platform_device *device); 188static int ppc4xx_edac_remove(struct platform_device *device);
190 189
191/* Global Variables */ 190/* Global Variables */
@@ -201,7 +200,7 @@ static struct of_device_id ppc4xx_edac_match[] = {
201 { } 200 { }
202}; 201};
203 202
204static struct of_platform_driver ppc4xx_edac_driver = { 203static struct platform_driver ppc4xx_edac_driver = {
205 .probe = ppc4xx_edac_probe, 204 .probe = ppc4xx_edac_probe,
206 .remove = ppc4xx_edac_remove, 205 .remove = ppc4xx_edac_remove,
207 .driver = { 206 .driver = {
@@ -997,9 +996,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
997 * initialized. 996 * initialized.
998 * @op: A pointer to the OpenFirmware device tree node associated 997 * @op: A pointer to the OpenFirmware device tree node associated
999 * with the controller this EDAC instance is bound to. 998 * with the controller this EDAC instance is bound to.
1000 * @match: A pointer to the OpenFirmware device tree match
1001 * information associated with the controller this EDAC instance
1002 * is bound to.
1003 * @dcr_host: A pointer to the DCR data containing the DCR mapping 999 * @dcr_host: A pointer to the DCR data containing the DCR mapping
1004 * for this controller instance. 1000 * for this controller instance.
1005 * @mcopt1: The 32-bit Memory Controller Option 1 register value 1001 * @mcopt1: The 32-bit Memory Controller Option 1 register value
@@ -1015,7 +1011,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
1015static int __devinit 1011static int __devinit
1016ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1012ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1017 struct platform_device *op, 1013 struct platform_device *op,
1018 const struct of_device_id *match,
1019 const dcr_host_t *dcr_host, 1014 const dcr_host_t *dcr_host,
1020 u32 mcopt1) 1015 u32 mcopt1)
1021{ 1016{
@@ -1024,7 +1019,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1024 struct ppc4xx_edac_pdata *pdata = NULL; 1019 struct ppc4xx_edac_pdata *pdata = NULL;
1025 const struct device_node *np = op->dev.of_node; 1020 const struct device_node *np = op->dev.of_node;
1026 1021
1027 if (match == NULL) 1022 if (op->dev.of_match == NULL)
1028 return -EINVAL; 1023 return -EINVAL;
1029 1024
1030 /* Initial driver pointers and private data */ 1025 /* Initial driver pointers and private data */
@@ -1227,9 +1222,6 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1227 * ppc4xx_edac_probe - check controller and bind driver 1222 * ppc4xx_edac_probe - check controller and bind driver
1228 * @op: A pointer to the OpenFirmware device tree node associated 1223 * @op: A pointer to the OpenFirmware device tree node associated
1229 * with the controller being probed for driver binding. 1224 * with the controller being probed for driver binding.
1230 * @match: A pointer to the OpenFirmware device tree match
1231 * information associated with the controller being probed
1232 * for driver binding.
1233 * 1225 *
1234 * This routine probes a specific ibm,sdram-4xx-ddr2 controller 1226 * This routine probes a specific ibm,sdram-4xx-ddr2 controller
1235 * instance for binding with the driver. 1227 * instance for binding with the driver.
@@ -1237,8 +1229,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1237 * Returns 0 if the controller instance was successfully bound to the 1229 * Returns 0 if the controller instance was successfully bound to the
1238 * driver; otherwise, < 0 on error. 1230 * driver; otherwise, < 0 on error.
1239 */ 1231 */
1240static int __devinit 1232static int __devinit ppc4xx_edac_probe(struct platform_device *op)
1241ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
1242{ 1233{
1243 int status = 0; 1234 int status = 0;
1244 u32 mcopt1, memcheck; 1235 u32 mcopt1, memcheck;
@@ -1304,7 +1295,7 @@ ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
1304 goto done; 1295 goto done;
1305 } 1296 }
1306 1297
1307 status = ppc4xx_edac_mc_init(mci, op, match, &dcr_host, mcopt1); 1298 status = ppc4xx_edac_mc_init(mci, op, &dcr_host, mcopt1);
1308 1299
1309 if (status) { 1300 if (status) {
1310 ppc4xx_edac_mc_printk(KERN_ERR, mci, 1301 ppc4xx_edac_mc_printk(KERN_ERR, mci,
@@ -1421,7 +1412,7 @@ ppc4xx_edac_init(void)
1421 1412
1422 ppc4xx_edac_opstate_init(); 1413 ppc4xx_edac_opstate_init();
1423 1414
1424 return of_register_platform_driver(&ppc4xx_edac_driver); 1415 return platform_driver_register(&ppc4xx_edac_driver);
1425} 1416}
1426 1417
1427/** 1418/**
@@ -1434,7 +1425,7 @@ ppc4xx_edac_init(void)
1434static void __exit 1425static void __exit
1435ppc4xx_edac_exit(void) 1426ppc4xx_edac_exit(void)
1436{ 1427{
1437 of_unregister_platform_driver(&ppc4xx_edac_driver); 1428 platform_driver_unregister(&ppc4xx_edac_driver);
1438} 1429}
1439 1430
1440module_init(ppc4xx_edac_init); 1431module_init(ppc4xx_edac_init);