summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-01-22 00:36:46 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-01-22 00:36:46 +0000
commit6fde7fe0e07eb0d91d5955eb9a26999695c0e84d (patch)
treed23f7d075b222ae39a729f976d0dfa4ef5c7d976 /sys/dev/pci
parentca386e735566fb504682944ed30900dd3959d14c (diff)
downloadFreeBSD-src-6fde7fe0e07eb0d91d5955eb9a26999695c0e84d.zip
FreeBSD-src-6fde7fe0e07eb0d91d5955eb9a26999695c0e84d.tar.gz
Added OPTi FireLink and NEC (Toshiba and others) to OHCI ID's
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ohci_pci.c52
-rw-r--r--sys/dev/pci/uhci_pci.c29
2 files changed, 45 insertions, 36 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index ece467c..c8642f2 100644
--- a/sys/dev/pci/ohci_pci.c
+++ b/sys/dev/pci/ohci_pci.c
@@ -79,12 +79,20 @@
#define PCI_VENDOR(d) ((d) & 0xffff)
#define PCI_DEVICE(d) (((d) >> 8) & 0xffff)
+
#define PCI_OHCI_VENDORID_ALI 0x10b9
+#define PCI_OHCI_VENDORID_NEC 0x1033
+#define PCI_OHCI_VENDORID_OPTI 0x1045
#define PCI_OHCI_VENDORID_SIS 0x1039
#define PCI_OHCI_DEVICEID_ALADDIN_V 0x523710b9
-static const char ohci_device_aladdin_v[] = "AcerLabs M5237 (Aladdin-V) USB Host Controller";
-static const char ohci_device_generic[] = "OHCI USB Host Controller (generic)";
+static const char *ohci_device_aladdin_v = "AcerLabs M5237 (Aladdin-V) USB Host Controller";
+#define PCI_OHCI_DEVICEID_FIRELINK 0xc8611045
+static const char *ohci_device_firelink = "OPTi 82C861 (FireLink) USB Host Controller";
+#define PCI_OHCI_DEVICEID_NEC 0x00351033
+static const char *ohci_device_nec = "NEC uPD 9210 USB Host Controller";
+static const char *ohci_device_generic = "OHCI (generic) USB Host Controller";
+
#define PCI_OHCI_BASE_REG 0x10
@@ -110,6 +118,10 @@ ohci_pci_probe(pcici_t config_id, pcidi_t device_id)
if (device_id == PCI_OHCI_DEVICEID_ALADDIN_V) {
return (ohci_device_aladdin_v);
+ } else if (device_id == PCI_OHCI_DEVICEID_FIRELINK) {
+ return (ohci_device_firelink);
+ } else if (device_id == PCI_OHCI_DEVICEID_NEC) {
+ return (ohci_device_nec);
} else {
class = pci_conf_read(config_id, PCI_CLASS_REG);
if ( (PCI_CLASS(class) == PCI_CLASS_SERIALBUS)
@@ -155,23 +167,15 @@ ohci_pci_attach(pcici_t config_id, int unit)
id = pci_conf_read(config_id, PCI_ID_REG);
if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_ALI)
sprintf(sc->sc_vendor, "AcerLabs");
+ else if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_NEC)
+ sprintf(sc->sc_vendor, "NEC");
+ else if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_OPTI)
+ sprintf(sc->sc_vendor, "OPTi");
else if (PCI_VENDOR(id) == PCI_OHCI_VENDORID_SIS)
sprintf(sc->sc_vendor, "SiS");
else
sprintf(sc->sc_vendor, "(0x%04x)", PCI_VENDOR(id));
- /* We add a child to the root bus. After PCI configuration
- * has completed the root bus will start to probe and
- * attach all the devices attached to it, including our new
- * kid.
- *
- * FIXME Sometime in the future the UHCI controller itself will
- * become a kid of PCI device and this device add will no longer
- * be necessary.
- *
- * See README for an elaborate description of the bus
- * structure in spe.
- */
sc->sc_bus.bdev = device_add_child(root_bus, "usb", unit, sc);
if (!sc->sc_bus.bdev) {
printf("%s%d: could not add USB device to root bus\n",
@@ -180,21 +184,27 @@ ohci_pci_attach(pcici_t config_id, int unit)
return;
}
- r = ohci_init(sc);
- if (r != USBD_NORMAL_COMPLETION) {
- printf("usb%d: init failed, error=%d\n", unit, r);
- device_delete_child(root_bus, sc->sc_bus.bdev);
- return;
- }
-
switch(id) {
case PCI_OHCI_DEVICEID_ALADDIN_V:
device_set_desc(sc->sc_bus.bdev, ohci_device_aladdin_v);
break;
+ case PCI_OHCI_DEVICEID_FIRELINK:
+ device_set_desc(sc->sc_bus.bdev, ohci_device_firelink);
+ break;
+ case PCI_OHCI_DEVICEID_NEC:
+ device_set_desc(sc->sc_bus.bdev, ohci_device_nec);
+ break;
default:
printf("(New OHCI DeviceId=0x%08x)\n", id);
device_set_desc(sc->sc_bus.bdev, ohci_device_generic);
}
+ r = ohci_init(sc);
+ if (r != USBD_NORMAL_COMPLETION) {
+ printf("%s%d: init failed, error=%d\n",
+ device_get_name(sc->sc_bus.bdev), unit ,r);
+ device_delete_child(root_bus, sc->sc_bus.bdev);
+ }
+
return;
}
diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c
index 083540f..0ee4687 100644
--- a/sys/dev/pci/uhci_pci.c
+++ b/sys/dev/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* FreeBSD $Id: uhci_pci.c,v 1.7 1999/01/06 19:55:49 n_hibma Exp $ */
+/* FreeBSD $Id: uhci_pci.c,v 1.8 1999/01/07 23:01:11 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,13 +76,13 @@
#define PCI_UHCI_VENDORID_VIA 0x1106
#define PCI_UHCI_DEVICEID_PIIX3 0x70208086ul
-static const char *uhci_device_piix3 = "Intel 82371SB USB Host Controller";
+static const char *uhci_device_piix3 = "Intel 82371SB (PIIX3) USB Host Controller";
#define PCI_UHCI_DEVICEID_PIIX4 0x71128086ul
#define PCI_UHCI_DEVICEID_PIIX4E 0x71128086ul /* no separate step */
-static const char *uhci_device_piix4 = "Intel 82371AB/EB USB Host Controller";
+static const char *uhci_device_piix4 = "Intel 82371AB/EB (PIIX4) USB Host Controller";
#define PCI_UHCI_DEVICEID_VT83C572 0x30381106ul
-static const char *uhci_device_vt83c572 = "VIA 83C572 USB Host Controller";
-static const char *uhci_device_generic = "UHCI USB Controller (generic)";
+static const char *uhci_device_vt83c572 = "VIA 83C572 USB Host Controller";
+static const char *uhci_device_generic = "UHCI (generic) USB Controller";
#define PCI_UHCI_BASE_REG 0x20
@@ -199,16 +199,6 @@ uhci_pci_attach(pcici_t config_id, int unit)
return;
}
- r = uhci_init(sc);
- if (r != USBD_NORMAL_COMPLETION) {
- printf("%s%d: init failed, error=%d\n",
- device_get_name(sc->sc_bus.bdev),
- device_get_unit(sc->sc_bus.bdev),
- r);
- device_delete_child(root_bus, sc->sc_bus.bdev);
- return;
- }
-
switch (id) {
case PCI_UHCI_DEVICEID_PIIX3:
device_set_desc(sc->sc_bus.bdev, uhci_device_piix3);
@@ -224,5 +214,14 @@ uhci_pci_attach(pcici_t config_id, int unit)
device_set_desc(sc->sc_bus.bdev, uhci_device_generic);
}
+ r = uhci_init(sc);
+ if (r != USBD_NORMAL_COMPLETION) {
+ printf("%s%d: init failed, error=%d\n",
+ device_get_name(sc->sc_bus.bdev),
+ device_get_unit(sc->sc_bus.bdev),
+ r);
+ device_delete_child(root_bus, sc->sc_bus.bdev);
+ }
+
return;
}
OpenPOWER on IntegriCloud