Merge from NetBSD:
ohci.c (1.85), ohcireg.h (1.17): ---------------------------- date: 2000/04/01 09:27:35; author: augustss; Add a delay before reading the number of ports from the controller to avoid getting 0 from it. ----------------------------
This commit is contained in:
parent
6688a3fdbe
commit
a5450efd66
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ohci.c,v 1.83 2000/03/29 01:46:26 augustss Exp $ */
|
||||
/* $NetBSD: ohci.c,v 1.85 2000/04/01 09:27:35 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -831,9 +831,14 @@ ohci_init(ohci_softc_t *sc)
|
||||
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);
|
||||
usb_delay_ms(&sc->sc_bus, OHCI_ENABLE_POWER_DELAY);
|
||||
OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca);
|
||||
|
||||
/*
|
||||
* The AMD756 requires a delay before re-reading the register,
|
||||
* otherwise it will occasionally report 0 ports.
|
||||
*/
|
||||
usb_delay_ms(&sc->sc_bus, OHCI_READ_DESC_DELAY);
|
||||
sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
|
||||
|
||||
#ifdef OHCI_DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ohcireg.h,v 1.16 2000/03/29 01:46:27 augustss Exp $ */
|
||||
/* $NetBSD: ohcireg.h,v 1.17 2000/04/01 09:27:35 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
|
||||
@ -240,4 +240,8 @@ typedef struct {
|
||||
#define OHCI_CC_BUFFER_UNDERRUN 13
|
||||
#define OHCI_CC_NOT_ACCESSED 15
|
||||
|
||||
/* Some delay needed when changing certain registers. */
|
||||
#define OHCI_ENABLE_POWER_DELAY 5
|
||||
#define OHCI_READ_DESC_DELAY 5
|
||||
|
||||
#endif /* _DEV_PCI_OHCIREG_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user