Merge from NetBSD:
ohcivar.h (1.22), uhcivar.h (1.29): ============================================================ date: 2000/04/25 09:20:55; author: augustss; Move the size of the mapped bus_space region into the bus independent softc. ============================================================ ohci.c (1.88), uhci.c (1.112): ============================================================ date: 2000/04/25 14:28:13; author: augustss; Insert (very conservative!) bus_space_barrier() calls at all register accesses. The bus_space(9) man page says you've gotta have them... ============================================================
This commit is contained in:
parent
cdd493aa00
commit
3ede2e88ea
@ -199,9 +199,17 @@ Static void ohci_dump_td(ohci_soft_td_t *);
|
||||
Static void ohci_dump_ed(ohci_soft_ed_t *);
|
||||
#endif
|
||||
|
||||
#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))
|
||||
#define OBARR(sc) bus_space_barrier((sc)->iot, (sc)->ioh, 0, (sc)->sc_size, \
|
||||
BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
|
||||
#define OWRITE1(sc, r, x) \
|
||||
do { OBARR(sc); bus_space_write_1((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define OWRITE2(sc, r, x) \
|
||||
do { OBARR(sc); bus_space_write_2((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define OWRITE4(sc, r, x) \
|
||||
do { OBARR(sc); bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define OREAD1(sc, r) (OBARR(sc), bus_space_read_1((sc)->iot, (sc)->ioh, (r)))
|
||||
#define OREAD2(sc, r) (OBARR(sc), bus_space_read_2((sc)->iot, (sc)->ioh, (r)))
|
||||
#define OREAD4(sc, r) (OBARR(sc), bus_space_read_4((sc)->iot, (sc)->ioh, (r)))
|
||||
|
||||
/* Reverse the bits in a value 0 .. 31 */
|
||||
Static u_int8_t revbits[OHCI_NO_INTRS] =
|
||||
|
@ -78,6 +78,7 @@ typedef struct ohci_softc {
|
||||
struct usbd_bus sc_bus; /* base device */
|
||||
bus_space_tag_t iot;
|
||||
bus_space_handle_t ioh;
|
||||
bus_size_t sc_size;
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
void *ih;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uhci.c,v 1.109 2000/04/06 23:44:20 augustss Exp $ */
|
||||
/* $NetBSD: uhci.c,v 1.112 2000/04/25 14:28:14 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -263,12 +263,17 @@ Static void uhci_dump_ii(uhci_intr_info_t *ii);
|
||||
void uhci_dump(void);
|
||||
#endif
|
||||
|
||||
#define UWRITE1(sc, r, x) bus_space_write_1((sc)->iot, (sc)->ioh, (r), (x))
|
||||
#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))
|
||||
#define UBARR(sc) bus_space_barrier((sc)->iot, (sc)->ioh, 0, (sc)->sc_size, \
|
||||
BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
|
||||
#define UWRITE1(sc, r, x) \
|
||||
do { UBARR(sc); bus_space_write_1((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define UWRITE2(sc, r, x) \
|
||||
do { UBARR(sc); bus_space_write_2((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define UWRITE4(sc, r, x) \
|
||||
do { UBARR(sc); bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
|
||||
#define UREAD1(sc, r) (UBARR(sc), bus_space_read_1((sc)->iot, (sc)->ioh, (r)))
|
||||
#define UREAD2(sc, r) (UBARR(sc), bus_space_read_2((sc)->iot, (sc)->ioh, (r)))
|
||||
#define UREAD4(sc, r) (UBARR(sc), bus_space_read_4((sc)->iot, (sc)->ioh, (r)))
|
||||
|
||||
#define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd)
|
||||
#define UHCISTS(sc) UREAD2(sc, UHCI_STS)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uhcivar.h,v 1.28 2000/04/06 23:44:21 augustss Exp $ */
|
||||
/* $NetBSD: uhcivar.h,v 1.29 2000/04/25 09:20:55 augustss Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
@ -134,6 +134,7 @@ typedef struct uhci_softc {
|
||||
struct usbd_bus sc_bus; /* base device */
|
||||
bus_space_tag_t iot;
|
||||
bus_space_handle_t ioh;
|
||||
bus_size_t sc_size;
|
||||
#if defined(__FreeBSD__)
|
||||
void *ih;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user