Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips/vr initial support of vr4131 bcu.



details:   https://anonhg.NetBSD.org/src/rev/b0996cf620b9
branches:  trunk
changeset: 514648:b0996cf620b9
user:      sato <sato%NetBSD.org@localhost>
date:      Fri Sep 07 16:06:03 2001 +0000

description:
initial support of vr4131 bcu.

diffstat:

 sys/arch/hpcmips/vr/bcu_vrip.c |  22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r 76d29745ff47 -r b0996cf620b9 sys/arch/hpcmips/vr/bcu_vrip.c
--- a/sys/arch/hpcmips/vr/bcu_vrip.c    Fri Sep 07 16:04:03 2001 +0000
+++ b/sys/arch/hpcmips/vr/bcu_vrip.c    Fri Sep 07 16:06:03 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcu_vrip.c,v 1.10 2001/05/17 13:10:46 enami Exp $      */
+/*     $NetBSD: bcu_vrip.c,v 1.11 2001/09/07 16:06:03 sato Exp $       */
 
 /*-
  * Copyright (c) 1999-2001 SATO Kazumi. All rights reserved.
@@ -130,7 +130,7 @@
        cpuid = vrbcu_vrip_getcpuid();
 #if !defined(ONLY_VR4181) && !defined(ONLY_VR4102)
        if (cpuid != BCUREVID_FIXRID_4181 
-               && cpuid <= BCUREVID_RID_4122
+               && cpuid <= BCUREVID_RID_4131
                && cpuid >= BCUREVID_RID_4111) {
                spdreg = vrbcu_read(sc, BCUCLKSPEED_REG_W);
 #ifdef VRBCUDEBUG
@@ -201,8 +201,9 @@
                }
                break;
 #endif /* VR4121 */
-#if defined VR4122
+#if defined VR4122 || defined VR4131
        case BCUREVID_RID_4122:
+       case BCUREVID_RID_4131:
                {
                        int vtdiv;
 
@@ -217,7 +218,7 @@
                                BCUCLKSPEED_TDIVSHFT) ? 4 : 2);
                }
                break;
-#endif /* VR4122 */
+#endif /* VR4122 || VR4131 */
        default:
                break;
        }
@@ -247,7 +248,7 @@
                bitdisp16(reg);
        }
 #endif /* !defined ONLY_VR4181 */
-#if !defined(ONLY_VR4181) || !defined(ONLY_VR4122)
+#if !defined(ONLY_VR4181) || !defined(ONLY_VR4122_4131)
        if (cpuid != BCUREVID_FIXRID_4181
                && cpuid <= BCUREVID_RID_4121
                && cpuid >= BCUREVID_RID_4102) {
@@ -262,10 +263,10 @@
                reg = vrbcu_read(sc, BCUREFCOUNT_REG_W);
                printf("vrbcu: RFCOUNT %x\n",  reg);
        }
-#endif /* !defined(ONLY_VR4181) || !defined(ONLY_VR4122) */
+#endif /* !defined(ONLY_VR4181) || !defined(ONLY_VR4122_4131) */
 #if !defined(ONLY_VR4181)
        if (cpuid != BCUREVID_FIXRID_4181 
-               && cpuid <= BCUREVID_RID_4122
+               && cpuid <= BCUREVID_RID_4131
                && cpuid >= BCUREVID_RID_4111)
        {
                reg = vrbcu_read(sc, BCUCNT3_REG_W);
@@ -283,7 +284,7 @@
        "VR4111",       /* 2 */
        "VR4121",       /* 3 */
        "VR4122",       /* 4 */
-       "UNKNOWN",
+       "VR4131",       /* 5 */
        "UNKNOWN",
        "UNKNOWN",
        "UNKNOWN",
@@ -412,6 +413,11 @@
                /* branch delay is 2 clock; 3 clock/loop */
                cpuspeed = (cpuclock / 3 + MHZ / 2) / MHZ;
                break;
+       case BCUREVID_RID_4131:
+               cpuclock = CLKX / clksp * 98;
+               /* branch delay is 2 clock; 3 clock/loop */
+               cpuspeed = (cpuclock / 3 + MHZ / 2) / MHZ;
+               break;
        default:
                panic("unknown CPU type %d\n", cpuid);
                break;



Home | Main Index | Thread Index | Old Index