aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/mpc85xx_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/mpc85xx_edac.c')
-rw-r--r--drivers/edac/mpc85xx_edac.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index ffb5ad080bee..38ab8e2cd7f4 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -1147,13 +1147,14 @@ static struct platform_driver mpc85xx_mc_err_driver = {
1147static void __init mpc85xx_mc_clear_rfxe(void *data) 1147static void __init mpc85xx_mc_clear_rfxe(void *data)
1148{ 1148{
1149 orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); 1149 orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
1150 mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000)); 1150 mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE));
1151} 1151}
1152#endif 1152#endif
1153 1153
1154static int __init mpc85xx_mc_init(void) 1154static int __init mpc85xx_mc_init(void)
1155{ 1155{
1156 int res = 0; 1156 int res = 0;
1157 u32 pvr = 0;
1157 1158
1158 printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " 1159 printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, "
1159 "(C) 2006 Montavista Software\n"); 1160 "(C) 2006 Montavista Software\n");
@@ -1183,12 +1184,17 @@ static int __init mpc85xx_mc_init(void)
1183#endif 1184#endif
1184 1185
1185#ifdef CONFIG_FSL_SOC_BOOKE 1186#ifdef CONFIG_FSL_SOC_BOOKE
1186 /* 1187 pvr = mfspr(SPRN_PVR);
1187 * need to clear HID1[RFXE] to disable machine check int 1188
1188 * so we can catch it 1189 if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
1189 */ 1190 (PVR_VER(pvr) == PVR_VER_E500V2)) {
1190 if (edac_op_state == EDAC_OPSTATE_INT) 1191 /*
1191 on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); 1192 * need to clear HID1[RFXE] to disable machine check int
1193 * so we can catch it
1194 */
1195 if (edac_op_state == EDAC_OPSTATE_INT)
1196 on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
1197 }
1192#endif 1198#endif
1193 1199
1194 return 0; 1200 return 0;
@@ -1206,7 +1212,12 @@ static void __exit mpc85xx_mc_restore_hid1(void *data)
1206static void __exit mpc85xx_mc_exit(void) 1212static void __exit mpc85xx_mc_exit(void)
1207{ 1213{
1208#ifdef CONFIG_FSL_SOC_BOOKE 1214#ifdef CONFIG_FSL_SOC_BOOKE
1209 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1215 u32 pvr = mfspr(SPRN_PVR);
1216
1217 if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
1218 (PVR_VER(pvr) == PVR_VER_E500V2)) {
1219 on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
1220 }
1210#endif 1221#endif
1211#ifdef CONFIG_PCI 1222#ifdef CONFIG_PCI
1212 platform_driver_unregister(&mpc85xx_pci_err_driver); 1223 platform_driver_unregister(&mpc85xx_pci_err_driver);