Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Add consinit() and md_consinit funcptr to ibm4xx/ma...
details: https://anonhg.NetBSD.org/src/rev/398daef06437
branches: trunk
changeset: 573194:398daef06437
user: shige <shige%NetBSD.org@localhost>
date: Fri Jan 21 19:24:11 2005 +0000
description:
Add consinit() and md_consinit funcptr to ibm4xx/machdep.c.
Rename consinit() to obs405_consinit() at evbppc/obs405/consinit.c.
Set md_consinit to obs405_consinit() at initppc().
Consinit fuction calls a function stored at md_consinit pointer.
diffstat:
sys/arch/evbppc/include/obs405.h | 3 ++-
sys/arch/evbppc/obs405/consinit.c | 7 +++----
sys/arch/evbppc/obs405/md_machdep.c | 5 +++--
sys/arch/powerpc/ibm4xx/machdep.c | 21 +++++++++++++++++++--
sys/arch/powerpc/include/ibm4xx/cpu.h | 6 +++++-
5 files changed, 32 insertions(+), 10 deletions(-)
diffs (145 lines):
diff -r 8202255f6821 -r 398daef06437 sys/arch/evbppc/include/obs405.h
--- a/sys/arch/evbppc/include/obs405.h Fri Jan 21 17:02:40 2005 +0000
+++ b/sys/arch/evbppc/include/obs405.h Fri Jan 21 19:24:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obs405.h,v 1.2 2005/01/18 17:55:16 shige Exp $ */
+/* $NetBSD: obs405.h,v 1.3 2005/01/21 19:24:11 shige Exp $ */
/*
* Copyright 2004 Shigeyuki Fukushima.
@@ -70,6 +70,7 @@
/*
* extern variables and functions
*/
+extern void obs405_consinit(void);
extern void obs405_cpu_startup(void);
extern void obs405_device_register(struct device *dev, void *aux);
diff -r 8202255f6821 -r 398daef06437 sys/arch/evbppc/obs405/consinit.c
--- a/sys/arch/evbppc/obs405/consinit.c Fri Jan 21 17:02:40 2005 +0000
+++ b/sys/arch/evbppc/obs405/consinit.c Fri Jan 21 19:24:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: consinit.c,v 1.2 2005/01/13 17:07:24 shige Exp $ */
+/* $NetBSD: consinit.c,v 1.3 2005/01/21 19:24:11 shige Exp $ */
/*
* Copyright (c) 2004 Shigeyuki Fukushima.
@@ -31,9 +31,8 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.2 2005/01/13 17:07:24 shige Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.3 2005/01/21 19:24:11 shige Exp $");
-#include <sys/systm.h>
#include <machine/obs405.h>
#include <powerpc/ibm4xx/dev/comopbvar.h>
@@ -42,7 +41,7 @@
* Initialize the system console.
*/
void
-consinit(void)
+obs405_consinit(void)
{
#if (NCOM > 0)
diff -r 8202255f6821 -r 398daef06437 sys/arch/evbppc/obs405/md_machdep.c
--- a/sys/arch/evbppc/obs405/md_machdep.c Fri Jan 21 17:02:40 2005 +0000
+++ b/sys/arch/evbppc/obs405/md_machdep.c Fri Jan 21 19:24:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md_machdep.c,v 1.1 2005/01/18 17:55:16 shige Exp $ */
+/* $NetBSD: md_machdep.c,v 1.2 2005/01/21 19:24:11 shige Exp $ */
/* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp $ */
/*
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md_machdep.c,v 1.1 2005/01/18 17:55:16 shige Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md_machdep.c,v 1.2 2005/01/21 19:24:11 shige Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -122,6 +122,7 @@
memsize = openbios_board_memsize_get();
/* Setup machine-dependent functions */
+ md_consinit = obs405_consinit;
md_cpu_startup = obs405_cpu_startup;
md_device_register = obs405_device_register;
diff -r 8202255f6821 -r 398daef06437 sys/arch/powerpc/ibm4xx/machdep.c
--- a/sys/arch/powerpc/ibm4xx/machdep.c Fri Jan 21 17:02:40 2005 +0000
+++ b/sys/arch/powerpc/ibm4xx/machdep.c Fri Jan 21 19:24:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1 2005/01/18 16:56:24 shige Exp $ */
+/* $NetBSD: machdep.c,v 1.2 2005/01/21 19:24:11 shige Exp $ */
/*
* Copyright (c) 2004 Shigeyuki Fukushima.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2005/01/18 16:56:24 shige Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2005/01/21 19:24:11 shige Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -64,9 +64,26 @@
/*
* machine-dependent function pointers
*/
+void (*md_consinit) __P((void)) = NULL;
void (*md_cpu_startup) __P((void)) = NULL;
/*
+ * consinit:
+ * console initialize.
+ */
+void
+consinit(void)
+{
+
+ /* 4xx common procedure is here. */
+ ;
+
+ /* machine-dependent procedure is here. */
+ if (md_consinit != NULL)
+ md_consinit();
+}
+
+/*
* cpu_startup:
* machine startup code.
*/
diff -r 8202255f6821 -r 398daef06437 sys/arch/powerpc/include/ibm4xx/cpu.h
--- a/sys/arch/powerpc/include/ibm4xx/cpu.h Fri Jan 21 17:02:40 2005 +0000
+++ b/sys/arch/powerpc/include/ibm4xx/cpu.h Fri Jan 21 19:24:11 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.9 2005/01/18 17:11:25 shige Exp $ */
+/* $NetBSD: cpu.h,v 1.10 2005/01/21 19:24:11 shige Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -67,6 +67,7 @@
extern void (*md_device_register) __P((struct device *dev, void *aux));
/* export from ibm4xx/machdep.c */
+extern void (*md_consinit) __P((void));
extern void (*md_cpu_startup) __P((void));
/* export from ibm4xx/ibm40x_machdep.c */
@@ -81,7 +82,10 @@
/* export from ibm4xx/ibm4xx_autoconf.c */
extern void ibm4xx_device_register(struct device *dev, void *aux);
+/* export from ibm4xx/clock.c */
extern void calc_delayconst(void);
+
+/* export from ibm4xx/4xx_locore.S */
extern void ppc4xx_reset(void) __attribute__((__noreturn__));
#endif /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index