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

Commit e7113fbc authored by Hemant Kumar's avatar Hemant Kumar
Browse files

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: default avatarHemant Kumar <hemantk@codeaurora.org>
parent c70d827b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ Optional properties:
	gating. Default it is enabled.
 - snps,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.

+3 −0
Original line number Diff line number Diff line
@@ -316,6 +316,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
	if (device_property_read_u32(sysdev, "snps,xhci-imod-value", &imod))
		imod = 0;

	if (device_property_read_u32(sysdev, "usb-core-id", &xhci->core_id))
		xhci->core_id = -EINVAL;

	hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0);
	if (IS_ERR(hcd->usb_phy)) {
		ret = PTR_ERR(hcd->usb_phy);
+2 −0
Original line number Diff line number Diff line
@@ -1538,6 +1538,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;