Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc enable powersave mode on 7450 and family.
details: https://anonhg.NetBSD.org/src/rev/7ad44c43d5fd
branches: trunk
changeset: 572728:7ad44c43d5fd
user: chs <chs%NetBSD.org@localhost>
date: Tue Jan 11 02:09:54 2005 +0000
description:
enable powersave mode on 7450 and family.
also, the HID0_DOZE bit in this context doesn't mean "doze",
it's actually "enable extra BATs". add an alias for this bit
and use it as appropriate.
diffstat:
sys/arch/powerpc/include/oea/hid.h | 7 ++++---
sys/arch/powerpc/oea/cpu_subr.c | 8 ++++----
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (65 lines):
diff -r 000a88208124 -r 7ad44c43d5fd sys/arch/powerpc/include/oea/hid.h
--- a/sys/arch/powerpc/include/oea/hid.h Tue Jan 11 02:04:01 2005 +0000
+++ b/sys/arch/powerpc/include/oea/hid.h Tue Jan 11 02:09:54 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hid.h,v 1.3 2004/02/13 11:36:16 wiz Exp $ */
+/* $NetBSD: hid.h,v 1.4 2005/01/11 02:09:54 chs Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -42,6 +42,7 @@
#define HID0_PAR 0x01000000 /* Disable precharge of ARTRY */
#define HID0_STEN 0x01000000 /* Software table search enable (7450) */
#define HID0_DOZE 0x00800000 /* Enable doze mode */
+#define HID0_HIGH_BAT_EN 0x00800000 /* Enable additional BATs (74[45][57]) */
#define HID0_NAP 0x00400000 /* Enable nap mode */
#define HID0_SLEEP 0x00200000 /* Enable sleep mode */
#define HID0_DPM 0x00100000 /* Enable Dynamic power management */
@@ -75,7 +76,7 @@
#define HID0_7450_BITMASK "\020" \
"\040EMCP\037b1\036b2\035b3\034b4\033TBEN\032b6\031STEN" \
- "\030b8\027NAP\026SLEEP\025DPM\024b12\023BHTCLR\022XAEN\021NHR" \
+ "\030HIGH_BAT_EN\027NAP\026SLEEP\025DPM\024b12\023BHTCLR\022XAEN\021NHR" \
"\020ICE\017DCE\016ILOCK\015DLOCK\014ICFI\013DCFI\012SPD\011b23" \
"\010SGE\007b25\006BTIC\005LRSTK\004FOLD\003BHT\002NOPDST\001NOPTI"
@@ -91,7 +92,7 @@
* 5 EICE - - - - TBEN
* 6 ECLK - ECLK ECLK ECLK -
* 7 PAR PAR PAR PAR PAR STEN
- * 8 DOZE - DOZE DOZE DOZE -
+ * 8 DOZE - DOZE DOZE DOZE HIGH_BAT_EN
* 9 NAP - NAP NAP NAP NAP
* 10 SLEEP - SLEEP SLEEP SLEEP SLEEP
* 11 DPM - DPM DPM DPM DPM
diff -r 000a88208124 -r 7ad44c43d5fd sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c Tue Jan 11 02:04:01 2005 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c Tue Jan 11 02:09:54 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.18 2005/01/07 21:31:04 briggs Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.19 2005/01/11 02:09:54 chs Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.18 2005/01/07 21:31:04 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.19 2005/01/11 02:09:54 chs Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@@ -387,9 +387,9 @@
if (vers == MPC7450 && (pvr & 0xFFFF) <= 0x0200)
hid0 &= ~HID0_BTIC;
/* Select NAP mode. */
- hid0 &= ~(HID0_DOZE | HID0_NAP | HID0_SLEEP);
+ hid0 &= ~(HID0_HIGH_BAT_EN | HID0_SLEEP);
hid0 |= HID0_NAP | HID0_DPM;
- powersave = 0; /* but don't use it */
+ powersave = 1;
break;
default:
Home |
Main Index |
Thread Index |
Old Index