diff options
| author | Hemant Kumar <hemantk@codeaurora.org> | 2017-08-18 16:59:33 -0700 |
|---|---|---|
| committer | Ajay Agarwal <ajaya@codeaurora.org> | 2017-11-24 14:50:23 +0530 |
| commit | 97618148cec392dd81aedbef03504c90b5ddaf26 (patch) | |
| tree | 022b30bb0615bbfd1c37cf5e52aedb5692576f14 /drivers/usb | |
| parent | c611d78437adeb9299d8be3f7be78b9c153152e5 (diff) | |
usb: host: xhci: Add helper function to return controller id
Function provides controller id used by a remote entity
to identify which usb controller to program to initiate
data transfer.
Change-Id: Ie700363c1a4a19aeb6b51305c97298f3b4d6e387
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/host/xhci.c | 8 | ||||
| -rw-r--r-- | drivers/usb/host/xhci.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 641e0280ad5a..be9258c6efda 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5031,6 +5031,13 @@ dma_addr_t xhci_get_xfer_ring_dma_addr(struct usb_hcd *hcd, return 0; } +int xhci_get_core_id(struct usb_hcd *hcd) +{ + struct xhci_hcd *xhci = hcd_to_xhci(hcd); + + return xhci->core_id; +} + static const struct hc_driver xhci_hc_driver = { .description = "xhci-hcd", .product_desc = "xHCI Host Controller", @@ -5095,6 +5102,7 @@ static const struct hc_driver xhci_hc_driver = { .get_sec_event_ring_dma_addr = xhci_get_sec_event_ring_dma_addr, .get_xfer_ring_dma_addr = xhci_get_xfer_ring_dma_addr, .get_dcba_dma_addr = xhci_get_dcba_dma_addr, + .get_core_id = xhci_get_core_id, }; void xhci_init_driver(struct hc_driver *drv, diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index f583cefecee0..ac637dc6e3cc 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1948,6 +1948,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength); int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1); +int xhci_get_core_id(struct usb_hcd *hcd); #ifdef CONFIG_PM int xhci_bus_suspend(struct usb_hcd *hcd); |
