linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread

* Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
@ 2008-08-23  3:11 roger blofeld
  2008-08-25 15:36 ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: roger blofeld @ 2008-08-23  3:11 UTC (permalink / raw)
  To: Wolfram Sang, Arnd Bergmann; +Cc: linuxppc-embedded

----- Original Message ----

> From: Wolfram Sang <w.sang@pengutronix.de>
> To: Arnd Bergmann <arnd@arndb.de>
> Cc: linuxppc-embedded@ozlabs.org
> Sent: Monday, August 18, 2008 9:18:31 AM
> Subject: [PATCH V2] 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.
> 
> Signed-off-by: Wolfram Sang 
> ---
> 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


Hi
 Since this bug is ATA specific, shouldn't this code be conditioned by CONFIG_IDE ?

Thanks
-roger


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
  2008-08-23  3:11 [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B roger blofeld
@ 2008-08-25 15:36 ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2008-08-25 15:36 UTC (permalink / raw)
  To: roger blofeld; +Cc: Wolfram Sang, Arnd Bergmann, linuxppc-embedded

roger blofeld wrote:
> Hi
>  Since this bug is ATA specific, shouldn't this code be conditioned by CONFIG_IDE ?

And then what happens if IDE is built as a module?

-Scott

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
@ 2008-08-27 19:07 roger blofeld
  0 siblings, 0 replies; 5+ messages in thread
From: roger blofeld @ 2008-08-27 19:07 UTC (permalink / raw)
  To: Scott Wood; +Cc: Wolfram Sang, Arnd Bergmann, linuxppc-embedded



> From: Scott Wood <scottwood@freescale.com>
> To: roger blofeld <blofeldus@yahoo.com>
> Cc: Wolfram Sang <w.sang@pengutronix.de>; Arnd Bergmann <arnd@arndb.de>; linuxppc-embedded@ozlabs.org
> Sent: Monday, August 25, 2008 10:36:48 AM
> Subject: Re: [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B
> 
> roger blofeld wrote:
> > Hi
> >  Since this bug is ATA specific, shouldn't this code be conditioned by 
> CONFIG_IDE ?
> 
> And then what happens if IDE is built as a module?
> 
> -Scott

Good point. Still it seems unfortunate to slow everything down when only ATA requires the fix. I'll just continue to disable this code on my board which has no IDE.

Thanks
-rb



      

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-27 19:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-23  3:11 [PATCH V2] MPC52XX: Don't touch pipelining for MPC5200B roger blofeld
2008-08-25 15:36 ` Scott Wood
  -- strict thread matches above, loose matches on Subject: below --
2008-08-27 19:07 roger blofeld
2008-08-18  9:31 [PATCH] " 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).