Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm32 Add OF_nextprop and required conf-glue for /d...
details: https://anonhg.NetBSD.org/src/rev/e1577337782a
branches: trunk
changeset: 499185:e1577337782a
user: matt <matt%NetBSD.org@localhost>
date: Tue Nov 14 07:13:02 2000 +0000
description:
Add OF_nextprop and required conf-glue for /dev/openfirm.
diffstat:
sys/arch/arm32/arm32/conf.c | 9 ++++++++-
sys/arch/arm32/include/conf.h | 3 ++-
sys/arch/arm32/ofw/openfirm.c | 31 ++++++++++++++++++++++++++++++-
3 files changed, 40 insertions(+), 3 deletions(-)
diffs (96 lines):
diff -r 28051bebf9fb -r e1577337782a sys/arch/arm32/arm32/conf.c
--- a/sys/arch/arm32/arm32/conf.c Tue Nov 14 06:55:38 2000 +0000
+++ b/sys/arch/arm32/arm32/conf.c Tue Nov 14 07:13:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.43 2000/09/23 04:30:08 augustss Exp $ */
+/* $NetBSD: conf.c,v 1.44 2000/11/14 07:13:03 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -194,6 +194,7 @@
#include "wsmouse.h"
#include "wsmux.h"
#include "scsibus.h"
+#include "openfirm.h"
/* Character devices */
@@ -283,6 +284,11 @@
cdev_tty_init(NUCOM,ucom), /* 74: USB tty */
cdev_usbdev_init(NURIO,urio), /* 75: Diamond Rio 500 */
cdev_ugen_init(NUSCANNER,uscanner),/* 76: USB scanner */
+#if (defined(OFWGENCFG) || defined(SHARK))
+ cdev_openfirm_init(NOPENFIRM,openfirm),/* 77: openfirmware */
+#else
+ cdev_notdef(), /* 77: */
+#endif
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@@ -401,6 +407,7 @@
/* 74 */ NODEV,
/* 75 */ NODEV,
/* 76 */ NODEV,
+ /* 77 */ NODEV,
};
/*
diff -r 28051bebf9fb -r e1577337782a sys/arch/arm32/include/conf.h
--- a/sys/arch/arm32/include/conf.h Tue Nov 14 06:55:38 2000 +0000
+++ b/sys/arch/arm32/include/conf.h Tue Nov 14 07:13:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.h,v 1.14 2000/09/23 04:30:09 augustss Exp $ */
+/* $NetBSD: conf.h,v 1.15 2000/11/14 07:13:02 matt Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -167,3 +167,4 @@
cdev_decl(wsmouse);
cdev_decl(wsmux);
cdev_decl(scsibus);
+cdev_decl(openfirm);
diff -r 28051bebf9fb -r e1577337782a sys/arch/arm32/ofw/openfirm.c
--- a/sys/arch/arm32/ofw/openfirm.c Tue Nov 14 06:55:38 2000 +0000
+++ b/sys/arch/arm32/ofw/openfirm.c Tue Nov 14 07:13:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: openfirm.c,v 1.3 1998/05/01 21:18:44 cgd Exp $ */
+/* $NetBSD: openfirm.c,v 1.4 2000/11/14 07:13:02 matt Exp $ */
/*
* Copyright 1997
@@ -173,6 +173,35 @@
}
int
+OF_nextprop(handle, prop, nextprop)
+ int handle;
+ char *prop;
+ char *nextprop;
+{
+ static struct {
+ char *name;
+ int nargs;
+ int nreturns;
+ int phandle;
+ char *prop;
+ char *nextprop;
+ int flags;
+ } args = {
+ "nextprop",
+ 3,
+ 1,
+ };
+
+ args.phandle = handle;
+ args.prop = prop;
+ args.nextprop = nextprop;
+
+ if (openfirmware(&args) == -1)
+ return -1;
+ return args.flags;
+}
+
+int
OF_getprop(handle, prop, buf, buflen)
int handle;
char *prop;
Home |
Main Index |
Thread Index |
Old Index