Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Remove unused "power @ ebus" device, we use...
details: https://anonhg.NetBSD.org/src/rev/4ff524a32471
branches: trunk
changeset: 825266:4ff524a32471
user: martin <martin%NetBSD.org@localhost>
date: Thu Jul 06 11:09:00 2017 +0000
description:
Remove unused "power @ ebus" device, we use the firmware to handle power/
reboot.
diffstat:
sys/arch/sparc64/conf/files.sparc64 | 6 +-
sys/arch/sparc64/dev/power.c | 97 -------------------------------------
sys/arch/sparc64/dev/power.h | 57 ---------------------
3 files changed, 1 insertions(+), 159 deletions(-)
diffs (182 lines):
diff -r dfea692094a5 -r 4ff524a32471 sys/arch/sparc64/conf/files.sparc64
--- a/sys/arch/sparc64/conf/files.sparc64 Thu Jul 06 10:44:19 2017 +0000
+++ b/sys/arch/sparc64/conf/files.sparc64 Thu Jul 06 11:09:00 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.sparc64,v 1.152 2016/08/19 19:02:07 palle Exp $
+# $NetBSD: files.sparc64,v 1.153 2017/07/06 11:09:00 martin Exp $
# @(#)files.sparc64 8.1 (Berkeley) 7/19/93
# sparc64-specific configuration info
@@ -94,10 +94,6 @@
device timer
attach timer at mainbus, sbus
-device power
-attach power at sbus, ebus
-file arch/sparc64/dev/power.c power
-
device tda: sysmon_envsys
attach tda at iic
file arch/sparc64/dev/tda.c tda
diff -r dfea692094a5 -r 4ff524a32471 sys/arch/sparc64/dev/power.c
--- a/sys/arch/sparc64/dev/power.c Thu Jul 06 10:44:19 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/* $NetBSD: power.c,v 1.12 2011/06/03 03:20:39 christos Exp $ */
-
-/*
- * Copyright (c) 1996
- * The President and Fellows of Harvard College. All rights reserved.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Aaron Brown and
- * Harvard University.
- *
- * 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 Harvard University
- * and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: power.c,v 1.12 2011/06/03 03:20:39 christos Exp $");
-
-#include <sys/param.h>
-#include <sys/device.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-
-#include <machine/autoconf.h>
-
-#include <sparc64/dev/power.h>
-
-static int powermatch(device_t, cfdata_t, void *);
-static void powerattach(device_t, device_t, void *);
-
-CFATTACH_DECL_NEW(power, 0,
- powermatch, powerattach, NULL, NULL);
-
-extern struct cfdriver power_cd;
-
-/*
- * This is the driver for the "power" register available on some Sun4m
- * machines. This allows the machine to remove power automatically when
- * shutdown or halted or whatever.
- *
- * XXX: this capability is not used in the current kernel.
- */
-
-static int
-powermatch(device_t parent, cfdata_t cf, void *aux)
-{
- struct confargs *ca = aux;
-
- if (CPU_ISSUN4M)
- return strcmp("power", ca->ca_ra.ra_name) == 0;
-
- return 0;
-}
-
-/* ARGSUSED */
-static void
-powerattach(device_t parent, device_t self, void *aux)
-{
- struct confargs *ca = aux;
- struct romaux *ra = &ca->ca_ra;
-
- power_reg = mapiodev(ra->ra_reg, 0, sizeof(long));
-
- printf("\n");
-}
-
-void
-powerdown(void)
-{
- *POWER_REG |= POWER_OFF;
-}
diff -r dfea692094a5 -r 4ff524a32471 sys/arch/sparc64/dev/power.h
--- a/sys/arch/sparc64/dev/power.h Thu Jul 06 10:44:19 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/* $NetBSD: power.h,v 1.2 2006/05/12 23:35:24 uwe Exp $ */
-
-/*
- * Copyright (c) 1996
- * The President and Fellows of Harvard College. All rights reserved.
- *
- * All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Aaron Brown and
- * Harvard University.
- *
- * 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 Harvard University
- * and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- */
-
-/*
- * Sun-4m power register. This register allows the computer to power itself
- * down.
- */
-
-#define POWER_OFF 0x1 /* remove power */
-
-#define POWER_REG ((volatile u_char *)(power_reg))
-
-#define POWER_BITS "\20\1POWEROFF"
-
-#ifndef _LOCORE
-volatile u_char *power_reg;
-#endif
-
-void powerdown(void); /* power off function */
Home |
Main Index |
Thread Index |
Old Index