Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint/sandpoint Add lpt and fdc/fd back in. In...



details:   https://anonhg.NetBSD.org/src/rev/df73c2166a30
branches:  trunk
changeset: 503561:df73c2166a30
user:      briggs <briggs%NetBSD.org@localhost>
date:      Thu Feb 08 18:33:07 2001 +0000

description:
Add lpt and fdc/fd back in.  Include i4b stuff, too.

diffstat:

 sys/arch/sandpoint/sandpoint/conf.c |  63 ++++++++++++++++++++++++++++++++++--
 1 files changed, 59 insertions(+), 4 deletions(-)

diffs (117 lines):

diff -r 60d331b3c3aa -r df73c2166a30 sys/arch/sandpoint/sandpoint/conf.c
--- a/sys/arch/sandpoint/sandpoint/conf.c       Thu Feb 08 18:33:03 2001 +0000
+++ b/sys/arch/sandpoint/sandpoint/conf.c       Thu Feb 08 18:33:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.1 2001/02/04 18:32:17 briggs Exp $  */
+/*     $NetBSD: conf.c,v 1.2 2001/02/08 18:33:07 briggs Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -49,6 +49,8 @@
 #include "wd.h"
 bdev_decl(wd);
 bdev_decl(sw);
+#include "fdc.h"
+bdev_decl(fd);
 #include "wt.h"
 bdev_decl(wt);
 #include "sd.h"
@@ -74,7 +76,7 @@
 {
        bdev_disk_init(NWD,wd), /* 0: ST506/ESDI/IDE disk */
        bdev_swap_init(1,sw),           /* 1: swap pseudo-device */
-       bdev_notdef(),                  /* 2 */
+       bdev_disk_init(NFDC,fd),        /* 2: floppy diskette */
        bdev_tape_init(NWT,wt),         /* 3: QIC-02/QIC-36 tape */
        bdev_disk_init(NSD,sd),         /* 4: SCSI disk */
        bdev_tape_init(NST,st),         /* 5: SCSI tape */
@@ -121,6 +123,52 @@
        (dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
        (dev_type_mmap((*))) enodev }
 
+/* open, close, ioctl */
+#define cdev_i4bctl_init(c,n) { \
+       dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
+       (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+       (dev_type_stop((*))) enodev, 0, seltrue, \
+       (dev_type_mmap((*))) enodev }
+
+/* open, close, read, write, poll */
+#define        cdev_i4brbch_init(c,n) { \
+       dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+       dev_init(c,n,write), dev_init(c,n,ioctl), \
+       (dev_type_stop((*))) enodev, \
+       0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
+
+/* open, close, read, write, poll */
+#define        cdev_i4btel_init(c,n) { \
+       dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+       dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
+       (dev_type_stop((*))) enodev, \
+       0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, D_TTY }
+
+/* open, close, read, ioctl */
+#define cdev_i4btrc_init(c,n) { \
+       dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+       (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+       (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
+       (dev_type_mmap((*))) enodev }
+
+/* open, close, read, ioctl, poll */
+#define cdev_i4b_init(c,n) { \
+       dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+       (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+       (dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
+       (dev_type_mmap((*))) enodev }   
+
+#include "i4b.h"
+#include "i4bctl.h"
+#include "i4btrc.h"
+#include "i4brbch.h"
+#include "i4btel.h"
+cdev_decl(i4b);
+cdev_decl(i4bctl);
+cdev_decl(i4btrc);
+cdev_decl(i4brbch);
+cdev_decl(i4btel);
+
 cdev_decl(cn);
 cdev_decl(ctty);
 #define        mmread  mmrw
@@ -138,6 +186,7 @@
 cdev_decl(log);
 #include "com.h"
 cdev_decl(com);
+cdev_decl(fd);
 cdev_decl(wt);
 cdev_decl(scd);
 /*#include "pc.h"
@@ -202,13 +251,13 @@
        cdev_cn_init(1,cn),             /* 0: virtual console */
        cdev_ctty_init(1,ctty),         /* 1: controlling terminal */
        cdev_mm_init(1,mm),             /* 2: /dev/{null,mem,kmem,...} */
-       cdev_disk_init(NWD,wd), /* 3: ST506/ESDI/IDE disk */
+       cdev_disk_init(NWD,wd),         /* 3: ST506/ESDI/IDE disk */
        cdev_swap_init(1,sw),           /* 4: /dev/drum (swap pseudo-device) */
        cdev_tty_init(NPTY,pts),        /* 5: pseudo-tty slave */
        cdev_ptc_init(NPTY,ptc),        /* 6: pseudo-tty master */
        cdev_log_init(1,log),           /* 7: /dev/klog */
        cdev_tty_init(NCOM,com),        /* 8: serial port */
-       cdev_notdef(),                  /* 9 */
+       cdev_disk_init(NFDC,fd),        /* 9: floppy disk */
        cdev_tape_init(NWT,wt),         /* 10: QIC-02/QIC-36 tape */
        cdev_disk_init(NSCD,scd),       /* 11: Sony CD-ROM */
        cdev_notdef(),                  /* 12: PC console */
@@ -258,6 +307,12 @@
        cdev_scsibus_init(NSCSIBUS,scsibus), /* 50: SCSI bus */
        cdev_disk_init(NRAID,raid),     /* 51: RAIDframe disk driver */
        cdev_notdef(),                  /* 52 */
+       cdev_i4b_init(NI4B, i4b),               /* 53: i4b main device */
+       cdev_i4bctl_init(NI4BCTL, i4bctl),      /* 54: i4b control device */
+       cdev_i4brbch_init(NI4BRBCH, i4brbch),   /* 55: i4b raw b-channel access */
+       cdev_i4btrc_init(NI4BTRC, i4btrc),      /* 56: i4b trace device */
+       cdev_i4btel_init(NI4BTEL, i4btel),      /* 57: i4b phone device */
+
 };
 int    nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
 



Home | Main Index | Thread Index | Old Index