aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/ohci.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-04-16 21:22:55 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-04-16 21:22:55 +0000
commit6182fdbda82d66e069d86382987606cbba1972b1 (patch)
tree8b86f578632961e1cd2aed57a2be13d993257d35 /sys/dev/usb/ohci.c
parent24c38be4da1f835f2125da7d5fa3632bc028131d (diff)
downloadsrc-6182fdbda82d66e069d86382987606cbba1972b1.tar.gz
src-6182fdbda82d66e069d86382987606cbba1972b1.zip
Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
Notes
Notes: svn path=/head/; revision=45720
Diffstat (limited to 'sys/dev/usb/ohci.c')
-rw-r--r--sys/dev/usb/ohci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 334a998aa277..b97fee07909e 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -59,6 +59,10 @@
#include <sys/queue.h>
#include <sys/select.h>
+#ifdef __FreeBSD__
+#include <machine/bus_pio.h>
+#include <machine/bus_memio.h>
+#endif
#include <machine/bus.h>
#include <machine/endian.h>
@@ -162,15 +166,9 @@ void ohci_dump_td __P((ohci_soft_td_t *));
void ohci_dump_ed __P((ohci_soft_ed_t *));
#endif
-#if defined(__NetBSD__)
#define OWRITE4(sc, r, x) bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x))
#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) *(u_int32_t *) ((sc)->sc_iobase + (r)) = x
-#define OREAD4(sc, r) (*(u_int32_t *) ((sc)->sc_iobase + (r)))
-#define OREAD2(sc, r) (*(u_int16_t *) ((sc)->sc_iobase + (r)))
-#endif
/* Reverse the bits in a value 0 .. 31 */
static u_int8_t revbits[OHCI_NO_INTRS] =