usb: host: Add support for usb core indexing

Unique usb core id is used to differentiate between
different usb controllers.

Change-Id: Ibd886f704e7ecedfbf035b8e5adea2852ddf25bf
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2017-08-18 16:40:58 -07:00 committed by Ajay Agarwal
parent d33ed6b2cc
commit 03a86f5cb1
3 changed files with 7 additions and 0 deletions

View file

@ -61,6 +61,7 @@ Optional properties:
- snps,num-gsi-evt-buffs: If present, specifies number of GSI based hardware accelerated event buffers.
1 event buffer is needed per h/w accelerated endpoint.
- xhci-imod-value: Interrupt moderation interval for host mode (in increments of 250nsec).
- usb-core-id: Differentiates between different controllers present on a device.
This is usually a subnode to DWC3 glue to which it is connected.

View file

@ -233,6 +233,10 @@ static int xhci_plat_probe(struct platform_device *pdev)
hcd_to_bus(xhci->shared_hcd)->skip_resume = true;
if (device_property_read_u32(pdev->dev.parent, "usb-core-id",
&xhci->core_id))
xhci->core_id = -EINVAL;
hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0);
if (IS_ERR(hcd->usb_phy)) {
ret = PTR_ERR(hcd->usb_phy);

View file

@ -1519,6 +1519,8 @@ struct xhci_hcd {
/* secondary interrupter */
struct xhci_intr_reg __iomem **sec_ir_set;
int core_id;
/* Cached register copies of read-only HC data */
__u32 hcs_params1;
__u32 hcs_params2;