Deleted Added
full compact
at91dci.c (187183) at91dci.c (188409)
1#include <sys/cdefs.h>
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/at91dci.c 187183 2009-01-13 19:05:51Z thompsa $");
2__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/at91dci.c 188409 2009-02-09 21:47:39Z thompsa $");
3
4/*-
5 * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

--- 259 unchanged lines hidden (view full) ---

270 AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, AT91_UDP_GSTATE_ESR);
271
272 /* wait 8 milliseconds */
273 if (use_polling) {
274 /* polling */
275 DELAY(8000);
276 } else {
277 /* Wait for reset to complete. */
3
4/*-
5 * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright

--- 259 unchanged lines hidden (view full) ---

270 AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, AT91_UDP_GSTATE_ESR);
271
272 /* wait 8 milliseconds */
273 if (use_polling) {
274 /* polling */
275 DELAY(8000);
276 } else {
277 /* Wait for reset to complete. */
278 usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8);
278 usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125);
279 }
280
281 AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0);
282}
283
284static void
285at91dci_set_address(struct at91dci_softc *sc, uint8_t addr)
286{

--- 1103 unchanged lines hidden (view full) ---

1390 USB_BUS_LOCK(&sc->sc_bus);
1391
1392 /* turn on clocks */
1393
1394 if (sc->sc_clocks_on) {
1395 (sc->sc_clocks_on) (sc->sc_clocks_arg);
1396 }
1397 /* wait a little for things to stabilise */
279 }
280
281 AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0);
282}
283
284static void
285at91dci_set_address(struct at91dci_softc *sc, uint8_t addr)
286{

--- 1103 unchanged lines hidden (view full) ---

1390 USB_BUS_LOCK(&sc->sc_bus);
1391
1392 /* turn on clocks */
1393
1394 if (sc->sc_clocks_on) {
1395 (sc->sc_clocks_on) (sc->sc_clocks_arg);
1396 }
1397 /* wait a little for things to stabilise */
1398 usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1);
1398 usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000);
1399
1400 /* disable and clear all interrupts */
1401
1402 AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, 0xFFFFFFFF);
1403 AT91_UDP_WRITE_4(sc, AT91_UDP_ICR, 0xFFFFFFFF);
1404
1405 /* compute default CSR value */
1406

--- 1061 unchanged lines hidden ---
1399
1400 /* disable and clear all interrupts */
1401
1402 AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, 0xFFFFFFFF);
1403 AT91_UDP_WRITE_4(sc, AT91_UDP_ICR, 0xFFFFFFFF);
1404
1405 /* compute default CSR value */
1406

--- 1061 unchanged lines hidden ---