[03/11] usb: dwc3: add 'saved_state' field to dwc3_ep structure

Message ID 1393357243-2958-4-git-send-email-balbi@ti.com
State Accepted
Commit 4cfcf876767ab845e1db0c0b2671db27b1a3586c
Headers show

Commit Message

Felipe Balbi Feb. 25, 2014, 7:40 p.m.
From: Paul Zimmerman <Paul.Zimmerman@synopsys.com>

This extra field will save endpoint state when we're
about to enter hibernation. It will be used later
to restore the endpoint state when resuming.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/core.h | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 7737a57..43fe290 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -393,6 +393,7 @@  struct dwc3_event_buffer {
  * @busy_slot: first slot which is owned by HW
  * @desc: usb_endpoint_descriptor pointer
  * @dwc: pointer to DWC controller
+ * @saved_state: ep state saved during hibernation
  * @flags: endpoint flags (wedged, stalled, ...)
  * @current_trb: index of current used trb
  * @number: endpoint number (1 - 15)
@@ -415,6 +416,7 @@  struct dwc3_ep {
 	const struct usb_ss_ep_comp_descriptor *comp_desc;
 	struct dwc3		*dwc;
 
+	u32			saved_state;
 	unsigned		flags;
 #define DWC3_EP_ENABLED		(1 << 0)
 #define DWC3_EP_STALL		(1 << 1)