diff options
author | Manu Gautam <mgautam@codeaurora.org> | 2016-06-24 12:30:37 +0530 |
---|---|---|
committer | Vamsi Krishna Samavedam <vskrishn@codeaurora.org> | 2017-02-02 14:20:44 -0800 |
commit | a4f63f1693dd85a9e597cdb8466c78fe658db14b (patch) | |
tree | a1ff2ff2dd4bba4797c911908eb19d8844c32e89 /drivers/usb/dwc3 | |
parent | af883d4db0b398542bb561808a11019f0998d129 (diff) |
usb: xhci-plat: Add DT parameter to program xhci imod_interval
XHCI allows interrupt moderation using imod_interval at 250ns
increments. Add DT parameter to specify this imod_value for
targets mainly with single CPU to reduce CPU interrupt loads.
This allows better balance between CPU usage and performance.
CRs-fixed: 1019219
Change-Id: Id479c162da6492caff4dd83de4054fee63b6abc5
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/host.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index d03678a02185..7f1ae5cf9909 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -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) { @@ -52,6 +53,11 @@ int dwc3_host_init(struct dwc3 *dwc) pdata.usb3_lpm_capable = dwc->usb3_lpm_capable; + 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) { dev_err(dwc->dev, "couldn't add platform data to xHCI device\n"); |