Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c052a22e808fc1f9b78b9a2fe7065f2026815128
Commit:     c052a22e808fc1f9b78b9a2fe7065f2026815128
Parent:     2fb59d623ad85dfdb8ce03a660051743f7361896
Author:     Grant Likely <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 21 10:52:02 2007 -0600
Committer:  Grant Likely <[EMAIL PROTECTED]>
CommitDate: Sun Oct 21 10:52:02 2007 -0600

    [POWERPC] bestcomm: Restrict bus prefetch bugfix to original mpc5200 
silicon.
    
    Only the MPC5200 needs this bug fix.  MPC5200B is okay.
    
    Signed-off-by: Grant Likely <[EMAIL PROTECTED]>
---
 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 568135f..764d997 100644
--- a/include/asm-powerpc/mpc52xx.h
+++ b/include/asm-powerpc/mpc52xx.h
@@ -20,6 +20,11 @@
 
 #include <linux/suspend.h>
 
+/* 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                             */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to