Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/mpc6xx Printf the 601's HID0.



details:   https://anonhg.NetBSD.org/src/rev/8dfbb08b8a9a
branches:  trunk
changeset: 521837:8dfbb08b8a9a
user:      kleink <kleink%NetBSD.org@localhost>
date:      Wed Feb 06 20:00:48 2002 +0000

description:
Printf the 601's HID0.

diffstat:

 sys/arch/powerpc/mpc6xx/cpu_subr.c |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 8950d61df57e -r 8dfbb08b8a9a sys/arch/powerpc/mpc6xx/cpu_subr.c
--- a/sys/arch/powerpc/mpc6xx/cpu_subr.c        Wed Feb 06 19:59:41 2002 +0000
+++ b/sys/arch/powerpc/mpc6xx/cpu_subr.c        Wed Feb 06 20:00:48 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.5 2001/12/05 05:13:50 chs Exp $ */
+/*     $NetBSD: cpu_subr.c,v 1.6 2002/02/06 20:00:48 kleink Exp $      */
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -42,6 +42,7 @@
 
 #include <uvm/uvm_extern.h>
 #include <powerpc/mpc6xx/hid.h>
+#include <powerpc/mpc6xx/hid_601.h>
 #include <powerpc/spr.h>
 
 static void cpu_config_l2cr(int);
@@ -174,9 +175,18 @@
 #if 1
        {
                char hidbuf[128];
-               bitmask_snprintf(hid0,
-                    vers == MPC7450 ? HID0_7450_BITMASK : HID0_BITMASK,
-                    hidbuf, sizeof hidbuf);
+               char *bitmask;
+               switch (vers) {
+               case MPC601:
+                       bitmask = HID0_601_BITMASK;
+                       break;
+               case MPC7450:
+                       bitmask = HID0_7450_BITMASK;
+                       break;
+               default:
+                       bitmask = HID0_BITMASK;
+               }
+               bitmask_snprintf(hid0, bitmask, hidbuf, sizeof hidbuf);
                printf("%s: HID0 %s\n", self->dv_xname, hidbuf);
        }
 #endif



Home | Main Index | Thread Index | Old Index