summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-01-21 04:24:33 +0000
committerjoe <joe@FreeBSD.org>2002-01-21 04:24:33 +0000
commit1c0dfadb293e923e1beded67d941a05f9c04a23e (patch)
treecf8352a1ca37a9479dcc5abf20b185f1f5633674 /sys/dev/usb/ohci.c
parentac16f826307f3faf58e1b1b7b5bd43fd267e1ec8 (diff)
downloadFreeBSD-src-1c0dfadb293e923e1beded67d941a05f9c04a23e.zip
FreeBSD-src-1c0dfadb293e923e1beded67d941a05f9c04a23e.tar.gz
Merge from NetBSD:
ohci.c: -r1.68 ohcireg.h: -r1.13 date: 2000/01/31 20:17:25; author: augustss; state: Exp; Fiddle with over-current protect when turning on port power to make things work for some OHCI controllers.
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index a54f21b..2e4585b 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.65 2000/01/25 12:06:21 augustss Exp $ */
+/* $NetBSD: ohci.c,v 1.68 2000/01/31 20:17:25 augustss Exp $ */
/* $FreeBSD$ */
/*
@@ -641,7 +641,7 @@ ohci_init(sc)
ohci_soft_ed_t *sed, *psed;
usbd_status err;
int i;
- u_int32_t s, ctl, ival, hcr, fm, per, rev;
+ u_int32_t s, ctl, ival, hcr, fm, per, rev, desca;
DPRINTF(("ohci_init: start\n"));
#if defined(__OpenBSD__)
@@ -815,7 +815,12 @@ ohci_init(sc)
per = OHCI_PERIODIC(ival); /* 90% periodic */
OWRITE4(sc, OHCI_PERIODIC_START, per);
- OWRITE4(sc, OHCI_RH_STATUS, OHCI_LPSC); /* Enable port power */
+ /* Fiddle the No OverCurrent Protection bit to avoid chip bug. */
+ desca = OREAD4(sc, OHCI_RH_DESCRIPTOR_A);
+ OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca | OHCI_NOCP);
+ OWRITE4(sc, OHCI_RH_STATUS, OHCI_LPSC); /* Enable port power */
+ usb_delay_ms(&sc->sc_bus, 5);
+ OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca);
sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
OpenPOWER on IntegriCloud