The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/pci/wdc_p.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  *
    3  * Copyright (c) 1996 Wolfgang Helbig <helbig@ba-stuttgart.de>
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice immediately at the beginning of the file, without modification,
   11  *    this list of conditions, and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. Absolutely no warranty of function or purpose is made by the author.
   16  * 4. Modifications may be freely made to this file if the above conditions
   17  *    are met.
   18  *
   19  * $FreeBSD: src/sys/pci/wdc_p.c,v 1.1.2.2 1999/09/05 08:21:29 peter Exp $
   20  */
   21 
   22 /*
   23  * The sole purpose of this code currently is to tell the ISA wdc driver,
   24  * whether there is a CMD640 IDE chip attached to the PCI bus.
   25  */
   26 
   27 #include "pci.h"
   28 #if NPCI > 0
   29 #include "opt_wd.h"
   30 #ifdef CMD640
   31 
   32 #include <sys/param.h>
   33 #include <sys/systm.h>
   34 #include <sys/malloc.h>
   35 #include <sys/kernel.h>
   36 #include <pci/pcireg.h>
   37 #include <pci/pcivar.h>
   38 #include <i386/isa/wdc_p.h>
   39 
   40 #include "wdc.h"
   41 
   42 /*
   43  * PCI-ID's of IDE-Controller
   44  */
   45 
   46 #define CMD640B_PCI_ID  0x06401095
   47 
   48 static char* wdc_pci_probe __P((pcici_t tag, pcidi_t type));
   49 static void wdc_pci_attach __P((pcici_t config_id, int unit));
   50 
   51 static u_long wdc_pci_count = 0;
   52 
   53 static struct pci_device wdc_pci_driver = {
   54         "wdc",
   55         wdc_pci_probe,
   56         wdc_pci_attach,
   57         &wdc_pci_count,
   58         NULL
   59 };
   60 
   61 DATA_SET (pcidevice_set, wdc_pci_driver);
   62 
   63 static char*
   64 wdc_pci_probe (pcici_t tag, pcidi_t type)
   65 {
   66         if (type == CMD640B_PCI_ID)
   67                 return "CMD 640B IDE";
   68 
   69         return NULL;
   70 }
   71 
   72 static void
   73 wdc_pci_attach(pcici_t config_id, int unit)
   74 {
   75         if (pci_conf_read(config_id, PCI_ID_REG) == CMD640B_PCI_ID)
   76                 wdc_pci(Q_CMD640B);
   77 }
   78 
   79 #endif /* CMD640 */
   80 #endif /* NPCI > 0 */

Cache object: 3180b1c611aa25048fc6365f0477959e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.