diff options
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/brooktree848.c | 27 | ||||
-rw-r--r-- | sys/pci/dpt_pci.c | 3 | ||||
-rw-r--r-- | sys/pci/meteor.c | 9 | ||||
-rw-r--r-- | sys/pci/meteor_reg.h | 3 | ||||
-rw-r--r-- | sys/pci/pci.c | 29 | ||||
-rw-r--r-- | sys/pci/xrpu.c | 18 |
6 files changed, 20 insertions, 69 deletions
diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c index 1c5cfdd..27b73d0 100644 --- a/sys/pci/brooktree848.c +++ b/sys/pci/brooktree848.c @@ -1,4 +1,4 @@ -/* $Id: brooktree848.c,v 1.85 1999/06/12 14:54:54 roger Exp $ */ +/* $Id: brooktree848.c,v 1.89 1999/07/12 15:51:48 roger Exp $ */ /* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and Jim Lowe's driver for the Matrox Meteor PCI card . The @@ -444,7 +444,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system. #ifdef __FreeBSD__ #include "bktr.h" #include "opt_bktr.h" -#include "opt_devfs.h" #include "pci.h" #endif /* __FreeBSD__ */ @@ -485,10 +484,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system. #define NSMBUS 0 #endif -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ - #if (__FreeBSD_version >=400000) || (NSMBUS > 0) #include <sys/bus.h> /* used by smbus and newbus */ #endif @@ -6961,13 +6956,9 @@ bktr_attach( device_t dev ) /* call the common attach code */ common_bktr_attach( bktr, unit, fun, rev ); -#ifdef DEVFS - /* XXX This just throw away the token, which should probably be fixed when - DEVFS is finally made really operational. */ - devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit); - devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit); - devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit); -#endif /* DEVFS */ + make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit); + make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit); + make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit); return 0; @@ -7473,13 +7464,9 @@ bktr_attach( pcici_t tag, int unit ) /* call the common attach code */ common_bktr_attach( bktr, unit, fun, rev ); -#ifdef DEVFS - /* XXX This just throw away the token, which should probably be fixed when - DEVFS is finally made really operational. */ - devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit); - devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit); - devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit); -#endif /* DEVFS */ + make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit); + make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit); + make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit); } diff --git a/sys/pci/dpt_pci.c b/sys/pci/dpt_pci.c index 4e03f78..3828d08 100644 --- a/sys/pci/dpt_pci.c +++ b/sys/pci/dpt_pci.c @@ -32,9 +32,8 @@ * dptpci.c: PCI Bus Attachment for DPT SCSI HBAs */ -#ident "$Id: dpt_pci.c,v 1.13 1999/05/09 17:06:44 peter Exp $" +#ident "$Id: dpt_pci.c,v 1.14 1999/08/16 01:52:20 gibbs Exp $" -#include "opt_devfs.h" #include "opt_dpt.h" #include <sys/param.h> diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index f96c1e2..47960c1 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -147,7 +147,6 @@ #include "meteor.h" -#include "opt_devfs.h" #include "opt_meteor.h" #include <sys/param.h> @@ -156,9 +155,6 @@ #include <sys/kernel.h> #include <sys/signalvar.h> #include <sys/mman.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ #include <sys/uio.h> #if defined(METEOR_FreeBSD_210) @@ -1126,10 +1122,7 @@ met_attach(pcici_t tag, int unit) mtr->flags |= METEOR_INITALIZED | METEOR_AUTOMODE | METEOR_DEV0 | METEOR_RGB16; -#ifdef DEVFS - mtr->devfs_token = devfs_add_devswf(&meteor_cdevsw, unit, - DV_CHR, 0, 0, 0644, "meteor"); -#endif + make_dev(&meteor_cdevsw, unit, 0, 0, 0644, "meteor"); } #define UNIT(x) ((x) & 0x07) diff --git a/sys/pci/meteor_reg.h b/sys/pci/meteor_reg.h index 5293ba4..40d06e0 100644 --- a/sys/pci/meteor_reg.h +++ b/sys/pci/meteor_reg.h @@ -238,9 +238,6 @@ typedef struct meteor_softc { u_char pcf_i2c[NUM_PCF8574_I2C_REGS]; /* PCF8574 register values */ u_char bt254_reg[NUM_BT254_REGS]; /* BT254 register values */ u_short fps; /* frames per second */ -#ifdef DEVFS - void *devfs_token; -#endif #ifdef METEOR_TEST_VIDEO struct meteor_video video; #endif diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 78b0cda..75f41e8 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -23,13 +23,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.113 1999/07/28 07:57:47 dfr Exp $ + * $Id: pci.c,v 1.114 1999/07/29 01:03:03 mdodd Exp $ * */ #include "opt_bus.h" -#include "opt_devfs.h" #include "opt_simos.h" #include <sys/param.h> @@ -42,9 +41,6 @@ #include <sys/queue.h> #include <sys/types.h> #include <sys/buf.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /* DEVFS */ #include <vm/vm.h> #include <vm/pmap.h> @@ -916,22 +912,6 @@ static struct cdevsw pcicdev = { /* bmaj */ -1 }; -#ifdef DEVFS -static void *pci_devfs_token; -#endif - -static void -pci_cdevinit(void *dummy) -{ - cdevsw_add(&pcicdev); -#ifdef DEVFS - pci_devfs_token = devfs_add_devswf(&pcicdev, 0, DV_CHR, - UID_ROOT, GID_WHEEL, 0644, "pci"); -#endif -} - -SYSINIT(pcidev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+PCI_CDEV, pci_cdevinit, NULL); - #include "pci_if.h" /* @@ -1109,9 +1089,14 @@ pci_add_children(device_t dev, int busno) static int pci_new_probe(device_t dev) { - device_set_desc(dev, "PCI bus"); + static int once; + device_set_desc(dev, "PCI bus"); pci_add_children(dev, device_get_unit(dev)); + if (!once) { + make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci"); + once++; + } return 0; } diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index 839263c..e34e3c2 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: xrpu.c,v 1.14 1999/07/03 08:23:00 phk Exp $ + * $Id: xrpu.c,v 1.15 1999/07/13 08:15:22 phk Exp $ * * A very simple device driver for PCI cards based on Xilinx 6200 series * FPGA/RPU devices. Current Functionality is to allow you to open and @@ -17,8 +17,6 @@ * */ -#include "opt_devfs.h" - #include "xrpu.h" #include <sys/param.h> #include <sys/systm.h> @@ -26,9 +24,6 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/timepps.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif #include <sys/xrpuio.h> #include <pci/pcireg.h> #include <pci/pcivar.h> @@ -184,10 +179,8 @@ xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *pr) if (xt->xt_pps[i].xt_addr_assert == 0 && xt->xt_pps[i].xt_addr_clear == 0) continue; -#ifdef DEVFS - devfs_add_devswf(&xrpu_cdevsw, (i+1)<<16, DV_CHR, UID_ROOT, GID_WHEEL, - 0600, "xpps%d", i); -#endif + make_dev(&xrpu_cdevsw, (i+1)<<16, + UID_ROOT, GID_WHEEL, 0600, "xpps%d", i); sc->pps[i].ppscap = 0; if (xt->xt_pps[i].xt_addr_assert) { sc->assert[i] = sc->virbase62 + xt->xt_pps[i].xt_addr_assert; @@ -263,8 +256,5 @@ xrpu_attach (pcici_t tag, int unit) (u_long)sc->physbase, (u_long)sc->virbase); -#ifdef DEVFS - devfs_add_devswf(&xrpu_cdevsw, 0, DV_CHR, UID_ROOT, GID_WHEEL, 0600, - "xrpu%d", unit); -#endif + make_dev(&xrpu_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "xrpu%d", unit); } |