initial support of vr4131 bcu.
This commit is contained in:
parent
a18f21f23e
commit
9545f31823
@ -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.
|
* Copyright (c) 1999-2001 SATO Kazumi. All rights reserved.
|
||||||
@ -130,7 +130,7 @@ vrbcu_dump_regs()
|
|||||||
cpuid = vrbcu_vrip_getcpuid();
|
cpuid = vrbcu_vrip_getcpuid();
|
||||||
#if !defined(ONLY_VR4181) && !defined(ONLY_VR4102)
|
#if !defined(ONLY_VR4181) && !defined(ONLY_VR4102)
|
||||||
if (cpuid != BCUREVID_FIXRID_4181
|
if (cpuid != BCUREVID_FIXRID_4181
|
||||||
&& cpuid <= BCUREVID_RID_4122
|
&& cpuid <= BCUREVID_RID_4131
|
||||||
&& cpuid >= BCUREVID_RID_4111) {
|
&& cpuid >= BCUREVID_RID_4111) {
|
||||||
spdreg = vrbcu_read(sc, BCUCLKSPEED_REG_W);
|
spdreg = vrbcu_read(sc, BCUCLKSPEED_REG_W);
|
||||||
#ifdef VRBCUDEBUG
|
#ifdef VRBCUDEBUG
|
||||||
@ -201,8 +201,9 @@ vrbcu_dump_regs()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* VR4121 */
|
#endif /* VR4121 */
|
||||||
#if defined VR4122
|
#if defined VR4122 || defined VR4131
|
||||||
case BCUREVID_RID_4122:
|
case BCUREVID_RID_4122:
|
||||||
|
case BCUREVID_RID_4131:
|
||||||
{
|
{
|
||||||
int vtdiv;
|
int vtdiv;
|
||||||
|
|
||||||
@ -217,7 +218,7 @@ vrbcu_dump_regs()
|
|||||||
BCUCLKSPEED_TDIVSHFT) ? 4 : 2);
|
BCUCLKSPEED_TDIVSHFT) ? 4 : 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* VR4122 */
|
#endif /* VR4122 || VR4131 */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -247,7 +248,7 @@ vrbcu_dump_regs()
|
|||||||
bitdisp16(reg);
|
bitdisp16(reg);
|
||||||
}
|
}
|
||||||
#endif /* !defined ONLY_VR4181 */
|
#endif /* !defined ONLY_VR4181 */
|
||||||
#if !defined(ONLY_VR4181) || !defined(ONLY_VR4122)
|
#if !defined(ONLY_VR4181) || !defined(ONLY_VR4122_4131)
|
||||||
if (cpuid != BCUREVID_FIXRID_4181
|
if (cpuid != BCUREVID_FIXRID_4181
|
||||||
&& cpuid <= BCUREVID_RID_4121
|
&& cpuid <= BCUREVID_RID_4121
|
||||||
&& cpuid >= BCUREVID_RID_4102) {
|
&& cpuid >= BCUREVID_RID_4102) {
|
||||||
@ -262,10 +263,10 @@ vrbcu_dump_regs()
|
|||||||
reg = vrbcu_read(sc, BCUREFCOUNT_REG_W);
|
reg = vrbcu_read(sc, BCUREFCOUNT_REG_W);
|
||||||
printf("vrbcu: RFCOUNT %x\n", reg);
|
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 !defined(ONLY_VR4181)
|
||||||
if (cpuid != BCUREVID_FIXRID_4181
|
if (cpuid != BCUREVID_FIXRID_4181
|
||||||
&& cpuid <= BCUREVID_RID_4122
|
&& cpuid <= BCUREVID_RID_4131
|
||||||
&& cpuid >= BCUREVID_RID_4111)
|
&& cpuid >= BCUREVID_RID_4111)
|
||||||
{
|
{
|
||||||
reg = vrbcu_read(sc, BCUCNT3_REG_W);
|
reg = vrbcu_read(sc, BCUCNT3_REG_W);
|
||||||
@ -283,7 +284,7 @@ static char *cpuname[] = {
|
|||||||
"VR4111", /* 2 */
|
"VR4111", /* 2 */
|
||||||
"VR4121", /* 3 */
|
"VR4121", /* 3 */
|
||||||
"VR4122", /* 4 */
|
"VR4122", /* 4 */
|
||||||
"UNKNOWN",
|
"VR4131", /* 5 */
|
||||||
"UNKNOWN",
|
"UNKNOWN",
|
||||||
"UNKNOWN",
|
"UNKNOWN",
|
||||||
"UNKNOWN",
|
"UNKNOWN",
|
||||||
@ -412,6 +413,11 @@ vrbcu_vrip_getcpuclock(void)
|
|||||||
/* branch delay is 2 clock; 3 clock/loop */
|
/* branch delay is 2 clock; 3 clock/loop */
|
||||||
cpuspeed = (cpuclock / 3 + MHZ / 2) / MHZ;
|
cpuspeed = (cpuclock / 3 + MHZ / 2) / MHZ;
|
||||||
break;
|
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:
|
default:
|
||||||
panic("unknown CPU type %d\n", cpuid);
|
panic("unknown CPU type %d\n", cpuid);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user