diff options
-rw-r--r-- | sys/dev/usb/ohci.c | 20 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 16 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 13 |
3 files changed, 14 insertions, 35 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index b1df74e3b4d..f463a10ce6e 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.13 2000/07/04 11:44:21 fgsch Exp $ */ +/* $OpenBSD: ohci.c,v 1.14 2000/09/06 22:42:10 rahnds Exp $ */ /* $NetBSD: ohci.c,v 1.85 2000/04/01 09:27:35 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -98,24 +98,6 @@ int ohcidebug = 0; #define DPRINTFN(n,x) #endif -/* - * The OHCI controller is little endian, so on big endian machines - * the data strored in memory needs to be swapped. - */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) -#if BYTE_ORDER == BIG_ENDIAN -#define htole32(x) (bswap32(x)) -#define le32toh(x) (bswap32(x)) -#define htole16(x) (bswap16(x)) -#define le16toh(x) (bswap16(x)) -#else -#define htole32(x) (x) -#define le32toh(x) (x) -#define htole16(x) (x) -#define le16toh(x) (x) -#endif -#endif - struct ohci_pipe; Static ohci_soft_ed_t *ohci_alloc_sed __P((ohci_softc_t *)); diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index aae1039dcee..daeeac9e198 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci.c,v 1.13 2000/07/04 11:44:23 fgsch Exp $ */ +/* $OpenBSD: uhci.c,v 1.14 2000/09/06 22:42:10 rahnds Exp $ */ /* $NetBSD: uhci.c,v 1.110 2000/04/14 14:11:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -103,20 +103,6 @@ int uhcidebug = 0; #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(__FreeBSD__) || 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; diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 4b288daf577..31ec8c211e2 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_port.h,v 1.17 2000/08/26 20:08:39 nate Exp $ */ +/* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */ /* $NetBSD: usb_port.h,v 1.28 2000/03/30 08:53:31 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -221,6 +221,17 @@ __CONCAT(dname,_detach)(self, flags) \ #define memset(d, v, l) bzero((d),(l)) #define bswap32(x) swap32(x) #define bswap16(x) swap16(x) + +/* + * The UHCI/OHCI controllers are little endian, so on big endian machines + * the data strored in memory needs to be swapped. + */ + +#if defined(letoh32) +#define le32toh(x) letoh32(x) +#define le16toh(x) letoh16(x) +#endif + #define usb_kthread_create1 kthread_create #define usb_kthread_create kthread_create_deferred |