Module Name:    src
Committed By:   matt
Date:           Wed Jan 13 01:53:19 UTC 2010

Modified Files:
        src/sys/arch/evbmips/conf [matt-nb5-mips64]: files.adm5120
            files.alchemy files.atheros files.malta
Added Files:
        src/sys/arch/evbmips/evbmips [matt-nb5-mips64]: cpu.c
Removed Files:
        src/sys/arch/evbmips/adm5120 [matt-nb5-mips64]: cpu.c
        src/sys/arch/evbmips/alchemy [matt-nb5-mips64]: cpu.c
        src/sys/arch/evbmips/atheros [matt-nb5-mips64]: cpu.c
        src/sys/arch/evbmips/malta [matt-nb5-mips64]: cpu.c

Log Message:
Use a common cpu.c for evbmips single cpu machines


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/evbmips/adm5120/cpu.c
cvs rdiff -u -r1.7 -r0 src/sys/arch/evbmips/alchemy/cpu.c
cvs rdiff -u -r1.3 -r0 src/sys/arch/evbmips/atheros/cpu.c
cvs rdiff -u -r1.5 -r1.5.28.1 src/sys/arch/evbmips/conf/files.adm5120
cvs rdiff -u -r1.9 -r1.9.28.1 src/sys/arch/evbmips/conf/files.alchemy
cvs rdiff -u -r1.6 -r1.6.28.1 src/sys/arch/evbmips/conf/files.atheros
cvs rdiff -u -r1.15.28.1 -r1.15.28.2 src/sys/arch/evbmips/conf/files.malta
cvs rdiff -u -r0 -r1.2.4.2 src/sys/arch/evbmips/evbmips/cpu.c
cvs rdiff -u -r1.7 -r0 src/sys/arch/evbmips/malta/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbmips/conf/files.adm5120
diff -u src/sys/arch/evbmips/conf/files.adm5120:1.5 src/sys/arch/evbmips/conf/files.adm5120:1.5.28.1
--- src/sys/arch/evbmips/conf/files.adm5120:1.5	Wed Feb 20 21:43:33 2008
+++ src/sys/arch/evbmips/conf/files.adm5120	Wed Jan 13 01:53:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.adm5120,v 1.5 2008/02/20 21:43:33 drochner Exp $
+#	$NetBSD: files.adm5120,v 1.5.28.1 2010/01/13 01:53:18 matt Exp $
 
 file	arch/evbmips/adm5120/autoconf.c
 file	arch/evbmips/adm5120/machdep.c
@@ -18,7 +18,7 @@
 
 device	cpu
 attach	cpu at mainbus
-file	arch/evbmips/adm5120/cpu.c		cpu
+file	arch/evbmips/evbmips/cpu.c		cpu
 
 # Machine-independent SCSI drivers
 include "dev/scsipi/files.scsipi"

Index: src/sys/arch/evbmips/conf/files.alchemy
diff -u src/sys/arch/evbmips/conf/files.alchemy:1.9 src/sys/arch/evbmips/conf/files.alchemy:1.9.28.1
--- src/sys/arch/evbmips/conf/files.alchemy:1.9	Wed Feb 20 21:43:33 2008
+++ src/sys/arch/evbmips/conf/files.alchemy	Wed Jan 13 01:53:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.alchemy,v 1.9 2008/02/20 21:43:33 drochner Exp $
+#	$NetBSD: files.alchemy,v 1.9.28.1 2010/01/13 01:53:18 matt Exp $
 
 # Platform support - select just one, please
 defflag		opt_alchemy.h	ALCHEMY_GENERIC
@@ -35,7 +35,7 @@
 
 device	cpu
 attach	cpu at mainbus
-file	arch/evbmips/alchemy/cpu.c		cpu
+file	arch/evbmips/evbmips/cpu.c		cpu
 
 # Alchemy on-board devices
 device	obio { [addr=-1] }

Index: src/sys/arch/evbmips/conf/files.atheros
diff -u src/sys/arch/evbmips/conf/files.atheros:1.6 src/sys/arch/evbmips/conf/files.atheros:1.6.28.1
--- src/sys/arch/evbmips/conf/files.atheros:1.6	Wed Feb 20 21:43:33 2008
+++ src/sys/arch/evbmips/conf/files.atheros	Wed Jan 13 01:53:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.atheros,v 1.6 2008/02/20 21:43:33 drochner Exp $
+#	$NetBSD: files.atheros,v 1.6.28.1 2010/01/13 01:53:18 matt Exp $
 
 file	arch/evbmips/atheros/mach_intr.c
 
@@ -20,7 +20,7 @@
 
 device	cpu
 attach	cpu at mainbus
-file	arch/evbmips/atheros/cpu.c		cpu
+file	arch/evbmips/evbmips/cpu.c		cpu
 
 device	wdog: sysmon_wdog
 attach	wdog at mainbus

Index: src/sys/arch/evbmips/conf/files.malta
diff -u src/sys/arch/evbmips/conf/files.malta:1.15.28.1 src/sys/arch/evbmips/conf/files.malta:1.15.28.2
--- src/sys/arch/evbmips/conf/files.malta:1.15.28.1	Sun Jan 10 02:48:45 2010
+++ src/sys/arch/evbmips/conf/files.malta	Wed Jan 13 01:53:18 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.malta,v 1.15.28.1 2010/01/10 02:48:45 matt Exp $
+#	$NetBSD: files.malta,v 1.15.28.2 2010/01/13 01:53:18 matt Exp $
 
 file	arch/evbmips/malta/malta_bus_io.c
 file	arch/evbmips/malta/malta_bus_mem.c
@@ -25,7 +25,7 @@
 
 device	cpu
 attach	cpu at mainbus
-file	arch/evbmips/malta/cpu.c		cpu
+file	arch/evbmips/evbmips/cpu.c		cpu
 
 # Machine-independent I2O drivers.
 include "dev/i2o/files.i2o"

Added files:

Index: src/sys/arch/evbmips/evbmips/cpu.c
diff -u /dev/null src/sys/arch/evbmips/evbmips/cpu.c:1.2.4.2
--- /dev/null	Wed Jan 13 01:53:19 2010
+++ src/sys/arch/evbmips/evbmips/cpu.c	Wed Jan 13 01:53:18 2010
@@ -0,0 +1,74 @@
+/*	$NetBSD: cpu.c,v 1.2.4.2 2010/01/13 01:53:18 matt Exp $	*/
+
+/*
+ * Copyright 2002 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Simon Burge for Wasabi Systems, Inc.
+ *
+ * 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 for the NetBSD Project by
+ *      Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ *    or promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
+ * 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: cpu.c,v 1.2.4.2 2010/01/13 01:53:18 matt Exp $");
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/systm.h>
+#include <sys/cpu.h>
+
+static int	cpu_match(device_t, cfdata_t, void *);
+static void	cpu_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(cpu, 0,
+    cpu_match, cpu_attach, NULL, NULL);
+
+static int
+cpu_match(device_t parent, cfdata_t match, void *aux)
+{
+
+	return 1;
+}
+
+static void
+cpu_attach(device_t parent, device_t self, void *aux)
+{
+	struct cpu_info * const ci = curcpu();
+
+	ci->ci_dev = self;
+	self->dv_private = ci;
+
+	aprint_normal(": %lu.%02luMHz (hz cycles = %lu, delay divisor = %lu)\n",
+	    ci->ci_cpu_freq / 1000000,
+	    (ci->ci_cpu_freq % 1000000) / 10000,
+	    ci->ci_cycles_per_hz, ci->ci_divisor_delay);
+
+	aprint_normal("%s: ", device_xname(self));
+	cpu_identify(self);
+}

Reply via email to