[PATCH] MPC52XX: Don't touch pipelining for MPC5200B

STALE6646d

4 messages, 3 authors, 2008-08-18 · open the first message on its own page

[PATCH] MPC52XX: Don't touch pipelining for MPC5200B

From: Wolfram Sang <hidden>
Date: 2008-08-18 09:31:40

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 <redacted>
---

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

Re: [PATCH] MPC52XX: Don't touch pipelining for MPC5200B

From: Arnd Bergmann <arnd@arndb.de>
Date: 2008-08-18 10:49:49

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 <><

[PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B

From: Wolfram Sang <hidden>
Date: 2008-08-18 14:18:37

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 <redacted>
---
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

Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B

From: Grant Likely <hidden>
Date: 2008-08-18 16:04:40

On Mon, Aug 18, 2008 at 8:18 AM, Wolfram Sang [off-list ref] 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 <redacted>
Thanks Wolfram, I'll pick this one up.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help