aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-08-30 12:45:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-30 17:14:54 -0400
commit91121c103ae93ef117e58712786864270d7f488e (patch)
tree413a8c3a9b4af2d5d74a630eee98afd54b6d2218
parentde4a1931939891db633fbc3c33e953dd58f94294 (diff)
staging: dwc2: make dwc2_core_params documentation more complete
Some of the defaults were missing or unclear. In particular, I suspect the defaults were documented assuming there were still module parameters and taking the default module parameters into account. Now, the defaults are the values that will get chosen when the params passed to dwc2_hcd_init are all -1. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/dwc2/core.h85
1 files changed, 59 insertions, 26 deletions
diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h
index ecfcad83f767..9102f66d0111 100644
--- a/drivers/staging/dwc2/core.h
+++ b/drivers/staging/dwc2/core.h
@@ -68,19 +68,18 @@ enum dwc2_lx_state {
68/** 68/**
69 * struct dwc2_core_params - Parameters for configuring the core 69 * struct dwc2_core_params - Parameters for configuring the core
70 * 70 *
71 * @otg_cap: Specifies the OTG capabilities. The driver will 71 * @otg_cap: Specifies the OTG capabilities.
72 * automatically detect the value for this parameter if 72 * 0 - HNP and SRP capable
73 * none is specified.
74 * 0 - HNP and SRP capable (default)
75 * 1 - SRP Only capable 73 * 1 - SRP Only capable
76 * 2 - No HNP/SRP capable 74 * 2 - No HNP/SRP capable (always available)
75 * Defaults to best available option (0, 1, then 2)
77 * @otg_ver: OTG version supported 76 * @otg_ver: OTG version supported
78 * 0 - 1.3 77 * 0 - 1.3 (default)
79 * 1 - 2.0 78 * 1 - 2.0
80 * @dma_enable: Specifies whether to use slave or DMA mode for accessing 79 * @dma_enable: Specifies whether to use slave or DMA mode for accessing
81 * the data FIFOs. The driver will automatically detect the 80 * the data FIFOs. The driver will automatically detect the
82 * value for this parameter if none is specified. 81 * value for this parameter if none is specified.
83 * 0 - Slave 82 * 0 - Slave (always available)
84 * 1 - DMA (default, if available) 83 * 1 - DMA (default, if available)
85 * @dma_desc_enable: When DMA mode is enabled, specifies whether to use 84 * @dma_desc_enable: When DMA mode is enabled, specifies whether to use
86 * address DMA mode or descriptor DMA mode for accessing 85 * address DMA mode or descriptor DMA mode for accessing
@@ -91,29 +90,47 @@ enum dwc2_lx_state {
91 * @speed: Specifies the maximum speed of operation in host and 90 * @speed: Specifies the maximum speed of operation in host and
92 * device mode. The actual speed depends on the speed of 91 * device mode. The actual speed depends on the speed of
93 * the attached device and the value of phy_type. 92 * the attached device and the value of phy_type.
94 * 0 - High Speed (default) 93 * 0 - High Speed
94 * (default when phy_type is UTMI+ or ULPI)
95 * 1 - Full Speed 95 * 1 - Full Speed
96 * (default when phy_type is Full Speed)
96 * @enable_dynamic_fifo: 0 - Use coreConsultant-specified FIFO size parameters 97 * @enable_dynamic_fifo: 0 - Use coreConsultant-specified FIFO size parameters
97 * 1 - Allow dynamic FIFO sizing (default) 98 * 1 - Allow dynamic FIFO sizing (default, if available)
98 * @en_multiple_tx_fifo: Specifies whether dedicated per-endpoint transmit FIFOs 99 * @en_multiple_tx_fifo: Specifies whether dedicated per-endpoint transmit FIFOs
99 * are enabled 100 * are enabled
100 * @host_rx_fifo_size: Number of 4-byte words in the Rx FIFO in host mode when 101 * @host_rx_fifo_size: Number of 4-byte words in the Rx FIFO in host mode when
101 * dynamic FIFO sizing is enabled 102 * dynamic FIFO sizing is enabled
102 * 16 to 32768 (default 1024) 103 * 16 to 32768
104 * Actual maximum value is autodetected and also
105 * the default.
103 * @host_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO 106 * @host_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO
104 * in host mode when dynamic FIFO sizing is enabled 107 * in host mode when dynamic FIFO sizing is enabled
105 * 16 to 32768 (default 1024) 108 * 16 to 32768
109 * Actual maximum value is autodetected and also
110 * the default.
106 * @host_perio_tx_fifo_size: Number of 4-byte words in the periodic Tx FIFO in 111 * @host_perio_tx_fifo_size: Number of 4-byte words in the periodic Tx FIFO in
107 * host mode when dynamic FIFO sizing is enabled 112 * host mode when dynamic FIFO sizing is enabled
108 * 16 to 32768 (default 1024) 113 * 16 to 32768
114 * Actual maximum value is autodetected and also
115 * the default.
109 * @max_transfer_size: The maximum transfer size supported, in bytes 116 * @max_transfer_size: The maximum transfer size supported, in bytes
110 * 2047 to 65,535 (default 65,535) 117 * 2047 to 65,535
118 * Actual maximum value is autodetected and also
119 * the default.
111 * @max_packet_count: The maximum number of packets in a transfer 120 * @max_packet_count: The maximum number of packets in a transfer
112 * 15 to 511 (default 511) 121 * 15 to 511
122 * Actual maximum value is autodetected and also
123 * the default.
113 * @host_channels: The number of host channel registers to use 124 * @host_channels: The number of host channel registers to use
114 * 1 to 16 (default 12) 125 * 1 to 16
126 * Actual maximum value is autodetected and also
127 * the default.
115 * @phy_type: Specifies the type of PHY interface to use. By default, 128 * @phy_type: Specifies the type of PHY interface to use. By default,
116 * the driver will automatically detect the phy_type. 129 * the driver will automatically detect the phy_type.
130 * 0 - Full Speed Phy
131 * 1 - UTMI+ Phy
132 * 2 - ULPI Phy
133 * Defaults to best available option (2, 1, then 0)
117 * @phy_utmi_width: Specifies the UTMI+ Data Width (in bits). This parameter 134 * @phy_utmi_width: Specifies the UTMI+ Data Width (in bits). This parameter
118 * is applicable for a phy_type of UTMI+ or ULPI. (For a 135 * is applicable for a phy_type of UTMI+ or ULPI. (For a
119 * ULPI phy_type, this parameter indicates the data width 136 * ULPI phy_type, this parameter indicates the data width
@@ -122,7 +139,7 @@ enum dwc2_lx_state {
122 * parameter was set to "8 and 16 bits", meaning that the 139 * parameter was set to "8 and 16 bits", meaning that the
123 * core has been configured to work at either data path 140 * core has been configured to work at either data path
124 * width. 141 * width.
125 * 8 or 16 (default 16) 142 * 8 or 16 (default 16 if available)
126 * @phy_ulpi_ddr: Specifies whether the ULPI operates at double or single 143 * @phy_ulpi_ddr: Specifies whether the ULPI operates at double or single
127 * data rate. This parameter is only applicable if phy_type 144 * data rate. This parameter is only applicable if phy_type
128 * is ULPI. 145 * is ULPI.
@@ -132,35 +149,51 @@ enum dwc2_lx_state {
132 * data bus 149 * data bus
133 * @phy_ulpi_ext_vbus: For a ULPI phy, specifies whether to use the internal or 150 * @phy_ulpi_ext_vbus: For a ULPI phy, specifies whether to use the internal or
134 * external supply to drive the VBus 151 * external supply to drive the VBus
152 * 0 - Internal supply (default)
153 * 1 - External supply
135 * @i2c_enable: Specifies whether to use the I2Cinterface for a full 154 * @i2c_enable: Specifies whether to use the I2Cinterface for a full
136 * speed PHY. This parameter is only applicable if phy_type 155 * speed PHY. This parameter is only applicable if phy_type
137 * is FS. 156 * is FS.
138 * 0 - No (default) 157 * 0 - No (default)
139 * 1 - Yes 158 * 1 - Yes
140 * @ulpi_fs_ls: True to make ULPI phy operate in FS/LS mode only 159 * @ulpi_fs_ls: Make ULPI phy operate in FS/LS mode only
160 * 0 - No (default)
161 * 1 - Yes
141 * @host_support_fs_ls_low_power: Specifies whether low power mode is supported 162 * @host_support_fs_ls_low_power: Specifies whether low power mode is supported
142 * when attached to a Full Speed or Low Speed device in 163 * when attached to a Full Speed or Low Speed device in
143 * host mode. 164 * host mode.
144 * 0 - Don't support low power mode (default) 165 * 0 - Don't support low power mode (default)
145 * 1 - Support low power mode 166 * 1 - Support low power mode
146 * @host_ls_low_power_phy_clk: Specifies the PHY clock rate in low power mode 167 * @host_ls_low_power_phy_clk: Specifies the PHY clock rate in low power mode
147 * when connected to a Low Speed device in host mode. This 168 * when connected to a Low Speed device in host
148 * parameter is applicable only if 169 * mode. This parameter is applicable only if
149 * host_support_fs_ls_low_power is enabled. If phy_type is 170 * host_support_fs_ls_low_power is enabled.
150 * set to FS then defaults to 6 MHZ otherwise 48 MHZ.
151 * 0 - 48 MHz 171 * 0 - 48 MHz
172 * (default when phy_type is UTMI+ or ULPI)
152 * 1 - 6 MHz 173 * 1 - 6 MHz
153 * @ts_dline: True to enable Term Select Dline pulsing 174 * (default when phy_type is Full Speed)
154 * @reload_ctl: True to allow dynamic reloading of HFIR register during 175 * @ts_dline: Enable Term Select Dline pulsing
155 * runtime 176 * 0 - No (default)
177 * 1 - Yes
178 * @reload_ctl: Allow dynamic reloading of HFIR register during runtime
179 * 0 - No (default for core < 2.92a)
180 * 1 - Yes (default for core >= 2.92a)
156 * @ahbcfg: This field allows the default value of the GAHBCFG 181 * @ahbcfg: This field allows the default value of the GAHBCFG
157 * register to be overridden 182 * register to be overridden
158 * -1 - GAHBCFG value will not be overridden 183 * -1 - GAHBCFG value will be set to 0x06
184 * (INCR4, default)
159 * all others - GAHBCFG value will be overridden with 185 * all others - GAHBCFG value will be overridden with
160 * this value 186 * this value
187 * Not all bits can be controlled like this, the
188 * bits defined by GAHBCFG_CTRL_MASK are controlled
189 * by the driver and are ignored in this
190 * configuration value.
161 * 191 *
162 * The following parameters may be specified when starting the module. These 192 * The following parameters may be specified when starting the module. These
163 * parameters define how the DWC_otg controller should be configured. 193 * parameters define how the DWC_otg controller should be configured. A
194 * value of -1 (or any other out of range value) for any parameter means
195 * to read the value from hardware (if possible) or use the builtin
196 * default described above.
164 */ 197 */
165struct dwc2_core_params { 198struct dwc2_core_params {
166 /* 199 /*