Explorar o código

usb: dwc2: core: Add hibernated flag

Added a flag to indicate that core is in hibernation,
it is used to determine the hibernation state of the core.

Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Vardan Mikayelyan %!s(int64=7) %!d(string=hai) anos
pai
achega
20fe440982
Modificáronse 2 ficheiros con 3 adicións e 0 borrados
  1. 2 0
      drivers/usb/dwc2/core.h
  2. 1 0
      drivers/usb/dwc2/platform.c

+ 2 - 0
drivers/usb/dwc2/core.h

@@ -810,6 +810,7 @@ struct dwc2_hregs_backup {
  * @hcd_enabled		Host mode sub-driver initialization indicator.
  * @hcd_enabled		Host mode sub-driver initialization indicator.
  * @gadget_enabled	Peripheral mode sub-driver initialization indicator.
  * @gadget_enabled	Peripheral mode sub-driver initialization indicator.
  * @ll_hw_enabled	Status of low-level hardware resources.
  * @ll_hw_enabled	Status of low-level hardware resources.
+ * @hibernated:		True if core is hibernated
  * @phy:                The otg phy transceiver structure for phy control.
  * @phy:                The otg phy transceiver structure for phy control.
  * @uphy:               The otg phy transceiver structure for old USB phy
  * @uphy:               The otg phy transceiver structure for old USB phy
  *                      control.
  *                      control.
@@ -947,6 +948,7 @@ struct dwc2_hsotg {
 	unsigned int hcd_enabled:1;
 	unsigned int hcd_enabled:1;
 	unsigned int gadget_enabled:1;
 	unsigned int gadget_enabled:1;
 	unsigned int ll_hw_enabled:1;
 	unsigned int ll_hw_enabled:1;
+	unsigned int hibernated:1;
 
 
 	struct phy *phy;
 	struct phy *phy;
 	struct usb_phy *uphy;
 	struct usb_phy *uphy;

+ 1 - 0
drivers/usb/dwc2/platform.c

@@ -458,6 +458,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	}
 	}
 
 
 	platform_set_drvdata(dev, hsotg);
 	platform_set_drvdata(dev, hsotg);
+	hsotg->hibernated = 0;
 
 
 	dwc2_debugfs_init(hsotg);
 	dwc2_debugfs_init(hsotg);