Loading Documentation/devicetree/bindings/usb/dwc3.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ Optional properties: - snps,num-normal-evt-buffs: If present, specifies number of normal event buffers. Default is 1. - 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). This is usually a subnode to DWC3 glue to which it is connected. Loading @@ -39,4 +40,5 @@ dwc3@4a030000 { tx-fifo-resize; snps,usb3-u1u2-disable; snps,num-gsi-evt-buffs = <0x2>; xhci-imod-value = <4000>; }; arch/arm/boot/dts/qcom/mdm9640.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,7 @@ snps,lpm-nyet-threshold = /bits/ 8 <0x8>; snps,bus-suspend-enable; snps,usb3-u1u2-disable; xhci-imod-value = <4000>; }; qcom,usbbam@8b04000 { Loading arch/arm/boot/dts/qcom/mdmcalifornium-usb.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ snps,bus-suspend-enable; snps,usb3-u1u2-disable; snps,num-gsi-evt-buffs = <0x3>; xhci-imod-value = <4000>; }; qcom,usbbam@0x8B04000 { Loading drivers/usb/dwc3/host.c +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ int dwc3_host_init(struct dwc3 *dwc) struct platform_device *xhci; struct usb_xhci_pdata pdata; int ret; struct device_node *node = dwc->dev->of_node; xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); if (!xhci) { Loading Loading @@ -53,6 +54,10 @@ int dwc3_host_init(struct dwc3 *dwc) #ifdef CONFIG_DWC3_HOST_USB3_LPM_ENABLE pdata.usb3_lpm_capable = 1; #endif ret = of_property_read_u32(node, "xhci-imod-value", &pdata.imod_interval); if (ret) pdata.imod_interval = 0; /* use default xhci.c value */ ret = platform_device_add_data(xhci, &pdata, sizeof(pdata)); if (ret) { Loading drivers/usb/host/xhci-plat.c +14 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,8 @@ static int xhci_plat_probe(struct platform_device *pdev) struct clk *clk; int ret; int irq; u32 temp, imod; unsigned long flags; if (usb_disabled()) return -ENODEV; Loading Loading @@ -231,6 +233,18 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; /* override imod interval if specified */ if (pdata && pdata->imod_interval) { imod = pdata->imod_interval & ER_IRQ_INTERVAL_MASK; spin_lock_irqsave(&xhci->lock, flags); temp = readl_relaxed(&xhci->ir_set->irq_control); temp &= ~ER_IRQ_INTERVAL_MASK; temp |= imod; writel_relaxed(temp, &xhci->ir_set->irq_control); spin_unlock_irqrestore(&xhci->lock, flags); dev_dbg(&pdev->dev, "%s: imod set to %u\n", __func__, imod); } ret = device_create_file(&pdev->dev, &dev_attr_config_imod); if (ret) dev_err(&pdev->dev, "%s: unable to create imod sysfs entry\n", Loading Loading
Documentation/devicetree/bindings/usb/dwc3.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ Optional properties: - snps,num-normal-evt-buffs: If present, specifies number of normal event buffers. Default is 1. - 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). This is usually a subnode to DWC3 glue to which it is connected. Loading @@ -39,4 +40,5 @@ dwc3@4a030000 { tx-fifo-resize; snps,usb3-u1u2-disable; snps,num-gsi-evt-buffs = <0x2>; xhci-imod-value = <4000>; };
arch/arm/boot/dts/qcom/mdm9640.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1082,6 +1082,7 @@ snps,lpm-nyet-threshold = /bits/ 8 <0x8>; snps,bus-suspend-enable; snps,usb3-u1u2-disable; xhci-imod-value = <4000>; }; qcom,usbbam@8b04000 { Loading
arch/arm/boot/dts/qcom/mdmcalifornium-usb.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ snps,bus-suspend-enable; snps,usb3-u1u2-disable; snps,num-gsi-evt-buffs = <0x3>; xhci-imod-value = <4000>; }; qcom,usbbam@0x8B04000 { Loading
drivers/usb/dwc3/host.c +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ int dwc3_host_init(struct dwc3 *dwc) struct platform_device *xhci; struct usb_xhci_pdata pdata; int ret; struct device_node *node = dwc->dev->of_node; xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); if (!xhci) { Loading Loading @@ -53,6 +54,10 @@ int dwc3_host_init(struct dwc3 *dwc) #ifdef CONFIG_DWC3_HOST_USB3_LPM_ENABLE pdata.usb3_lpm_capable = 1; #endif ret = of_property_read_u32(node, "xhci-imod-value", &pdata.imod_interval); if (ret) pdata.imod_interval = 0; /* use default xhci.c value */ ret = platform_device_add_data(xhci, &pdata, sizeof(pdata)); if (ret) { Loading
drivers/usb/host/xhci-plat.c +14 −0 Original line number Diff line number Diff line Loading @@ -129,6 +129,8 @@ static int xhci_plat_probe(struct platform_device *pdev) struct clk *clk; int ret; int irq; u32 temp, imod; unsigned long flags; if (usb_disabled()) return -ENODEV; Loading Loading @@ -231,6 +233,18 @@ static int xhci_plat_probe(struct platform_device *pdev) if (ret) goto put_usb3_hcd; /* override imod interval if specified */ if (pdata && pdata->imod_interval) { imod = pdata->imod_interval & ER_IRQ_INTERVAL_MASK; spin_lock_irqsave(&xhci->lock, flags); temp = readl_relaxed(&xhci->ir_set->irq_control); temp &= ~ER_IRQ_INTERVAL_MASK; temp |= imod; writel_relaxed(temp, &xhci->ir_set->irq_control); spin_unlock_irqrestore(&xhci->lock, flags); dev_dbg(&pdev->dev, "%s: imod set to %u\n", __func__, imod); } ret = device_create_file(&pdev->dev, &dev_attr_config_imod); if (ret) dev_err(&pdev->dev, "%s: unable to create imod sysfs entry\n", Loading