diff options
author | imp <imp@FreeBSD.org> | 2007-06-13 06:00:10 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2007-06-13 06:00:10 +0000 |
commit | f3564369dd62991685c27bbfa7d6327ae9038044 (patch) | |
tree | 43685ac41e9adee37a3fa1dcfa370e16b84d9c7e /sys/dev/usb/uhci.c | |
parent | 2c34b9a1c839311eee49ff3edf5dc8c7700e4142 (diff) | |
download | FreeBSD-src-f3564369dd62991685c27bbfa7d6327ae9038044.zip FreeBSD-src-f3564369dd62991685c27bbfa7d6327ae9038044.tar.gz |
Remove more unnecessary and unwanted __OtherBSD__ ifdefs.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index ed324e6..8b84c27 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -65,17 +65,12 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> -#if defined(__NetBSD__) || defined(__OpenBSD__) -#include <sys/device.h> -#include <sys/select.h> -#elif defined(__FreeBSD__) #include <sys/endian.h> #include <sys/module.h> #include <sys/bus.h> #if defined(DIAGNOSTIC) && defined(__i386__) #include <machine/cpu.h> #endif -#endif #include <sys/proc.h> #include <sys/queue.h> #include <sys/sysctl.h> @@ -95,19 +90,10 @@ __FBSDID("$FreeBSD$"); /* Use bandwidth reclamation for control transfers. Some devices choke on it. */ /*#define UHCI_CTL_LOOP */ -#if defined(__FreeBSD__) - #define delay(d) DELAY(d) -#endif #define MS_TO_TICKS(ms) ((ms) * hz / 1000) -#if defined(__OpenBSD__) -struct cfdriver uhci_cd = { - NULL, "uhci", DV_DULL -}; -#endif - #ifdef USB_DEBUG uhci_softc_t *thesc; #define DPRINTF(x) if (uhcidebug) printf x @@ -119,28 +105,12 @@ SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RW, &uhcidebug, 0, "uhci debug level"); SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RW, &uhcinoloop, 0, "uhci noloop"); -#ifndef __NetBSD__ #define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f)) -#endif #else #define DPRINTF(x) #define DPRINTFN(n,x) #endif -/* - * The UHCI controller is little endian, so on big endian machines - * the data strored in memory needs to be swapped. - */ -#if defined(__OpenBSD__) -#if BYTE_ORDER == BIG_ENDIAN -#define htole32(x) (bswap32(x)) -#define le32toh(x) (bswap32(x)) -#else -#define htole32(x) (x) -#define le32toh(x) (x) -#endif -#endif - struct uhci_pipe { struct usbd_pipe pipe; int nexttoggle; @@ -558,41 +528,13 @@ uhci_init(uhci_softc_t *sc) return (uhci_run(sc, 1)); /* and here we go... */ } -#if defined(__NetBSD__) || defined(__OpenBSD__) -int -uhci_activate(device_t self, enum devact act) -{ - struct uhci_softc *sc = (struct uhci_softc *)self; - int rv = 0; - - switch (act) { - case DVACT_ACTIVATE: - return (EOPNOTSUPP); - - case DVACT_DEACTIVATE: - if (sc->sc_child != NULL) - rv = config_deactivate(sc->sc_child); - break; - } - return (rv); -} -#endif - int uhci_detach(struct uhci_softc *sc, int flags) { usbd_xfer_handle xfer; int rv = 0; -#if defined(__NetBSD__) || defined(__OpenBSD__) - if (sc->sc_child != NULL) - rv = config_detach(sc->sc_child, flags); - - if (rv != 0) - return (rv); -#else sc->sc_dying = 1; -#endif UWRITE2(sc, UHCI_INTR, 0); /* disable interrupts */ uhci_run(sc, 0); |