PERFORCE change 181570 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jul 29 17:59:16 UTC 2010
http://p4web.freebsd.org/@@181570?ac=10
Change 181570 by hselasky at hselasky_laptop001 on 2010/07/29 17:58:57
USB controller:
- add XHCI register access wrappers
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/controller/xhcireg.h#2 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/controller/xhcireg.h#2 (text+ko) ====
@@ -180,4 +180,24 @@
#define XHCI_DB_SID_GET(x) (((x) >> 16) & 0xFFFF) /* RW - doorbell stream ID */
#define XHCI_DB_SID_SET(x) (((x) & 0xFFFF) << 16) /* RW - doorbell stream ID */
+/* XHCI register R/W wrappers */
+#define XREAD1(sc, what, a) \
+ bus_space_read_1((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off)
+#define XREAD2(sc, what, a) \
+ bus_space_read_2((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off)
+#define XREAD4(sc, what, a) \
+ bus_space_read_4((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off)
+#define XWRITE1(sc, what, a, x) \
+ bus_space_write_1((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off, (x))
+#define XWRITE2(sc, what, a, x) \
+ bus_space_write_2((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off, (x))
+#define XWRITE4(sc, what, a, x) \
+ bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, \
+ (a) + (sc)->sc_##what##_off, (x))
+
#endif /* _XHCIREG_H_ */
More information about the p4-projects
mailing list