* [PATCH] MPC52XX: Don't touch pipelining for MPC5200B
@ 2008-08-18 9:31 Wolfram Sang
2008-08-18 10:49 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2008-08-18 9:31 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]
MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not.
So, for the latter, don't touch the original setting from the bootloader.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
This needs some testing IMHO. Most configs in U-Boot tend to enable pipelining,
which then used to be disabled by the kernel. So, on the one hand, this change
would enable what is originally wanted; on the other hand, systems may run
under a new configuration and need to be checked for regressions. Especially as
there can be puzzling effects, like for one setup here, FEC only works reliably
with pipelining enabled.
arch/powerpc/platforms/52xx/mpc52xx_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: playground/arch/powerpc/platforms/52xx/mpc52xx_common.c
===================================================================
--- playground.orig/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ playground/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -99,12 +99,13 @@
out_be32(&xlb->master_pri_enable, 0xff);
out_be32(&xlb->master_priority, 0x11111111);
+#if defined(CONFIG_PPC_MPC5200_BUGFIX)
/* Disable XLB pipelining
* (cfr errate 292. We could do this only just before ATA PIO
* transaction and re-enable it afterwards ...)
*/
out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS);
-
+#endif
iounmap(xlb);
}
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MPC52XX: Don't touch pipelining for MPC5200B
2008-08-18 9:31 [PATCH] MPC52XX: Don't touch pipelining for MPC5200B Wolfram Sang
@ 2008-08-18 10:49 ` Arnd Bergmann
2008-08-18 14:18 ` [PATCH V2] " Wolfram Sang
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2008-08-18 10:49 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Wolfram Sang
On Monday 18 August 2008, Wolfram Sang wrote:
> MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does =
not.
> So, for the latter, don't touch the original setting from the bootloader.
> +#if defined(CONFIG_PPC_MPC5200_BUGFIX)
> =A0=A0=A0=A0=A0=A0=A0=A0/* Disable XLB pipelining
Please make this a run-time conditional instead of compile-time.
Your current patch is still broken if you want to have a common
kernel for MPC5200 and MPC5200B.
Arnd <><
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
2008-08-18 10:49 ` Arnd Bergmann
@ 2008-08-18 14:18 ` Wolfram Sang
2008-08-18 15:57 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2008-08-18 14:18 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]
MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not.
So, for the latter, don't touch the original setting from the bootloader.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
Hello Arnd,
On Mon, Aug 18, 2008 at 12:49:36PM +0200, Arnd Bergmann wrote:
> Please make this a run-time conditional instead of compile-time.
Like this?
..................................................................
This needs some testing IMHO. Most configs in U-Boot tend to enable pipelining,
which then used to be disabled by the kernel. So, on the one hand, this change
would enable what is originally wanted; on the other hand, systems may run
under a new configuration and need to be checked for regressions. Especially as
there can be puzzling effects, like for one setup here, FEC only works reliably
with pipelining enabled.
arch/powerpc/platforms/52xx/mpc52xx_common.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: arch/powerpc/platforms/52xx/mpc52xx_common.c
===================================================================
--- arch/powerpc/platforms/52xx/mpc52xx_common.c.orig
+++ arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -99,11 +99,14 @@
out_be32(&xlb->master_pri_enable, 0xff);
out_be32(&xlb->master_priority, 0x11111111);
- /* Disable XLB pipelining
+ /*
+ * Disable XLB pipelining
* (cfr errate 292. We could do this only just before ATA PIO
* transaction and re-enable it afterwards ...)
+ * Not needed on MPC5200B.
*/
- out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS);
+ if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) == MPC5200_SVR)
+ out_be32(&xlb->config, in_be32(&xlb->config) | MPC52xx_XLB_CFG_PLDIS);
iounmap(xlb);
}
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
2008-08-18 14:18 ` [PATCH V2] " Wolfram Sang
@ 2008-08-18 15:57 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2008-08-18 15:57 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Arnd Bergmann, linuxppc-embedded
On Mon, Aug 18, 2008 at 8:18 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
>
> MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does not.
> So, for the latter, don't touch the original setting from the bootloader.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Thanks Wolfram, I'll pick this one up.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-18 16:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 9:31 [PATCH] MPC52XX: Don't touch pipelining for MPC5200B Wolfram Sang
2008-08-18 10:49 ` Arnd Bergmann
2008-08-18 14:18 ` [PATCH V2] " Wolfram Sang
2008-08-18 15:57 ` Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).