* [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
@ 2010-10-14 2:04 Shaohui Xie
2010-10-14 3:23 ` Li Yang-R58472
2010-10-14 6:14 ` Kumar Gala
0 siblings, 2 replies; 6+ messages in thread
From: Shaohui Xie @ 2010-10-14 2:04 UTC (permalink / raw)
To: linuxppc-dev; +Cc: alexandre.bounine, b21989
From: Li Yang <leoli@freescale.com>
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>
Signed-off-by: Shaohui Xie <b21989@freescale.com>
---
arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 4127636..dfff3b7 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -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:
--
1.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
2010-10-14 2:04 [PATCH 2/3] fsl_rio: fix non-standard HID1 register access Shaohui Xie
@ 2010-10-14 3:23 ` Li Yang-R58472
2010-10-14 6:14 ` Kumar Gala
1 sibling, 0 replies; 6+ messages in thread
From: Li Yang-R58472 @ 2010-10-14 3:23 UTC (permalink / raw)
To: Xie Shaohui-B21989, linuxppc-dev; +Cc: alexandre.bounine
>Subject: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
>
>From: Li Yang <leoli@freescale.com>
>
>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>
>Signed-off-by: Shaohui Xie <b21989@freescale.com>
This patch is depending on another patch at
http://patchwork.ozlabs.org/patch/56138/
- Leo
>---
> arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/arch/powerpc/sysdev/fsl_rio.c =
b/arch/powerpc/sysdev/fsl_rio.c
>index 4127636..dfff3b7 100644
>--- a/arch/powerpc/sysdev/fsl_rio.c
>+++ b/arch/powerpc/sysdev/fsl_rio.c
>@@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
2010-10-14 2:04 [PATCH 2/3] fsl_rio: fix non-standard HID1 register access Shaohui Xie
2010-10-14 3:23 ` Li Yang-R58472
@ 2010-10-14 6:14 ` Kumar Gala
2010-10-14 6:17 ` Kumar Gala
2010-10-14 7:10 ` Li Yang-R58472
1 sibling, 2 replies; 6+ messages in thread
From: Kumar Gala @ 2010-10-14 6:14 UTC (permalink / raw)
To: Shaohui Xie; +Cc: alexandre.bounine, linuxppc-dev
On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
> From: Li Yang <leoli@freescale.com>
>=20
> The access to HID1 register is only legitimate for e500 v1/v2 cores.
> Also fixes magic number.
>=20
> Signed-off-by: Li Yang <leoli@freescale.com>
> Signed-off-by: Shaohui Xie <b21989@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>=20
> diff --git a/arch/powerpc/sysdev/fsl_rio.c =
b/arch/powerpc/sysdev/fsl_rio.c
> index 4127636..dfff3b7 100644
> --- a/arch/powerpc/sysdev/fsl_rio.c
> +++ b/arch/powerpc/sysdev/fsl_rio.c
> @@ -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 */
I've never really been happy with this code. We really should set =
HID1_RFXE in cpu_setup_fsl_booke.S instead.
- k=
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
2010-10-14 6:14 ` Kumar Gala
@ 2010-10-14 6:17 ` Kumar Gala
2010-10-14 7:10 ` Li Yang-R58472
1 sibling, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2010-10-14 6:17 UTC (permalink / raw)
To: Kumar Gala; +Cc: alexandre.bounine, linuxppc-dev, Shaohui Xie
On Oct 14, 2010, at 1:14 AM, Kumar Gala wrote:
>=20
> On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
>=20
>> From: Li Yang <leoli@freescale.com>
>>=20
>> The access to HID1 register is only legitimate for e500 v1/v2 cores.
>> Also fixes magic number.
>>=20
>> Signed-off-by: Li Yang <leoli@freescale.com>
>> Signed-off-by: Shaohui Xie <b21989@freescale.com>
>> ---
>> arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
>> 1 files changed, 6 insertions(+), 3 deletions(-)
>>=20
>> diff --git a/arch/powerpc/sysdev/fsl_rio.c =
b/arch/powerpc/sysdev/fsl_rio.c
>> index 4127636..dfff3b7 100644
>> --- a/arch/powerpc/sysdev/fsl_rio.c
>> +++ b/arch/powerpc/sysdev/fsl_rio.c
>> @@ -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 */
>=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=
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
2010-10-14 6:14 ` Kumar Gala
2010-10-14 6:17 ` Kumar Gala
@ 2010-10-14 7:10 ` Li Yang-R58472
2010-10-14 12:57 ` Kumar Gala
1 sibling, 1 reply; 6+ messages in thread
From: Li Yang-R58472 @ 2010-10-14 7:10 UTC (permalink / raw)
To: Kumar Gala, Xie Shaohui-B21989; +Cc: alexandre.bounine, linuxppc-dev
>Subject: Re: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
>
>
>On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
>
>> From: Li Yang <leoli@freescale.com>
>>
>> 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>
>> Signed-off-by: Shaohui Xie <b21989@freescale.com>
>> ---
>> arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
>> 1 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/powerpc/sysdev/fsl_rio.c
>> b/arch/powerpc/sysdev/fsl_rio.c index 4127636..dfff3b7 100644
>> --- a/arch/powerpc/sysdev/fsl_rio.c
>> +++ b/arch/powerpc/sysdev/fsl_rio.c
>> @@ -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 */
>
>I've never really been happy with this code. We really should set
>HID1_RFXE in cpu_setup_fsl_booke.S instead.
But this bit is not recommended to be set unless necessary. And it is =
only required by SRIO for now.
- Leo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] fsl_rio: fix non-standard HID1 register access
2010-10-14 7:10 ` Li Yang-R58472
@ 2010-10-14 12:57 ` Kumar Gala
0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2010-10-14 12:57 UTC (permalink / raw)
To: Li Yang-R58472; +Cc: alexandre.bounine, linuxppc-dev, Xie Shaohui-B21989
On Oct 14, 2010, at 2:10 AM, Li Yang-R58472 wrote:
>> Subject: Re: [PATCH 2/3] fsl_rio: fix non-standard HID1 register =
access
>>=20
>>=20
>> On Oct 13, 2010, at 9:04 PM, Shaohui Xie wrote:
>>=20
>>> From: Li Yang <leoli@freescale.com>
>>>=20
>>> The access to HID1 register is only legitimate for e500 v1/v2 cores.
>>> Also fixes magic number.
>>>=20
>>> Signed-off-by: Li Yang <leoli@freescale.com>
>>> Signed-off-by: Shaohui Xie <b21989@freescale.com>
>>> ---
>>> arch/powerpc/sysdev/fsl_rio.c | 9 ++++++---
>>> 1 files changed, 6 insertions(+), 3 deletions(-)
>>>=20
>>> diff --git a/arch/powerpc/sysdev/fsl_rio.c
>>> b/arch/powerpc/sysdev/fsl_rio.c index 4127636..dfff3b7 100644
>>> --- a/arch/powerpc/sysdev/fsl_rio.c
>>> +++ b/arch/powerpc/sysdev/fsl_rio.c
>>> @@ -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 */
>>=20
>> I've never really been happy with this code. We really should set
>> HID1_RFXE in cpu_setup_fsl_booke.S instead.
>=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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-14 12:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 2:04 [PATCH 2/3] fsl_rio: fix non-standard HID1 register access Shaohui Xie
2010-10-14 3:23 ` Li Yang-R58472
2010-10-14 6:14 ` Kumar Gala
2010-10-14 6:17 ` Kumar Gala
2010-10-14 7:10 ` Li Yang-R58472
2010-10-14 12:57 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox