linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
@ 2007-10-17 16:36 Grant Likely
  2007-10-17 16:55 ` Sven Luther
  2007-10-19 11:29 ` Domen Puncer
  0 siblings, 2 replies; 8+ messages in thread
From: Grant Likely @ 2007-10-17 16:36 UTC (permalink / raw)
  To: Sven Luther, domen.puncer, linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>

Only the MPC5200 needs this bug fix.  MPC5200B is okay.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

Sven, Domen;

Can you please test this patch?

Thanks,
g.

 arch/powerpc/sysdev/bestcomm/bestcomm.c |    9 ++++++---
 include/asm-powerpc/mpc52xx.h           |    5 +++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 48492a8..740ad73 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -269,6 +269,7 @@ bcom_engine_init(void)
 	int task;
 	phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa;
 	unsigned int tdt_size, ctx_size, var_size, fdt_size;
+	u16 regval;
 
 	/* Allocate & clear SRAM zones for FDT, TDTs, contexts and vars/incs */
 	tdt_size = BCOM_MAX_TASKS * sizeof(struct bcom_tdt);
@@ -319,9 +320,11 @@ bcom_engine_init(void)
 	/* Init 'always' initiator */
 	out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_ALWAYS], BCOM_IPR_ALWAYS);
 
-	/* Disable COMM Bus Prefetch, apparently it's not reliable yet */
-	/* FIXME: This should be done on 5200 and not 5200B ... */
-	out_be16(&bcom_eng->regs->PtdCntrl, in_be16(&bcom_eng->regs->PtdCntrl) | 1);
+	/* Disable COMM Bus Prefetch on the original 5200; it's broken */
+	if ((mfspr(SPRN_SVR) & MPC5200_SVR_MASK) == MPC5200_SVR) {
+		regval = in_be16(&bcom_eng->regs->PtdCntrl);
+		out_be16(&bcom_eng->regs->PtdCntrl,  regval | 1);
+	}
 
 	/* Init lock */
 	spin_lock_init(&bcom_eng->lock);
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h
index 24751df..25b2e55 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -18,6 +18,11 @@
 #include <asm/prom.h>
 #endif /* __ASSEMBLY__ */
 
+/* Variants of the 5200(B) */
+#define MPC5200_SVR		0x80110010
+#define MPC5200_SVR_MASK	0xfffffff0
+#define MPC5200B_SVR		0x80110020
+#define MPC5200B_SVR_MASK	0xfffffff0
 
 /* ======================================================================== */
 /* Structures mapping of some unit register set                             */

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-17 16:36 [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon Grant Likely
@ 2007-10-17 16:55 ` Sven Luther
  2007-10-19 11:29 ` Domen Puncer
  1 sibling, 0 replies; 8+ messages in thread
From: Sven Luther @ 2007-10-17 16:55 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, domen.puncer

On Wed, Oct 17, 2007 at 10:36:27AM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> 
> Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Sven, Domen;
> 
> Can you please test this patch?

I will test it tomorrow. For some obscure reason, my efika refuses to
get the console=ttyPSC0 appended, so i have a hard time testing it.

Friendly,

Sven Luther

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-17 16:36 [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon Grant Likely
  2007-10-17 16:55 ` Sven Luther
@ 2007-10-19 11:29 ` Domen Puncer
  2007-10-19 13:09   ` Grant Likely
  1 sibling, 1 reply; 8+ messages in thread
From: Domen Puncer @ 2007-10-19 11:29 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

On 17/10/07 10:36 -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> 
> Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Sven, Domen;
> 
> Can you please test this patch?

I found no obvious problems with it on Efika (mpc5200b)


	Domen

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-19 11:29 ` Domen Puncer
@ 2007-10-19 13:09   ` Grant Likely
  2007-10-19 15:35     ` Sven Luther
  2007-10-19 23:58     ` Matt Sealey
  0 siblings, 2 replies; 8+ messages in thread
From: Grant Likely @ 2007-10-19 13:09 UTC (permalink / raw)
  To: Domen Puncer; +Cc: linuxppc-dev

On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> On 17/10/07 10:36 -0600, Grant Likely wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> >
> > Sven, Domen;
> >
> > Can you please test this patch?
>
> I found no obvious problems with it on Efika (mpc5200b)

Cool, I'll add it to my list of patches for Paulus to pull

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-19 13:09   ` Grant Likely
@ 2007-10-19 15:35     ` Sven Luther
  2007-10-19 15:43       ` Grant Likely
  2007-10-19 23:58     ` Matt Sealey
  1 sibling, 1 reply; 8+ messages in thread
From: Sven Luther @ 2007-10-19 15:35 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Domen Puncer

On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > From: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> > >
> > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > ---
> > >
> > > Sven, Domen;
> > >
> > > Can you please test this patch?
> >
> > I found no obvious problems with it on Efika (mpc5200b)
> 
> Cool, I'll add it to my list of patches for Paulus to pull

Sorry, i have not had time to test, but there is a problem with the
userland serial console i want to investigate. At the latest i will test
this on monday.

Friendly,

Sven Luther

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-19 15:35     ` Sven Luther
@ 2007-10-19 15:43       ` Grant Likely
  2007-10-19 15:44         ` Sven Luther
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Likely @ 2007-10-19 15:43 UTC (permalink / raw)
  To: Sven Luther; +Cc: linuxppc-dev, Domen Puncer

On 10/19/07, Sven Luther <sven@powerlinux.fr> wrote:
> On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> > On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > > From: Grant Likely <grant.likely@secretlab.ca>
> > > >
> > > > Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> > > >
> > > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > > ---
> > > >
> > > > Sven, Domen;
> > > >
> > > > Can you please test this patch?
> > >
> > > I found no obvious problems with it on Efika (mpc5200b)
> >
> > Cool, I'll add it to my list of patches for Paulus to pull
>
> Sorry, i have not had time to test, but there is a problem with the
> userland serial console i want to investigate. At the latest i will test
> this on monday.

Your userland serial problems are unrelated to this patch though, right?

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-19 15:43       ` Grant Likely
@ 2007-10-19 15:44         ` Sven Luther
  0 siblings, 0 replies; 8+ messages in thread
From: Sven Luther @ 2007-10-19 15:44 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Domen Puncer

On Fri, Oct 19, 2007 at 09:43:38AM -0600, Grant Likely wrote:
> On 10/19/07, Sven Luther <sven@powerlinux.fr> wrote:
> > On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> > > On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > > > From: Grant Likely <grant.likely@secretlab.ca>
> > > > >
> > > > > Only the MPC5200 needs this bug fix.  MPC5200B is okay.
> > > > >
> > > > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > > > ---
> > > > >
> > > > > Sven, Domen;
> > > > >
> > > > > Can you please test this patch?
> > > >
> > > > I found no obvious problems with it on Efika (mpc5200b)
> > >
> > > Cool, I'll add it to my list of patches for Paulus to pull
> >
> > Sorry, i have not had time to test, but there is a problem with the
> > userland serial console i want to investigate. At the latest i will test
> > this on monday.
> 
> Your userland serial problems are unrelated to this patch though, right?

Most definitively, sorry for the confusion.

Friendly,

Sven Luther

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

* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
  2007-10-19 13:09   ` Grant Likely
  2007-10-19 15:35     ` Sven Luther
@ 2007-10-19 23:58     ` Matt Sealey
  1 sibling, 0 replies; 8+ messages in thread
From: Matt Sealey @ 2007-10-19 23:58 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Domen Puncer


Grant Likely wrote:
> On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
>> On 17/10/07 10:36 -0600, Grant Likely wrote:
>>> From: Grant Likely <grant.likely@secretlab.ca>
>>>
>>> Only the MPC5200 needs this bug fix.  MPC5200B is okay.
>>>
>>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>>> ---
>>>
>>> Sven, Domen;
>>>
>>> Can you please test this patch?
>> I found no obvious problems with it on Efika (mpc5200b)
> 
> Cool, I'll add it to my list of patches for Paulus to pull

See now that wasn't so hard was it? :D

You earned a cookie :D

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations

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

end of thread, other threads:[~2007-10-19 23:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 16:36 [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon Grant Likely
2007-10-17 16:55 ` Sven Luther
2007-10-19 11:29 ` Domen Puncer
2007-10-19 13:09   ` Grant Likely
2007-10-19 15:35     ` Sven Luther
2007-10-19 15:43       ` Grant Likely
2007-10-19 15:44         ` Sven Luther
2007-10-19 23:58     ` Matt Sealey

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