diff -uNr --exclude=CVS /usr/src/sys.ORIG/arch/i386/conf/GENERIC /usr/src/sys/arch/i386/conf/GENERIC --- /usr/src/sys.ORIG/arch/i386/conf/GENERIC Sat Aug 2 10:50:04 2008 +++ /usr/src/sys/arch/i386/conf/GENERIC Wed Sep 20 17:29:48 2006 @@ -779,6 +779,13 @@ owsbm* at onewire? # Smart Battery Monitor owtemp* at onewire? # Temperature +# Motion control devices +#option MOTIONCONTROL # Real-time motion control extensions +#servo0 at gpio1 offset 0 mask 0x3 # Servo / stepper motor controller +#cncpanel0 at gpio1 offset 0 mask 0x3 # Control panel for machine-tool +#estop0 at gpio1 offset 0 mask 0x1 # Software emergency stop (e-stop) +#encoder0 at gpio1 offset 0 mask 0x3 # Position-sensing encoder (quadrature) + pseudo-device pctr 1 pseudo-device mtrr 1 # Memory range attributes control pseudo-device nvram 1 diff -uNr --exclude=CVS /usr/src/sys.ORIG/arch/i386/conf/files.i386 /usr/src/sys/arch/i386/conf/files.i386 --- /usr/src/sys.ORIG/arch/i386/conf/files.i386 Tue Jul 8 19:16:29 2008 +++ /usr/src/sys/arch/i386/conf/files.i386 Wed Sep 20 17:31:51 2006 @@ -418,6 +418,11 @@ include "dev/sdmmc/files.sdmmc" # +# Machine-independent motion control drivers +# +include "dev/cnc/files.cnc" + +# # Machine-independent Bluetooth drivers # include "dev/bluetooth/files.bluetooth" diff -uNr --exclude=CVS /usr/src/sys.ORIG/arch/i386/i386/conf.c /usr/src/sys/arch/i386/i386/conf.c --- /usr/src/sys.ORIG/arch/i386/i386/conf.c Mon Jun 16 13:28:41 2008 +++ /usr/src/sys/arch/i386/i386/conf.c Wed Sep 20 17:33:39 2006 @@ -198,6 +198,7 @@ #include "hotplug.h" #include "gpio.h" #include "amdmsr.h" +#include "cnc.h" struct cdevsw cdevsw[] = { @@ -314,7 +315,8 @@ cdev_bthub_init(NBTHUB,bthub), /* 86: bthub */ cdev_agp_init(NAGP,agp), /* 87: agp */ cdev_drm_init(NDRMBASE,drm), /* 88: drm */ - cdev_amdmsr_init(NAMDMSR,amdmsr) /* 89: amdmsr */ + cdev_amdmsr_init(NAMDMSR,amdmsr), /* 89: amdmsr */ + cdev_cnc_init(NCNC,cnc), /* 90: motion control interface */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff -uNr --exclude=CVS /usr/src/sys.ORIG/conf/GENERIC /usr/src/sys/conf/GENERIC --- /usr/src/sys.ORIG/conf/GENERIC Mon Jul 28 16:04:00 2008 +++ /usr/src/sys/conf/GENERIC Wed Sep 20 17:34:31 2006 @@ -81,6 +81,7 @@ pseudo-device ccd 4 # concatenated disk devices pseudo-device ksyms 1 # kernel symbols device pseudo-device systrace 1 # system call tracing device +#pseudo-device cnc 1 # motion control for machinery and robots # clonable devices pseudo-device bpfilter # packet filter diff -uNr --exclude=CVS /usr/src/sys.ORIG/sys/conf.h /usr/src/sys/sys/conf.h --- /usr/src/sys.ORIG/sys/conf.h Mon Jun 16 13:29:45 2008 +++ /usr/src/sys/sys/conf.h Wed Sep 20 17:37:10 2006 @@ -525,6 +525,12 @@ (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \ (dev_type_mmap((*))) enodev } +/* open, close, write, ioctl */ +#define cdev_cnc_init(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ + dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ + 0, seltrue, (dev_type_mmap((*))) enodev } + #endif /* @@ -682,6 +688,7 @@ cdev_decl(hotplug); cdev_decl(gpio); cdev_decl(amdmsr); +cdev_decl(cnc); #endif