Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/isa Pull up revision 1.17 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/be934d7c5484
branches:  netbsd-1-5
changeset: 491645:be934d7c5484
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 15:05:59 2001 +0000

description:
Pull up revision 1.17 (requested by he):
  Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
  PWR_SOFTRESUME.  Apm calls powerhook with the values in normal interrupt
  priority level while others are protected with splhigh().

diffstat:

 sys/dev/isa/ym.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 36cab4fd93a5 -r be934d7c5484 sys/dev/isa/ym.c
--- a/sys/dev/isa/ym.c  Sun May 06 15:05:36 2001 +0000
+++ b/sys/dev/isa/ym.c  Sun May 06 15:05:59 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ym.c,v 1.14.4.2 2000/09/04 02:44:46 itohy Exp $        */
+/*     $NetBSD: ym.c,v 1.14.4.3 2001/05/06 15:05:59 he Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1054,7 +1054,9 @@
 
        s = splaudio();
 
-       if (why != PWR_RESUME) {
+       switch (why) {
+       case PWR_SUSPEND:
+       case PWR_STANDBY:
                /*
                 * suspending...
                 */
@@ -1078,7 +1080,9 @@
                sc->sc_sa3_scan[SA3_PWR_MNG] = ym_read(sc, SA3_PWR_MNG);
                if (sc->sc_on_blocks)
                        ym_chip_powerdown(sc);
-       } else {
+               break;
+
+       case PWR_RESUME:
                /*
                 * resuming...
                 */
@@ -1099,6 +1103,11 @@
                /* Restore global/digital power-down state. */
                ym_write(sc, SA3_PWR_MNG, sc->sc_sa3_scan[SA3_PWR_MNG]);
                ym_write(sc, SA3_DPWRDWN, sc->sc_sa3_scan[SA3_DPWRDWN]);
+               break;
+       case PWR_SOFTSUSPEND:
+       case PWR_SOFTSTANDBY:
+       case PWR_SOFTRESUME:
+               break;
        }
        splx(s);
 }



Home | Main Index | Thread Index | Old Index