View | Details | Raw Unified | Return to bug 35356
Collapse All | Expand All

(-)uhci.c (-18 lines)
Lines 161-167 Link Here
161
Static LIST_HEAD(, uhci_intr_info) uhci_ii_free;
161
Static LIST_HEAD(, uhci_intr_info) uhci_ii_free;
162
162
163
Static void		uhci_busreset(uhci_softc_t *);
163
Static void		uhci_busreset(uhci_softc_t *);
164
Static void		uhci_reset(uhci_softc_t *);
165
Static usbd_status	uhci_run(uhci_softc_t *, int run);
164
Static usbd_status	uhci_run(uhci_softc_t *, int run);
166
Static uhci_soft_td_t  *uhci_alloc_std(uhci_softc_t *);
165
Static uhci_soft_td_t  *uhci_alloc_std(uhci_softc_t *);
167
Static void		uhci_free_std(uhci_softc_t *, uhci_soft_td_t *);
166
Static void		uhci_free_std(uhci_softc_t *, uhci_soft_td_t *);
Lines 280-287 Link Here
280
#define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd)
279
#define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd)
281
#define UHCISTS(sc) UREAD2(sc, UHCI_STS)
280
#define UHCISTS(sc) UREAD2(sc, UHCI_STS)
282
281
283
#define UHCI_RESET_TIMEOUT 100	/* ms, reset timeout */
284
285
#define UHCI_CURFRAME(sc) (UREAD2(sc, UHCI_FRNUM) & UHCI_FRNUM_MASK)
282
#define UHCI_CURFRAME(sc) (UREAD2(sc, UHCI_FRNUM) & UHCI_FRNUM_MASK)
286
283
287
#define UHCI_INTR_ENDPT 1
284
#define UHCI_INTR_ENDPT 1
Lines 1473-1493 Link Here
1473
1470
1474
	if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT)
1471
	if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT)
1475
		uhci_intr(sc);
1472
		uhci_intr(sc);
1476
}
1477
1478
void
1479
uhci_reset(uhci_softc_t *sc)
1480
{
1481
	int n;
1482
1483
	UHCICMD(sc, UHCI_CMD_HCRESET);
1484
	/* The reset bit goes low when the controller is done. */
1485
	for (n = 0; n < UHCI_RESET_TIMEOUT &&
1486
		    (UREAD2(sc, UHCI_CMD) & UHCI_CMD_HCRESET); n++)
1487
		usb_delay_ms(&sc->sc_bus, 1);
1488
	if (n >= UHCI_RESET_TIMEOUT)
1489
		printf("%s: controller did not reset\n",
1490
		       USBDEVNAME(sc->sc_bus.bdev));
1491
}
1473
}
1492
1474
1493
usbd_status
1475
usbd_status

Return to bug 35356