diff options
author | Vardan Mikayelyan <mvardan@synopsys.com> | 2018-02-16 14:07:05 +0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-13 10:47:53 +0200 |
commit | 631a23108c1a90b726ca99f1f90d48a91737f43d (patch) | |
tree | 3df2b6540e9f176dc39e7039038ead534be0de2d /drivers/usb/dwc2/core.h | |
parent | 41ba9b9b95beb8bb101a40c6badbbe49da6af9cd (diff) | |
download | kernel_replicant_linux-631a23108c1a90b726ca99f1f90d48a91737f43d.tar.gz kernel_replicant_linux-631a23108c1a90b726ca99f1f90d48a91737f43d.tar.bz2 kernel_replicant_linux-631a23108c1a90b726ca99f1f90d48a91737f43d.zip |
usb: dwc2: Add hibernation field into dwc2_hw_params
Add parameter and it's initialization, needed for hibernation.
Reimplement dwc2_set_param_power_down() to support hibernation too.
Now 'power_down' parameter can be initialized with 0, 1 or 2.
0 - No
1 - Partial power down
2 - Hibernation
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>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r-- | drivers/usb/dwc2/core.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index eaf055e6ce9b..386a03056763 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -426,7 +426,8 @@ enum dwc2_ep0_state { * power_down in both peripheral and host mode when * needed. * 0 - No (default) - * 1 - Yes + * 1 - Partial power down + * 2 - Hibernation * @lpm: Enable LPM support. * 0 - No * 1 - Yes @@ -498,7 +499,12 @@ struct dwc2_core_params { bool reload_ctl; bool uframe_sched; bool external_id_pin_ctl; - bool power_down; + + int power_down; +#define DWC2_POWER_DOWN_PARAM_NONE 0 +#define DWC2_POWER_DOWN_PARAM_PARTIAL 1 +#define DWC2_POWER_DOWN_PARAM_HIBERNATION 2 + bool lpm; bool lpm_clock_gating; bool besl; @@ -579,6 +585,7 @@ struct dwc2_core_params { * 2 - FS pins shared with UTMI+ pins * 3 - FS pins shared with ULPI pins * @total_fifo_size: Total internal RAM for FIFOs (bytes) + * @hibernation Is hibernation enabled? * @utmi_phy_data_width UTMI+ PHY data width * 0 - 8 bits * 1 - 16 bits @@ -612,6 +619,7 @@ struct dwc2_hw_params { unsigned num_dev_perio_in_ep:4; unsigned total_fifo_size:16; unsigned power_optimized:1; + unsigned hibernation:1; unsigned utmi_phy_data_width:2; unsigned lpm_mode:1; u32 snpsid; |