Loading Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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. Loading arch/arm64/boot/dts/qcom/sdm845-usb.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; usb-core-id = <0>; }; qcom,usbbam@a704000 { Loading Loading @@ -385,6 +386,7 @@ snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; usb-core-id = <1>; }; }; Loading drivers/usb/core/hcd.c +10 −0 Original line number Diff line number Diff line Loading @@ -2291,6 +2291,16 @@ usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, return hcd->driver->get_xfer_ring_dma_addr(hcd, udev, ep); } int usb_hcd_get_controller_id(struct usb_device *udev) { struct usb_hcd *hcd = bus_to_hcd(udev->bus); if (!HCD_RH_RUNNING(hcd)) return -EINVAL; return hcd->driver->get_core_id(hcd); } #ifdef CONFIG_PM int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) Loading drivers/usb/core/usb.c +9 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,15 @@ dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, } EXPORT_SYMBOL(usb_get_xfer_ring_dma_addr); int usb_get_controller_id(struct usb_device *dev) { if (dev->state == USB_STATE_NOTATTACHED) return -EINVAL; return usb_hcd_get_controller_id(dev); } EXPORT_SYMBOL(usb_get_controller_id); /*-------------------------------------------------------------------*/ /* * __usb_get_extra_descriptor() finds a descriptor of specific type in the Loading drivers/usb/host/xhci-plat.c +3 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
Documentation/devicetree/bindings/usb/dwc3.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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. Loading
arch/arm64/boot/dts/qcom/sdm845-usb.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; usb-core-id = <0>; }; qcom,usbbam@a704000 { Loading Loading @@ -385,6 +386,7 @@ snps,disable-clk-gating; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; usb-core-id = <1>; }; }; Loading
drivers/usb/core/hcd.c +10 −0 Original line number Diff line number Diff line Loading @@ -2291,6 +2291,16 @@ usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, return hcd->driver->get_xfer_ring_dma_addr(hcd, udev, ep); } int usb_hcd_get_controller_id(struct usb_device *udev) { struct usb_hcd *hcd = bus_to_hcd(udev->bus); if (!HCD_RH_RUNNING(hcd)) return -EINVAL; return hcd->driver->get_core_id(hcd); } #ifdef CONFIG_PM int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) Loading
drivers/usb/core/usb.c +9 −0 Original line number Diff line number Diff line Loading @@ -735,6 +735,15 @@ dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, } EXPORT_SYMBOL(usb_get_xfer_ring_dma_addr); int usb_get_controller_id(struct usb_device *dev) { if (dev->state == USB_STATE_NOTATTACHED) return -EINVAL; return usb_hcd_get_controller_id(dev); } EXPORT_SYMBOL(usb_get_controller_id); /*-------------------------------------------------------------------*/ /* * __usb_get_extra_descriptor() finds a descriptor of specific type in the Loading
drivers/usb/host/xhci-plat.c +3 −0 Original line number Diff line number Diff line Loading @@ -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); Loading