summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-12-14 21:14:11 +0000
committerjulian <julian@FreeBSD.org>1998-12-14 21:14:11 +0000
commitf4d6fc7ea681e07bea8ddb7c39518d67e09b5d78 (patch)
treeb29d82da023ca3642f0d05d2251ee669ac752a1a /sys/dev/usb/ohci.c
parent4477d5ca2cf8c9cb5898888a1022ee49e0050d04 (diff)
downloadFreeBSD-src-f4d6fc7ea681e07bea8ddb7c39518d67e09b5d78.zip
FreeBSD-src-f4d6fc7ea681e07bea8ddb7c39518d67e09b5d78.tar.gz
The OHCI interfaces I have access to map their control regs etc. into
memory address space rather than IO space.. reflect this when looking for the interface revision register. If this is not true for them all then we probably need some smarter code.
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index ec4973d..90f638a 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,5 +1,5 @@
/* $NetBSD: ohci.c,v 1.12 1998/11/30 21:39:20 augustss Exp $ */
-/* FreeBSD $Id$ */
+/* FreeBSD $Id: ohci.c,v 1.4 1998/12/14 09:32:23 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -144,9 +144,9 @@ void ohci_dump_ed __P((ohci_soft_ed_t *));
#define OREAD4(sc, r) bus_space_read_4((sc)->iot, (sc)->ioh, (r))
#define OREAD2(sc, r) bus_space_read_2((sc)->iot, (sc)->ioh, (r))
#elif defined(__FreeBSD__)
-#define OWRITE4(sc, r, x) outl((sc)->sc_iobase + (r), (x))
-#define OREAD4(sc, r) inl((sc)->sc_iobase + (r))
-#define OREAD2(sc, r) inw((sc)->sc_iobase + (r))
+#define OWRITE4(sc, r, x) *(unsigned int *) ((sc)->sc_iobase + (r)) = x
+#define OREAD4(sc, r) (*(unsigned int *) ((sc)->sc_iobase + (r)))
+#define OREAD2(sc, r) (*(unsigned short *) ((sc)->sc_iobase + (r)))
#endif
/* Reverse the bits in a value 0 .. 31 */
OpenPOWER on IntegriCloud