aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/fsl_rio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/fsl_rio.c')
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 6425abe5b7db..3017532319c8 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -240,12 +240,13 @@ struct rio_priv {
240 240
241static void __iomem *rio_regs_win; 241static void __iomem *rio_regs_win;
242 242
243#ifdef CONFIG_E500
243static int (*saved_mcheck_exception)(struct pt_regs *regs); 244static int (*saved_mcheck_exception)(struct pt_regs *regs);
244 245
245static int fsl_rio_mcheck_exception(struct pt_regs *regs) 246static int fsl_rio_mcheck_exception(struct pt_regs *regs)
246{ 247{
247 const struct exception_table_entry *entry = NULL; 248 const struct exception_table_entry *entry = NULL;
248 unsigned long reason = (mfspr(SPRN_MCSR) & MCSR_MASK); 249 unsigned long reason = mfspr(SPRN_MCSR);
249 250
250 if (reason & MCSR_BUS_RBERR) { 251 if (reason & MCSR_BUS_RBERR) {
251 reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); 252 reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR));
@@ -269,6 +270,7 @@ static int fsl_rio_mcheck_exception(struct pt_regs *regs)
269 else 270 else
270 return cur_cpu_spec->machine_check(regs); 271 return cur_cpu_spec->machine_check(regs);
271} 272}
273#endif
272 274
273/** 275/**
274 * fsl_rio_doorbell_send - Send a MPC85xx doorbell message 276 * fsl_rio_doorbell_send - Send a MPC85xx doorbell message
@@ -1517,8 +1519,10 @@ int fsl_rio_setup(struct platform_device *dev)
1517 fsl_rio_doorbell_init(port); 1519 fsl_rio_doorbell_init(port);
1518 fsl_rio_port_write_init(port); 1520 fsl_rio_port_write_init(port);
1519 1521
1522#ifdef CONFIG_E500
1520 saved_mcheck_exception = ppc_md.machine_check_exception; 1523 saved_mcheck_exception = ppc_md.machine_check_exception;
1521 ppc_md.machine_check_exception = fsl_rio_mcheck_exception; 1524 ppc_md.machine_check_exception = fsl_rio_mcheck_exception;
1525#endif
1522 /* Ensure that RFXE is set */ 1526 /* Ensure that RFXE is set */
1523 mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); 1527 mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000));
1524 1528