diff options
| author | Hemant Kumar <hemantk@codeaurora.org> | 2016-03-22 19:34:20 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-06 15:43:05 -0700 |
| commit | acb4a107998491e4bd0444a4f0d41dadecb50652 (patch) | |
| tree | 257f95572f3d9745c8142b81177580e37549bfa1 /include | |
| parent | 350d4585e11dc47728ce050e695c14cb7e14fca9 (diff) | |
usb: xhci: Add helper APIs to return xhci dma addresses
dma address of secondary event ring, transfer ring and
device context base address are required to pass to
remote entity. Remote entity uses these addresses to
program xhci controller registers.
Change-Id: Ie0756d646a396a11b41b93e886bca9aff636ee5d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/usb.h | 7 | ||||
| -rw-r--r-- | include/linux/usb/hcd.h | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index a2e367de268d..246945be000c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -739,6 +739,13 @@ extern int usb_sec_event_ring_setup(struct usb_device *dev, extern int usb_sec_event_ring_cleanup(struct usb_device *dev, unsigned intr_num); +extern dma_addr_t +usb_get_sec_event_ring_dma_addr(struct usb_device *dev, + unsigned intr_num); +extern dma_addr_t usb_get_dcba_dma_addr(struct usb_device *dev); +extern dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, + struct usb_host_endpoint *ep); + /* Sets up a group of bulk endpoints to support multiple stream IDs. */ extern int usb_alloc_streams(struct usb_interface *interface, struct usb_host_endpoint **eps, unsigned int num_eps, diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 56c7fba6dcdf..3740366d9fc5 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -398,6 +398,12 @@ struct hc_driver { int (*sec_event_ring_setup)(struct usb_hcd *hcd, unsigned intr_num); int (*sec_event_ring_cleanup)(struct usb_hcd *hcd, unsigned intr_num); + dma_addr_t (*get_sec_event_ring_dma_addr)(struct usb_hcd *hcd, + unsigned intr_num); + dma_addr_t (*get_xfer_ring_dma_addr)(struct usb_hcd *hcd, + struct usb_device *udev, struct usb_host_endpoint *ep); + dma_addr_t (*get_dcba_dma_addr)(struct usb_hcd *hcd, + struct usb_device *udev); }; static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) @@ -440,6 +446,13 @@ extern int usb_hcd_sec_event_ring_setup(struct usb_device *udev, unsigned intr_num); extern int usb_hcd_sec_event_ring_cleanup(struct usb_device *udev, unsigned intr_num); +extern dma_addr_t +usb_hcd_get_sec_event_ring_dma_addr(struct usb_device *udev, + unsigned intr_num); +extern dma_addr_t usb_hcd_get_dcba_dma_addr(struct usb_device *udev); +extern dma_addr_t +usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, + struct usb_host_endpoint *ep); extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, struct device *dev, const char *bus_name); |
