Patchwork [v2,4/4] fsl_rio: fix non-standard HID1 register access

login
register
mail settings
Submitter Yang Li
Date June 18, 2010, 6:24 a.m.
Message ID <1276842263-4186-4-git-send-email-leoli@freescale.com>
Download mbox | patch
Permalink /patch/56137/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Yang Li - June 18, 2010, 6:24 a.m.
The access to HID1 register is only legitimate for e500 v1/v2 cores.
Also fixes magic number.

Signed-off-by: Li Yang <leoli@freescale.com>
---
 arch/powerpc/sysdev/fsl_rio.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

Patch

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 954a754..aa9a21d 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1523,9 +1523,12 @@  int fsl_rio_setup(struct of_device *dev)
 #ifdef CONFIG_E500
 	saved_mcheck_exception = ppc_md.machine_check_exception;
 	ppc_md.machine_check_exception = fsl_rio_mcheck_exception;
-#endif
-	/* Ensure that RFXE is set */
-	mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000));
+	
+#ifndef CONFIG_PPC_E500MC
+	/* Ensure that RFXE is set on e500 v1/v2 */
+	mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | HID1_RFXE));
+#endif /* !PPC_E500MC */
+#endif /* E500 */
 
 	return 0;
 err: