summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2014-10-31 11:11:18 +0800
committerFelipe Balbi <balbi@ti.com>2014-11-03 10:03:41 -0600
commit460d098cb6728134e0e4ba3d58e10bb43032daa5 (patch)
treefbdd6c3e61e7b5000c8574b9927c614004829574 /drivers/usb/dwc3/gadget.c
parent9755449d568b3c2745fc9c7075a7d7833c4528bd (diff)
usb: dwc3: make HIRD threshold configurable
HIRD threshold should be configurable by different platforms. From DesignWare databook: When HIRD_Threshold[4] is set to 1b1 and HIRD value is greater than or equal to the value in HIRD_Threshold[3:0], dwc3 asserts output signals utmi_l1_suspend_n to put PHY into Deep Low-Power mode in L1. When HIRD_Threshold[4] is set to 1b0 or the HIRD value is less than HIRD_Threshold[3:0], dwc3 asserts output signals utmi_sleep_n on L1. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 88a065f61150..398c12f5efe3 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2295,11 +2295,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
reg &= ~(DWC3_DCTL_HIRD_THRES_MASK | DWC3_DCTL_L1_HIBER_EN);
- /*
- * TODO: This should be configurable. For now using
- * maximum allowed HIRD threshold value of 0b1100
- */
- reg |= DWC3_DCTL_HIRD_THRES(12);
+ reg |= DWC3_DCTL_HIRD_THRES(dwc->hird_threshold);
/*
* When dwc3 revisions >= 2.40a, LPM Erratum is enabled and