Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add usb*, ugen*
details: https://anonhg.NetBSD.org/src/rev/40ad683d98a3
branches: trunk
changeset: 535172:40ad683d98a3
user: isaki <isaki%NetBSD.org@localhost>
date: Sun Aug 11 13:21:07 2002 +0000
description:
Add usb*, ugen*
diffstat:
etc/etc.x68k/MAKEDEV | 40 +++++++++++++++++++++++++++++++++++++++-
sys/arch/x68k/x68k/conf.c | 10 +++++++++-
2 files changed, 48 insertions(+), 2 deletions(-)
diffs (122 lines):
diff -r 15d2ad6a4f66 -r 40ad683d98a3 etc/etc.x68k/MAKEDEV
--- a/etc/etc.x68k/MAKEDEV Sun Aug 11 13:19:35 2002 +0000
+++ b/etc/etc.x68k/MAKEDEV Sun Aug 11 13:21:07 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.54 2002/08/09 02:39:35 lukem Exp $
+# $NetBSD: MAKEDEV,v 1.55 2002/08/11 13:21:39 isaki Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -50,6 +50,7 @@
# std standard devices
# local configuration specific devices
# isdns make ISDN devices
+# usbs make USB devices
#
# Tapes:
# st* SCSI tapes
@@ -87,6 +88,10 @@
# isdntel* telephony device
# isdntrc* trace device
#
+# USB devices:
+# usb* USB control devices
+# ugen* USB generic devices
+#
# Special purpose devices:
# clockctl clock control for non root users
# grf* builtin video
@@ -143,6 +148,7 @@
makedev isdns
makedev clockctl
makedev systrace
+ makedev usbs
;;
floppy)
@@ -158,6 +164,11 @@
makedev isdn isdnctl isdnbchan0 isdnbchan1 isdntel0 isdntel1 isdntrc0 isdntrc1
;;
+usbs)
+ makedev usb usb0 usb1 usb2 usb3 usb4 usb5 usb6 usb7
+ makedev ugen0
+ ;;
+
std)
rm -f console drum kmem mem reload null zero klog
mknod console c 0 0
@@ -593,6 +604,33 @@
chmod 644 systrace
;;
+usb*)
+ unit=${i#usb}
+ if [ "$unit" = "" ]; then
+ unit=255
+ usb=usb
+ else
+ usb=usb$unit
+ fi
+ major=50
+ rm -f $usb
+ mknod $usb c $major $unit
+ chmod 600 $usb
+ ;;
+
+ugen*)
+ unit=${i#ugen}
+ ugen=ugen$unit
+ major=51
+ for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
+ do
+ ugenj=$ugen.$j
+ rm -f $ugenj
+ mknod $ugenj c $major $(($unit * 16 + $j))
+ chmod 600 $ugenj
+ done
+ ;;
+
local)
if [ -f "$0.local" ]; then
umask 0
diff -r 15d2ad6a4f66 -r 40ad683d98a3 sys/arch/x68k/x68k/conf.c
--- a/sys/arch/x68k/x68k/conf.c Sun Aug 11 13:19:35 2002 +0000
+++ b/sys/arch/x68k/x68k/conf.c Sun Aug 11 13:21:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.30 2002/07/19 16:38:26 thorpej Exp $ */
+/* $NetBSD: conf.c,v 1.31 2002/08/11 13:21:07 isaki Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -174,6 +174,11 @@
#include "scsibus.h"
cdev_decl(scsibus);
+#include "usb.h"
+cdev_decl(usb);
+#include "ugen.h"
+cdev_decl(ugen);
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -238,6 +243,8 @@
#else
cdev_notdef(), /* 49: system call tracing */
#endif
+ cdev_usb_init(NUSB, usb), /* 50: USB controller */
+ cdev_ugen_init(NUGEN, ugen), /* 51: USB generic driver */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@@ -303,6 +310,7 @@
/* 44 */ NODEV, /* 45 */ NODEV,
/* 46 */ NODEV, /* 47 */ NODEV,
/* 48 */ NODEV, /* 49 */ NODEV,
+ /* 50 */ NODEV, /* 51 */ NODEV,
};
/*
Home |
Main Index |
Thread Index |
Old Index