Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove src/sys/dev/apm/*. (They've gone to arch/hpcmips/...
details: https://anonhg.NetBSD.org/src/rev/c708669769af
branches: trunk
changeset: 495504:c708669769af
user: takemura <takemura%NetBSD.org@localhost>
date: Sun Jul 30 04:41:15 2000 +0000
description:
Remove src/sys/dev/apm/*. (They've gone to arch/hpcmips/dev/apm.)
diffstat:
sys/arch/hpcmips/conf/GENERIC | 12 +-
sys/arch/hpcmips/conf/files.hpcmips | 6 +-
sys/arch/hpcmips/dev/hpcapm.c | 4 +-
sys/dev/apm/apm.c | 915 ------------------------------------
sys/dev/apm/apmvar.h | 339 -------------
sys/dev/apm/files.apm | 12 -
6 files changed, 11 insertions(+), 1277 deletions(-)
diffs (truncated from 1355 to 300 lines):
diff -r 6ad1ac484c8b -r c708669769af sys/arch/hpcmips/conf/GENERIC
--- a/sys/arch/hpcmips/conf/GENERIC Sun Jul 30 04:33:34 2000 +0000
+++ b/sys/arch/hpcmips/conf/GENERIC Sun Jul 30 04:41:15 2000 +0000
@@ -2,11 +2,11 @@
# Distribution kernel (NEC VR based model) kernel config file
#
-# $NetBSD: GENERIC,v 1.60 2000/07/27 17:53:37 mason Exp $
+# $NetBSD: GENERIC,v 1.61 2000/07/30 04:41:18 takemura Exp $
#
include "arch/hpcmips/conf/std.hpcmips"
-#ident "GENERIC-$Revision: 1.60 $"
+#ident "GENERIC-$Revision: 1.61 $"
maxusers 8
@@ -99,8 +99,8 @@
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
# temporally power management
-hpcapm0 at mainbus0 # pseudo power management
-apm0 at hpcapm0 # pseudo APM
+hpcapm0 at mainbus0 # power management
+apmdev0 at hpcapm0 # APM
vrip* at mainbus0
vrcmu* at vrip? addr 0x0b000060 size 0x20
@@ -115,8 +115,8 @@
vrdsu* at vrip? addr 0x0b0000e0 size 0x08
vrpiu* at vrip? addr 0x0b000120 size 0x1a0 intr 5
-#mqvideo0 at vrip? addr 0x0a000000 size 0x800000 # MQ200 video controller
-#hpcfb* at mqvideo?
+mqvideo0 at vrip? addr 0x0a000000 size 0x800000 # MQ200 video controller
+hpcfb* at mqvideo?
# Workstation Console attachments
bivideo0 at mainbus0
diff -r 6ad1ac484c8b -r c708669769af sys/arch/hpcmips/conf/files.hpcmips
--- a/sys/arch/hpcmips/conf/files.hpcmips Sun Jul 30 04:33:34 2000 +0000
+++ b/sys/arch/hpcmips/conf/files.hpcmips Sun Jul 30 04:41:15 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.hpcmips,v 1.35 2000/07/22 08:53:34 takemura Exp $
+# $NetBSD: files.hpcmips,v 1.36 2000/07/30 04:41:19 takemura Exp $
# maxpartitions must be first item in files.${ARCH}.
maxpartitions 8
@@ -92,8 +92,8 @@
#
# power management
#
-include "dev/apm/files.apm"
-device hpcapm: apmif
+include "arch/hpcmips/dev/apm/files.apm"
+device hpcapm: apmdevif
attach hpcapm at mainbus
file arch/hpcmips/dev/hpcapm.c hpcapm
diff -r 6ad1ac484c8b -r c708669769af sys/arch/hpcmips/dev/hpcapm.c
--- a/sys/arch/hpcmips/dev/hpcapm.c Sun Jul 30 04:33:34 2000 +0000
+++ b/sys/arch/hpcmips/dev/hpcapm.c Sun Jul 30 04:41:15 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcapm.c,v 1.2 2000/07/22 08:53:35 takemura Exp $ */
+/* $NetBSD: hpcapm.c,v 1.3 2000/07/30 04:41:15 takemura Exp $ */
/*
* Copyright (c) 2000 Takemura Shin
@@ -31,7 +31,7 @@
#include <sys/device.h>
#include <sys/systm.h>
-#include <dev/apm/apmvar.h>
+#include <arch/hpcmips/dev/apm/apmvar.h>
#include <machine/bus.h>
#include <machine/autoconf.h>
diff -r 6ad1ac484c8b -r c708669769af sys/dev/apm/apm.c
--- a/sys/dev/apm/apm.c Sun Jul 30 04:33:34 2000 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,915 +0,0 @@
-/* $NetBSD: apm.c,v 1.1 2000/07/02 09:48:12 takemura Exp $ */
-
-/*-
- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by John Kohl and Christopher G. Demetriou.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-/*
- * from: sys/arch/i386/i386/apm.c,v 1.49 2000/05/08
- */
-
-#include "opt_apm.h"
-
-#ifdef APM_NOIDLE
-#error APM_NOIDLE option deprecated; use APM_NO_IDLE instead
-#endif
-
-#if defined(DEBUG) && !defined(APMDEBUG)
-#define APMDEBUG
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/map.h>
-#include <sys/proc.h>
-#include <sys/kthread.h>
-#include <sys/lock.h>
-#include <sys/user.h>
-#include <sys/malloc.h>
-#include <sys/device.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/select.h>
-#include <sys/poll.h>
-#include <sys/conf.h>
-
-#include <dev/apm/apmvar.h>
-
-#include <machine/stdarg.h>
-
-#define APMDEBUG
-#if defined(APMDEBUG)
-#define DPRINTF(f, x) do { if (apmdebug & (f)) printf x; } while (0)
-
-#define APMDEBUG_INFO 0x01
-#define APMDEBUG_APMCALLS 0x02
-#define APMDEBUG_EVENTS 0x04
-#define APMDEBUG_PROBE 0x10
-#define APMDEBUG_ATTACH 0x40
-#define APMDEBUG_DEVICE 0x20
-#define APMDEBUG_ANOM 0x40
-
-#ifdef APMDEBUG_VALUE
-int apmdebug = APMDEBUG_VALUE;
-#else
-int apmdebug = 0;
-#endif
-#else
-#define DPRINTF(f, x) /**/
-#endif
-
-#define APM_NEVENTS 16
-
-struct apm_softc {
- struct device sc_dev;
- struct selinfo sc_rsel;
- struct selinfo sc_xsel;
- int sc_flags;
- int event_count;
- int event_ptr;
- int sc_power_state;
- struct proc *sc_thread;
- struct lock sc_lock;
- struct apm_event_info event_list[APM_NEVENTS];
- struct apm_accessops *ops;
- void *cookie;
-};
-#define SCFLAG_OREAD 0x0000001
-#define SCFLAG_OWRITE 0x0000002
-#define SCFLAG_OPEN (SCFLAG_OREAD|SCFLAG_OWRITE)
-
-#define APMUNIT(dev) (minor(dev)&0xf0)
-#define APMDEV(dev) (minor(dev)&0x0f)
-#define APMDEV_NORMAL 0
-#define APMDEV_CTL 8
-
-/*
- * A brief note on the locking protocol: it's very simple; we
- * assert an exclusive lock any time thread context enters the
- * APM module. This is both the APM thread itself, as well as
- * user context.
- */
-#define APM_LOCK(apmsc) \
- (void) lockmgr(&(apmsc)->sc_lock, LK_EXCLUSIVE, NULL)
-#define APM_UNLOCK(apmsc) \
- (void) lockmgr(&(apmsc)->sc_lock, LK_RELEASE, NULL)
-
-static void apmattach __P((struct device *, struct device *, void *));
-static int apmmatch __P((struct device *, struct cfdata *, void *));
-
-static void apm_event_handle __P((struct apm_softc *, u_int, u_int));
-static void apm_periodic_check __P((struct apm_softc *));
-static void apm_create_thread __P((void *));
-static void apm_thread __P((void *));
-static void apm_perror __P((const char *, int, ...))
- __kprintf_attribute__((__format__(__printf__,1,3)));
-#ifdef APM_POWER_PRINT
-static void apm_power_print __P((struct apm_softc *, struct apm_power_info *));
-#endif
-static int apm_record_event __P((struct apm_softc *, u_int));
-static void apm_set_ver __P((struct apm_softc *, u_long));
-static void apm_standby __P((struct apm_softc *));
-static const char *apm_strerror __P((int));
-static void apm_suspend __P((struct apm_softc *));
-static void apm_resume __P((struct apm_softc *, u_int, u_int));
-
-cdev_decl(apm);
-
-struct cfattach apm_ca = {
- sizeof(struct apm_softc), apmmatch, apmattach
-};
-
-extern struct cfdriver apm_cd;
-
-/* configurable variables */
-int apm_bogus_bios = 0;
-#ifdef APM_DISABLE
-int apm_enabled = 0;
-#else
-int apm_enabled = 1;
-#endif
-#ifdef APM_NO_IDLE
-int apm_do_idle = 0;
-#else
-int apm_do_idle = 1;
-#endif
-#ifdef APM_NO_STANDBY
-int apm_do_standby = 0;
-#else
-int apm_do_standby = 1;
-#endif
-#ifdef APM_V10_ONLY
-int apm_v11_enabled = 0;
-#else
-int apm_v11_enabled = 1;
-#endif
-#ifdef APM_NO_V12
-int apm_v12_enabled = 0;
-#else
-int apm_v12_enabled = 1;
-#endif
-
-/* variables used during operation (XXX cgd) */
-u_char apm_majver, apm_minver;
-int apm_inited;
-int apm_standbys, apm_userstandbys, apm_suspends, apm_battlow;
-int apm_damn_fool_bios, apm_op_inprog;
-int apm_evindex;
-
-static const char *
-apm_strerror(code)
- int code;
-{
- switch (code) {
- case APM_ERR_PM_DISABLED:
- return ("power management disabled");
- case APM_ERR_REALALREADY:
- return ("real mode interface already connected");
- case APM_ERR_NOTCONN:
- return ("interface not connected");
- case APM_ERR_16ALREADY:
- return ("16-bit interface already connected");
- case APM_ERR_16NOTSUPP:
- return ("16-bit interface not supported");
- case APM_ERR_32ALREADY:
- return ("32-bit interface already connected");
- case APM_ERR_32NOTSUPP:
- return ("32-bit interface not supported");
- case APM_ERR_UNRECOG_DEV:
- return ("unrecognized device ID");
- case APM_ERR_ERANGE:
- return ("parameter out of range");
- case APM_ERR_NOTENGAGED:
- return ("interface not engaged");
- case APM_ERR_UNABLE:
- return ("unable to enter requested state");
- case APM_ERR_NOEVENTS:
Home |
Main Index |
Thread Index |
Old Index