MPC52XX: Don't touch pipelining for MPC5200B
Subsystems (2)
PATCH 1/1 MPC52XX: Don't touch pipelining for MPC5200B
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.
---
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(-)
arch/powerpc/platforms/52xx/mpc52xx_common.c +2 -1
@@ -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); }
Signature · 2 lines
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry
Quoted 1 line · Wolfram Sang
MPC5200 needs to have pipelining disabled for ATA to work. MPC5200B does =
not.
Quoted 4 lines
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 1/1 MPC52XX: Don't touch pipelining for MPC5200B
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.
---
Hello Arnd,
Quoted 1 line · Arnd Bergmann
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(-)
powerpc/platforms/52xx/mpc52xx_common.c renamed from powerpc/platforms/52xx/mpc52xx_common.c.orig +5 -2
@@ -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); }
Signature · 2 lines
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry
Quoted 5 lines · Wolfram Sang
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 <[email protected]>
Thanks Wolfram, I'll pick this one up.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.