Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea Add more support for MPC7447A/MPC7448.



details:   https://anonhg.NetBSD.org/src/rev/f60dff233372
branches:  trunk
changeset: 573162:f60dff233372
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jan 21 00:58:34 2005 +0000

description:
Add more support for MPC7447A/MPC7448.

diffstat:

 sys/arch/powerpc/oea/cpu_subr.c |  39 ++++++++++++++++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 5 deletions(-)

diffs (116 lines):

diff -r 827cb5b1833d -r f60dff233372 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c   Fri Jan 21 00:46:23 2005 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c   Fri Jan 21 00:58:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.21 2005/01/20 21:28:47 matt Exp $       */
+/*     $NetBSD: cpu_subr.c,v 1.22 2005/01/21 00:58:34 matt Exp $       */
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.21 2005/01/20 21:28:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.22 2005/01/21 00:58:34 matt Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_multiprocessor.h"
@@ -86,6 +86,15 @@
        { 0 }
 };
 
+static const struct fmttab cpu_7448_l2cr_formats[] = {
+       { L2CR_L2E, 0, " disabled" },
+       { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO, " data-only" },
+       { L2CR_L2DO|L2CR_L2IO, L2CR_L2IO, " instruction-only" },
+       { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO|L2CR_L2IO, " locked" },
+       { L2CR_L2E, ~0, " 1MB L2 cache" },
+       { 0 }
+};
+
 static const struct fmttab cpu_7457_l2cr_formats[] = {
        { L2CR_L2E, 0, " disabled" },
        { L2CR_L2DO|L2CR_L2IO, L2CR_L2DO, " data-only" },
@@ -191,6 +200,7 @@
        { "7455",       MPC7455,        REVFMT_MAJMIN },
        { "7457",       MPC7457,        REVFMT_MAJMIN },
        { "7447A",      MPC7447A,       REVFMT_MAJMIN },
+       { "7448",       MPC7448,        REVFMT_MAJMIN },
        { "8240",       MPC8240,        REVFMT_MAJMIN },
        { "",           0,              REVFMT_HEX }
 };
@@ -247,6 +257,8 @@
        case IBM750FX:
        case MPC601:
        case MPC750:
+       case MPC7447A:
+       case MPC7448:
        case MPC7450:
        case MPC7455:
        case MPC7457:
@@ -330,6 +342,8 @@
                case MPC604ev:
                case MPC7400:
                case MPC7410:
+               case MPC7447A:
+               case MPC7448:
                case MPC7450:
                case MPC7455:
                case MPC7457:
@@ -398,6 +412,8 @@
                powersave = 1;
                break;
 
+       case MPC7447A:
+       case MPC7448:
        case MPC7457:
        case MPC7455:
        case MPC7450:
@@ -409,7 +425,7 @@
                        hid0 &= ~HID0_BTIC;
                /* Select NAP mode. */
                hid0 &= ~(HID0_HIGH_BAT_EN | HID0_SLEEP);
-               hid0 |= HID0_NAP | HID0_DPM;
+               hid0 |= HID0_NAP | HID0_DPM /* | HID0_XBSEN */;
                powersave = 1;
                break;
 
@@ -445,6 +461,7 @@
        }
 
        mtspr(SPR_HID0, hid0);
+       __asm __volatile("sync;isync");
 
        switch (vers) {
        case MPC601:
@@ -473,6 +490,8 @@
        case IBM750FX:
        case MPC7400:
        case MPC7410:
+       case MPC7447A:
+       case MPC7448:
        case MPC7450:
        case MPC7455:
        case MPC7457:
@@ -764,8 +783,18 @@
        }
        
        aprint_normal(",");
-       cpu_fmttab_print(vers == MPC7457
-           ? cpu_7457_l2cr_formats : cpu_7450_l2cr_formats, l2cr);
+       switch (vers) {
+       case MPC7447A:
+       case MPC7457:
+               cpu_fmttab_print(cpu_7457_l2cr_formats, l2cr);
+               return;
+       case MPC7448:
+               cpu_fmttab_print(cpu_7448_l2cr_formats, l2cr);
+               return;
+       default:
+               cpu_fmttab_print(cpu_7450_l2cr_formats, l2cr);
+               break;
+       }
 
        l3cr = mfspr(SPR_L3CR);
 



Home | Main Index | Thread Index | Old Index