Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e596c5f authored by Hemant Kumar's avatar Hemant Kumar
Browse files

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: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent f906c280
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5164,6 +5164,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",
@@ -5229,6 +5236,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,
+1 −0
Original line number Diff line number Diff line
@@ -2121,6 +2121,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1);
struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);

void xhci_hc_died(struct xhci_hcd *xhci);
int xhci_get_core_id(struct usb_hcd *hcd);

#ifdef CONFIG_PM
int xhci_bus_suspend(struct usb_hcd *hcd);