fsl_rio: fix non-standard HID1 register access
PATCH 2/3 fsl_rio: fix non-standard HID1 register access
From: Li Yang <[email protected]>
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
--- arch/powerpc/sysdev/fsl_rio.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
arch/powerpc/sysdev/fsl_rio.c +6 -3
@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_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:
Signature · 1 line
1.6.4
Quoted 9 lines
Subject: [PATCH 2/3]
fsl_rio: fix non-standard HID1 register accessFrom: Li Yang <[email protected]>
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
Signed-off-by Li Yang <[email protected]>Signed-off-by Shaohui Xie <[email protected]>
This patch is depending on another patch at
http://patchwork.ozlabs.org/patch/56138/
- Leo
=
Quoted 5 lines
---
arch/powerpc/sysdev/fsl_rio.c| 9 ++++++---1 files changed, 6 insertions(+), 3 deletions(-)= renamed from arch/powerpc/sysdev/fsl_rio.c +0
-0
b/arch/powerpc/sysdev/fsl_rio.c
Quoted 21 lines
index 4127636..dfff3b7 100644
arch/powerpc/sysdev/fsl_rio.c +6
-3@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device *dev)#ifdef CONFIG_E500 saved_mcheck_exception =3D ppc_md.machine_check_exception; ppc_md.machine_check_exception =3D 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:
--
1.6.4
=
Quoted 12 lines · Shaohui Xie
From: Li Yang <[email protected]>
=20
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
=20Signed-off-by Li Yang <[email protected]>Signed-off-by Shaohui Xie <[email protected]>---
arch/powerpc/sysdev/fsl_rio.c| 9 ++++++---1 files changed, 6 insertions(+), 3 deletions(-)=20
= renamed from arch/powerpc/sysdev/fsl_rio.c +0
-0
b/arch/powerpc/sysdev/fsl_rio.c
Quoted 6 lines
index 4127636..dfff3b7 100644
arch/powerpc/sysdev/fsl_rio.c +0
-0@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device *dev)#ifdef CONFIG_E500 saved_mcheck_exception =3D ppc_md.machine_check_exception;
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device *dev) · line 1545
Quoted 10 lines
arch/powerpc/sysdev/fsl_rio.c +6
-3ppc_md.machine_check_exception =3D 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 */
I've never really been happy with this code. We really should set = HID1_RFXE in cpu_setup_fsl_booke.S instead.
- k=
Quoted 15 lines · Kumar Gala
=20
On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
=20=
Quoted 12 lines
From: Li Yang <[email protected]>
=20
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
=20Signed-off-by Li Yang <[email protected]>Signed-off-by Shaohui Xie <[email protected]>---
arch/powerpc/sysdev/fsl_rio.c| 9 ++++++---1 files changed, 6 insertions(+), 3 deletions(-)=20
= renamed from arch/powerpc/sysdev/fsl_rio.c +0
-0
b/arch/powerpc/sysdev/fsl_rio.c
Quoted 10 lines
Quoted 10 lines
index 4127636..dfff3b7 100644
arch/powerpc/sysdev/fsl_rio.c +0
-3@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device *dev)#ifdef CONFIG_E500 saved_mcheck_exception =3D ppc_md.machine_check_exception; ppc_md.machine_check_exception =3D fsl_rio_mcheck_exception; -#endif -/* Ensure that RFXE is set */ -mtspr (SPRN_HID1 , (mfspr (SPRN_HID1 ) |0x20000 ));
Quoted 8 lines
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device *dev) · line 1545
Quoted 6 lines
arch/powerpc/sysdev/fsl_rio.c +6
-0+ +#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 */ =20
I've never really been happy with this code. We really should set =
HID1_RFXE in cpu_setup_fsl_booke.S instead.
We should also change this so we just call fsl_rio_mcheck_exception() = from machine_check_e500 & machine_check_e500mc and get rid of this = ppc_md.machine_check_exception manipulation.
- k=
Quoted 26 lines
Subject: Re: [PATCH 2/3]
fsl_rio: fix non-standard HID1 register accessQuoted 21 lines · Shaohui Xie
From: Li Yang <[email protected]>
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
Signed-off-by Li Yang <[email protected]>Signed-off-by Shaohui Xie <[email protected]>---
arch/powerpc/sysdev/fsl_rio.c| 9 ++++++---1 files changed, 6 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/arch/powerpc/sysdev/fsl_rio.cindex 4127636..dfff3b7 100644arch/powerpc/sysdev/fsl_rio.c +0
-2@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device *dev)#ifdef CONFIG_E500 saved_mcheck_exception =3D ppc_md.machine_check_exception; ppc_md.machine_check_exception =3D fsl_rio_mcheck_exception; -#endif -/* Ensure that RFXE is set */ -mtspr (SPRN_HID1 , (mfspr (SPRN_HID1 ) |0x20000 ));
Quoted 8 lines
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device *dev)
Quoted 5 lines
arch/powerpc/sysdev/fsl_rio.c +5
-0+ +#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 */ I've never really been happy with this code. We really should set
HID1_RFXEincpu_setup_fsl_booke.Sinstead.
But this bit is not recommended to be set unless necessary. And it is = only required by SRIO for now.
- Leo
Quoted 1 line · On Oct 14, 2010, at 2:10 AM, Li Yang-R58472 wrote:
Quoted 1 line
Subject: Re: [PATCH 2/3]
fsl_rio: fix non-standard HID1 register =
access
Quoted 4 lines
Quoted 4 lines
=20
=20
On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
=20
Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
From: Li Yang <[email protected]>
=20
The access to HID1 register is only legitimate for e500 v1/v2 cores. Also fixes magic number.
=20Signed-off-by Li Yang <[email protected]>Signed-off-by Shaohui Xie <[email protected]>---
Quoted 8 lines
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device =
Quoted 8 lines
arch/powerpc/sysdev/fsl_rio.c| 9 ++++++---1 files changed, 6 insertions(+), 3 deletions(-)=20
(quoted diff) +0
-0
b/arch/powerpc/sysdev/fsl_rio.cindex 4127636..dfff3b7 100644arch/powerpc/sysdev/fsl_rio.c +0
-0@@ -1537,9 +1537,12 @@ int fsl_rio_setup(struct platform_device =
*dev)
Quoted 3 lines
Quoted 3 lines
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device = · line 1539
Quoted 3 lines
arch/powerpc/sysdev/fsl_rio.c +0
-0#ifdef CONFIG_E500 saved_mcheck_exception =3D ppc_md.machine_check_exception; ppc_md.machine_check_exception =3D fsl_rio_mcheck_exception; =
-#endif
Quoted 10 lines
Quoted 10 lines
arch/powerpc/sysdev/fsl_rio.c int fsl_rio_setup(struct platform_device *dev)
Quoted 7 lines
arch/powerpc/sysdev/fsl_rio.c +5
-2-/* 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 */ =20
I've never really been happy with this code. We really should setHID1_RFXEincpu_setup_fsl_booke.Sinstead.
Quoted 2 lines
=20
But this bit is not recommended to be set unless necessary. And it is =
only required by SRIO for now.
Than wrap it in a CONFIG_RAPIDIO in cpu_setup_fsl_booke.S
- k