summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMayank Rana <mrana@codeaurora.org>2014-02-13 20:04:03 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:12 -0700
commit0e58b939fb33bc32f855e4e196d11f0fe1733a8b (patch)
tree573b2fd80882ca153d6433b74dccae29b1f07235
parent692988089f25921a6dcb99580613cc2367030474 (diff)
usb: dwc3: gadget: Introduce endless endpoints
There are 3 different transport used for BAM communication and each BAM pipe can be BAM2BAM or SYS2BAM configuration. Currently all different per endpoint related interrupts/events are enabled with USB controller for this configuration. Hence although data transfer is happening through BAM hardware accerlation path, APPS is receiving interrupt for each completion from USB controller. This change binds property with each endpoint if it is being used in BAM2BAM mode, and enables required interrupts with USB controller. This significantly reduces number of interrupts received on APPS with keeping CPU idle in all tethered calls. Change-Id: I0185606f93996bf7a8c3f9451950b7c4cf9e21c7 Signed-off-by: Mayank Rana <mrana@codeaurora.org> [jackp@codeaurora.org: renamed subject, omitted u_bam.c and u_bam_data.c] Signed-off-by: Jack Pham <jackp@codeaurora.org>
-rw-r--r--drivers/usb/dwc3/gadget.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index a58376fd65fe..35905a26d712 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -438,8 +438,15 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
params.param2 |= dep->saved_state;
}
- params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
- | DWC3_DEPCFG_XFER_NOT_READY_EN;
+ if (!dep->endpoint.endless) {
+ pr_debug("%s(): enable xfer_complete_int for %s\n",
+ __func__, dep->endpoint.name);
+ params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
+ | DWC3_DEPCFG_XFER_NOT_READY_EN;
+ } else {
+ pr_debug("%s(): disable xfer_complete_int for %s\n",
+ __func__, dep->endpoint.name);
+ }
if (usb_ss_max_streams(comp_desc) && usb_endpoint_xfer_bulk(desc)) {
params.param1 |= DWC3_DEPCFG_STREAM_CAPABLE