summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhci.c
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>1999-08-16 22:08:48 +0000
committerfgsch <fgsch@openbsd.org>1999-08-16 22:08:48 +0000
commit992bf2de34964da0d872d895bce4e55821232acf (patch)
tree3e8dc14a532dc1a5cc80c03229c16bfc1efe5b8a /sys/dev/usb/uhci.c
parentremove space. (diff)
downloadwireguard-openbsd-992bf2de34964da0d872d895bce4e55821232acf.tar.xz
wireguard-openbsd-992bf2de34964da0d872d895bce4e55821232acf.zip
Sync with NetBSD. Mostly FreeBSD related changes.
Diffs sent to augustsson.
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r--sys/dev/usb/uhci.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 96400f513c0..a0b2a0059ed 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.1 1999/08/13 05:28:04 fgsch Exp $ */
+/* $OpenBSD: uhci.c,v 1.2 1999/08/16 22:08:48 fgsch Exp $ */
/* $NetBSD: uhci.c,v 1.34 1999/08/02 23:35:55 augustss Exp $ */
/*
@@ -62,6 +62,9 @@
#include <sys/queue.h>
#include <sys/select.h>
+#if defined(__FreeBSD__)
+#include <machine/bus_pio.h>
+#endif
#include <machine/bus.h>
#include <dev/usb/usb.h>
@@ -218,17 +221,11 @@ void uhci_dump __P((void));
void uhci_dump_td __P((uhci_soft_td_t *));
#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__)
#define UWRITE2(sc, r, x) bus_space_write_2((sc)->iot, (sc)->ioh, (r), (x))
#define UWRITE4(sc, r, x) bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x))
+#define UREAD1(sc, r) bus_space_read_1((sc)->iot, (sc)->ioh, (r))
#define UREAD2(sc, r) bus_space_read_2((sc)->iot, (sc)->ioh, (r))
#define UREAD4(sc, r) bus_space_read_4((sc)->iot, (sc)->ioh, (r))
-#elif defined(__FreeBSD__)
-#define UWRITE2(sc,r,x) outw((sc)->sc_iobase + (r), (x))
-#define UWRITE4(sc,r,x) outl((sc)->sc_iobase + (r), (x))
-#define UREAD2(sc,r) inw((sc)->sc_iobase + (r))
-#define UREAD4(sc,r) inl((sc)->sc_iobase + (r))
-#endif
#define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd)
#define UHCISTS(sc) UREAD2(sc, UHCI_STS)
@@ -469,7 +466,7 @@ uhci_dumpregs(sc)
UREAD2(sc, UHCI_INTR),
UREAD2(sc, UHCI_FRNUM),
UREAD4(sc, UHCI_FLBASEADDR),
- UREAD2(sc, UHCI_SOF),
+ UREAD1(sc, UHCI_SOF),
UREAD2(sc, UHCI_PORTSC1),
UREAD2(sc, UHCI_PORTSC2));
}