summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/core.h
diff options
context:
space:
mode:
authorJohn Youn <John.Youn@synopsys.com>2015-12-17 11:17:31 -0800
committerFelipe Balbi <balbi@ti.com>2015-12-22 12:00:51 -0600
commit55e1040e424b59063da627fb580ec953f4c01de7 (patch)
tree3932f964fcb76a9924d640053ce47f8009c408ff /drivers/usb/dwc2/core.h
parent09c96980dc723462ed2eeacc945fed5bcb278f85 (diff)
downloadlinux-rt-55e1040e424b59063da627fb580ec953f4c01de7.tar.gz
usb: dwc2: Improve handling of host and device hwparams
Adds separate functions to get the host and device specific hardware parameters. The functions check whether the parameters need to be read at all, depending on dr_mode, and forces the mode only if necessary. This saves some delays during probe. This also adds two device mode parameters that will be used by the gadget. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r--drivers/usb/dwc2/core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index efdbe455697f..7fb6434f4639 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -459,6 +459,7 @@ struct dwc2_core_params {
* 1 - 16 bits
* 2 - 8 or 16 bits
* @snpsid: Value from SNPSID register
+ * @dev_ep_dirs: Direction of device endpoints (GHWCFG1)
*/
struct dwc2_hw_params {
unsigned op_mode:3;
@@ -469,6 +470,7 @@ struct dwc2_hw_params {
unsigned en_multiple_tx_fifo:1;
unsigned host_rx_fifo_size:16;
unsigned host_nperio_tx_fifo_size:16;
+ unsigned dev_nperio_tx_fifo_size:16;
unsigned host_perio_tx_fifo_size:16;
unsigned nperio_tx_q_depth:3;
unsigned host_perio_tx_q_depth:3;
@@ -485,6 +487,7 @@ struct dwc2_hw_params {
unsigned power_optimized:1;
unsigned utmi_phy_data_width:2;
u32 snpsid;
+ u32 dev_ep_dirs;
};
/* Size of control and EP0 buffers */