Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 109e37a6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'usb-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

usb: changes for v4.18 merge window

A total of 98 non-merge commits, the biggest part being in dwc3 this
time around with a large refactoring of dwc3's transfer handling code.

We also have a new driver for Aspeed virtual hub controller.

Apart from that, just a list of miscellaneous fixes all over the place.
parents ddf12f04 47265c06
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -7,6 +7,26 @@ Required properties:
 - compatible: must be "snps,dwc3"
 - reg : Address and length of the register set for the device
 - interrupts: Interrupts used by the dwc3 controller.
 - clock-names: should contain "ref", "bus_early", "suspend"
 - clocks: list of phandle and clock specifier pairs corresponding to
           entries in the clock-names property.

Exception for clocks:
  clocks are optional if the parent node (i.e. glue-layer) is compatible to
  one of the following:
    "amlogic,meson-axg-dwc3"
    "amlogic,meson-gxl-dwc3"
    "cavium,octeon-7130-usb-uctl"
    "qcom,dwc3"
    "samsung,exynos5250-dwusb3"
    "samsung,exynos7-dwusb3"
    "sprd,sc9860-dwc3"
    "st,stih407-dwc3"
    "ti,am437x-dwc3"
    "ti,dwc3"
    "ti,keystone-dwc3"
    "rockchip,rk3399-dwc3"
    "xlnx,zynqmp-dwc3"

Optional properties:
 - usb-phy : array of phandle for the PHY device.  The first element
@@ -15,6 +35,7 @@ Optional properties:
 - phys: from the *Generic PHY* bindings
 - phy-names: from the *Generic PHY* bindings; supported names are "usb2-phy"
	or "usb3-phy".
 - resets: a single pair of phandle and reset specifier
 - snps,usb3_lpm_capable: determines if platform is USB3 LPM capable
 - snps,disable_scramble_quirk: true when SW should disable data scrambling.
	Only really useful for FPGA builds.
+63 −22
Original line number Diff line number Diff line
Qualcomm SuperSpeed DWC3 USB SoC controller

Required properties:
- compatible:	should contain "qcom,dwc3"
- compatible:		Compatible list, contains
			"qcom,dwc3"
			"qcom,msm8996-dwc3" for msm8996 SOC.
			"qcom,sdm845-dwc3" for sdm845 SOC.
- reg:			Offset and length of register set for QSCRATCH wrapper
- power-domains:	specifies a phandle to PM domain provider node
- clocks:		A list of phandle + clock-specifier pairs for the
				clocks listed in clock-names
- clock-names:		Should contain the following:
  "core"		Master/Core clock, have to be >= 125 MHz for SS
				operation and >= 60MHz for HS operation
  "mock_utmi"		Mock utmi clock needed for ITP/SOF generation in
				host mode. Its frequency should be 19.2MHz.
  "sleep"		Sleep clock, used for wakeup when USB3 core goes
				into low power mode (U3).

Optional clocks:
  "iface"		System bus AXI clock.  Not present on all platforms
  "sleep"		Sleep clock, used when USB3 core goes into low
				power mode (U3).
  "iface"		System bus AXI clock.
			Not present on "qcom,msm8996-dwc3" compatible.
  "cfg_noc"		System Config NOC clock.
			Not present on "qcom,msm8996-dwc3" compatible.
- assigned-clocks:	Should be:
				MOCK_UTMI_CLK
				MASTER_CLK
- assigned-clock-rates: Should be:
                                19.2Mhz (192000000) for MOCK_UTMI_CLK
                                >=125Mhz (125000000) for MASTER_CLK in SS mode
                                >=60Mhz (60000000) for MASTER_CLK in HS mode

Optional properties:
- resets:		Phandle to reset control that resets core and wrapper.
- interrupts:		specifies interrupts from controller wrapper used
			to wakeup from low power/susepnd state.	Must contain
			one or more entry for interrupt-names property
- interrupt-names:	Must include the following entries:
			- "hs_phy_irq": The interrupt that is asserted when a
			   wakeup event is received on USB2 bus
			- "ss_phy_irq": The interrupt that is asserted when a
			   wakeup event is received on USB3 bus
			- "dm_hs_phy_irq" and "dp_hs_phy_irq": Separate
			   interrupts for any wakeup event on DM and DP lines
- qcom,select-utmi-as-pipe-clk: if present, disable USB3 pipe_clk requirement.
				Used when dwc3 operates without SSPHY and only
				HS/FS/LS modes are supported.

Required child node:
A child node must exist to represent the core DWC3 IP block. The name of
the node is not important. The content of the node is defined in dwc3.txt.

Phy documentation is provided in the following places:
Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt   - USB3 QMP PHY
Documentation/devicetree/bindings/phy/qcom-qusb2-phy.txt - USB2 QUSB2 PHY

Example device nodes:

		hs_phy: phy@100f8800 {
			compatible = "qcom,dwc3-hs-usb-phy";
			reg = <0x100f8800 0x30>;
			clocks = <&gcc USB30_0_UTMI_CLK>;
			clock-names = "ref";
			#phy-cells = <0>;

			compatible = "qcom,qusb2-v2-phy";
			...
		};

		ss_phy: phy@100f8830 {
			compatible = "qcom,dwc3-ss-usb-phy";
			reg = <0x100f8830 0x30>;
			clocks = <&gcc USB30_0_MASTER_CLK>;
			clock-names = "ref";
			#phy-cells = <0>;

			compatible = "qcom,qmp-v3-usb3-phy";
			...
		};

		usb3_0: usb30@0 {
		usb3_0: usb30@a6f8800 {
			compatible = "qcom,dwc3";
			reg = <0xa6f8800 0x400>;
			#address-cells = <1>;
			#size-cells = <1>;
			clocks = <&gcc USB30_0_MASTER_CLK>;
			clock-names = "core";

			ranges;

			interrupts = <0 131 0>, <0 486 0>, <0 488 0>, <0 489 0>;
			interrupt-names = "hs_phy_irq", "ss_phy_irq",
				  "dm_hs_phy_irq", "dp_hs_phy_irq";

			clocks = <&gcc GCC_USB30_PRIM_MASTER_CLK>,
				<&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
				<&gcc GCC_USB30_PRIM_SLEEP_CLK>;
			clock-names = "core", "mock_utmi", "sleep";

			assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
			assigned-clock-rates = <19200000>, <133000000>;

			resets = <&gcc GCC_USB30_PRIM_BCR>;
			reset-names = "core_reset";
			power-domains = <&gcc USB30_PRIM_GDSC>;
			qcom,select-utmi-as-pipe-clk;

			dwc3@10000000 {
				compatible = "snps,dwc3";
+1 −2
Original line number Diff line number Diff line
@@ -674,9 +674,8 @@ operations, both of which can be traced. Format is::
  	__entry->flags & DWC3_EP_ENABLED ? 'E' : 'e',
  	__entry->flags & DWC3_EP_STALL ? 'S' : 's',
  	__entry->flags & DWC3_EP_WEDGE ? 'W' : 'w',
  	__entry->flags & DWC3_EP_BUSY ? 'B' : 'b',
  	__entry->flags & DWC3_EP_TRANSFER_STARTED ? 'B' : 'b',
  	__entry->flags & DWC3_EP_PENDING_REQUEST ? 'P' : 'p',
  	__entry->flags & DWC3_EP_MISSED_ISOC ? 'M' : 'm',
  	__entry->flags & DWC3_EP_END_TRANSFER_PENDING ? 'E' : 'e',
  	__entry->direction ? '<' : '>'
  )
+7 −0
Original line number Diff line number Diff line
@@ -419,6 +419,8 @@ static void dwc2_wait_for_mode(struct dwc2_hsotg *hsotg,
/**
 * dwc2_iddig_filter_enabled() - Returns true if the IDDIG debounce
 * filter is enabled.
 *
 * @hsotg: Programming view of DWC_otg controller
 */
static bool dwc2_iddig_filter_enabled(struct dwc2_hsotg *hsotg)
{
@@ -564,6 +566,9 @@ int dwc2_core_reset(struct dwc2_hsotg *hsotg, bool skip_wait)
 * If a force is done, it requires a IDDIG debounce filter delay if
 * the filter is configured and enabled. We poll the current mode of
 * the controller to account for this delay.
 *
 * @hsotg: Programming view of DWC_otg controller
 * @host: Host mode flag
 */
void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
{
@@ -610,6 +615,8 @@ void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
 * or not because the value of the connector ID status is affected by
 * the force mode. We only need to call this once during probe if
 * dr_mode == OTG.
 *
 * @hsotg: Programming view of DWC_otg controller
 */
static void dwc2_clear_force_mode(struct dwc2_hsotg *hsotg)
{
+152 −36
Original line number Diff line number Diff line
@@ -164,12 +164,11 @@ struct dwc2_hsotg_req;
 *       and has yet to be completed (maybe due to data move, or simply
 *       awaiting an ack from the core all the data has been completed).
 * @debugfs: File entry for debugfs file for this endpoint.
 * @lock: State lock to protect contents of endpoint.
 * @dir_in: Set to true if this endpoint is of the IN direction, which
 *          means that it is sending data to the Host.
 * @index: The index for the endpoint registers.
 * @mc: Multi Count - number of transactions per microframe
 * @interval - Interval for periodic endpoints, in frames or microframes.
 * @interval: Interval for periodic endpoints, in frames or microframes.
 * @name: The name array passed to the USB core.
 * @halted: Set if the endpoint has been halted.
 * @periodic: Set if this is a periodic ep, such as Interrupt
@@ -178,10 +177,11 @@ struct dwc2_hsotg_req;
 * @desc_list_dma: The DMA address of descriptor chain currently in use.
 * @desc_list: Pointer to descriptor DMA chain head currently in use.
 * @desc_count: Count of entries within the DMA descriptor chain of EP.
 * @isoc_chain_num: Number of ISOC chain currently in use - either 0 or 1.
 * @next_desc: index of next free descriptor in the ISOC chain under SW control.
 * @compl_desc: index of next descriptor to be completed by xFerComplete
 * @total_data: The total number of data bytes done.
 * @fifo_size: The size of the FIFO (for periodic IN endpoints)
 * @fifo_index: For Dedicated FIFO operation, only FIFO0 can be used for EP0.
 * @fifo_load: The amount of data loaded into the FIFO (periodic IN)
 * @last_load: The offset of data for the last start of request.
 * @size_loaded: The last loaded size for DxEPTSIZE for periodic IN
@@ -231,8 +231,8 @@ struct dwc2_hsotg_ep {
	struct dwc2_dma_desc	*desc_list;
	u8			desc_count;

	unsigned char		isoc_chain_num;
	unsigned int		next_desc;
	unsigned int		compl_desc;

	char                    name[10];
};
@@ -380,6 +380,12 @@ enum dwc2_ep0_state {
 *                      is FS.
 *                       0 - No (default)
 *                       1 - Yes
 * @ipg_isoc_en:        Indicates the IPG supports is enabled or disabled.
 *                       0 - Disable (default)
 *                       1 - Enable
 * @acg_enable:		For enabling Active Clock Gating in the controller
 *                       0 - No
 *                       1 - Yes
 * @ulpi_fs_ls:         Make ULPI phy operate in FS/LS mode only
 *                       0 - No (default)
 *                       1 - Yes
@@ -511,6 +517,7 @@ struct dwc2_core_params {
	bool hird_threshold_en;
	u8 hird_threshold;
	bool activate_stm_fs_transceiver;
	bool ipg_isoc_en;
	u16 max_packet_count;
	u32 max_transfer_size;
	u32 ahbcfg;
@@ -548,7 +555,7 @@ struct dwc2_core_params {
 *
 * The values that are not in dwc2_core_params are documented below.
 *
 * @op_mode             Mode of Operation
 * @op_mode:             Mode of Operation
 *                       0 - HNP- and SRP-Capable OTG (Host & Device)
 *                       1 - SRP-Capable OTG (Host & Device)
 *                       2 - Non-HNP and Non-SRP Capable OTG (Host & Device)
@@ -556,43 +563,102 @@ struct dwc2_core_params {
 *                       4 - Non-OTG Device
 *                       5 - SRP-Capable Host
 *                       6 - Non-OTG Host
 * @arch                Architecture
 * @arch:                Architecture
 *                       0 - Slave only
 *                       1 - External DMA
 *                       2 - Internal DMA
 * @power_optimized     Are power optimizations enabled?
 * @num_dev_ep          Number of device endpoints available
 * @num_dev_in_eps      Number of device IN endpoints available
 * @num_dev_perio_in_ep Number of device periodic IN endpoints
 * @ipg_isoc_en:        This feature indicates that the controller supports
 *                      the worst-case scenario of Rx followed by Rx
 *                      Interpacket Gap (IPG) (32 bitTimes) as per the utmi
 *                      specification for any token following ISOC OUT token.
 *                       0 - Don't support
 *                       1 - Support
 * @power_optimized:    Are power optimizations enabled?
 * @num_dev_ep:         Number of device endpoints available
 * @num_dev_in_eps:     Number of device IN endpoints available
 * @num_dev_perio_in_ep: Number of device periodic IN endpoints
 *                       available
 * @dev_token_q_depth   Device Mode IN Token Sequence Learning Queue
 * @dev_token_q_depth:  Device Mode IN Token Sequence Learning Queue
 *                      Depth
 *                       0 to 30
 * @host_perio_tx_q_depth
 * @host_perio_tx_q_depth:
 *                      Host Mode Periodic Request Queue Depth
 *                       2, 4 or 8
 * @nperio_tx_q_depth
 * @nperio_tx_q_depth:
 *                      Non-Periodic Request Queue Depth
 *                       2, 4 or 8
 * @hs_phy_type         High-speed PHY interface type
 * @hs_phy_type:         High-speed PHY interface type
 *                       0 - High-speed interface not supported
 *                       1 - UTMI+
 *                       2 - ULPI
 *                       3 - UTMI+ and ULPI
 * @fs_phy_type         Full-speed PHY interface type
 * @fs_phy_type:         Full-speed PHY interface type
 *                       0 - Full speed interface not supported
 *                       1 - Dedicated full speed interface
 *                       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
 * @hibernation:	Is hibernation enabled?
 * @utmi_phy_data_width: UTMI+ PHY data width
 *                       0 - 8 bits
 *                       1 - 16 bits
 *                       2 - 8 or 16 bits
 * @snpsid:             Value from SNPSID register
 * @dev_ep_dirs:        Direction of device endpoints (GHWCFG1)
 * @g_tx_fifo_size[]	Power-on values of TxFIFO sizes
 * @g_tx_fifo_size:	Power-on values of TxFIFO sizes
 * @dma_desc_enable:    When DMA mode is enabled, specifies whether to use
 *                      address DMA mode or descriptor DMA mode for accessing
 *                      the data FIFOs. The driver will automatically detect the
 *                      value for this if none is specified.
 *                       0 - Address DMA
 *                       1 - Descriptor DMA (default, if available)
 * @enable_dynamic_fifo: 0 - Use coreConsultant-specified FIFO size parameters
 *                       1 - Allow dynamic FIFO sizing (default, if available)
 * @en_multiple_tx_fifo: Specifies whether dedicated per-endpoint transmit FIFOs
 *                      are enabled for non-periodic IN endpoints in device
 *                      mode.
 * @host_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO
 *                      in host mode when dynamic FIFO sizing is enabled
 *                       16 to 32768
 *                      Actual maximum value is autodetected and also
 *                      the default.
 * @host_perio_tx_fifo_size: Number of 4-byte words in the periodic Tx FIFO in
 *                      host mode when dynamic FIFO sizing is enabled
 *                       16 to 32768
 *                      Actual maximum value is autodetected and also
 *                      the default.
 * @max_transfer_size:  The maximum transfer size supported, in bytes
 *                       2047 to 65,535
 *                      Actual maximum value is autodetected and also
 *                      the default.
 * @max_packet_count:   The maximum number of packets in a transfer
 *                       15 to 511
 *                      Actual maximum value is autodetected and also
 *                      the default.
 * @host_channels:      The number of host channel registers to use
 *                       1 to 16
 *                      Actual maximum value is autodetected and also
 *                      the default.
 * @dev_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO
 *			     in device mode when dynamic FIFO sizing is enabled
 *			     16 to 32768
 *			     Actual maximum value is autodetected and also
 *			     the default.
 * @i2c_enable:         Specifies whether to use the I2Cinterface for a full
 *                      speed PHY. This parameter is only applicable if phy_type
 *                      is FS.
 *                       0 - No (default)
 *                       1 - Yes
 * @acg_enable:		For enabling Active Clock Gating in the controller
 *                       0 - Disable
 *                       1 - Enable
 * @lpm_mode:		For enabling Link Power Management in the controller
 *                       0 - Disable
 *                       1 - Enable
 * @rx_fifo_size:	Number of 4-byte words in the  Rx FIFO when dynamic
 *			FIFO sizing is enabled 16 to 32768
 *			Actual maximum value is autodetected and also
 *			the default.
 */
struct dwc2_hw_params {
	unsigned op_mode:3;
@@ -622,6 +688,7 @@ struct dwc2_hw_params {
	unsigned hibernation:1;
	unsigned utmi_phy_data_width:2;
	unsigned lpm_mode:1;
	unsigned ipg_isoc_en:1;
	u32 snpsid;
	u32 dev_ep_dirs;
	u32 g_tx_fifo_size[MAX_EPS_CHANNELS];
@@ -642,7 +709,11 @@ struct dwc2_hw_params {
 * @gi2cctl:		Backup of GI2CCTL register
 * @glpmcfg:		Backup of GLPMCFG register
 * @gdfifocfg:		Backup of GDFIFOCFG register
 * @pcgcctl:		Backup of PCGCCTL register
 * @pcgcctl1:		Backup of PCGCCTL1 register
 * @dtxfsiz:		Backup of DTXFSIZ registers for each endpoint
 * @gpwrdn:		Backup of GPWRDN register
 * @valid:		True if registers values backuped.
 */
struct dwc2_gregs_backup {
	u32 gotgctl;
@@ -675,6 +746,7 @@ struct dwc2_gregs_backup {
 * @doeptsiz:		Backup of DOEPTSIZ register
 * @doepdma:		Backup of DOEPDMA register
 * @dtxfsiz:		Backup of DTXFSIZ registers for each endpoint
 * @valid:      True if registers values backuped.
 */
struct dwc2_dregs_backup {
	u32 dcfg;
@@ -698,9 +770,10 @@ struct dwc2_dregs_backup {
 * @hcfg:		Backup of HCFG register
 * @haintmsk:		Backup of HAINTMSK register
 * @hcintmsk:		Backup of HCINTMSK register
 * @hptr0:		Backup of HPTR0 register
 * @hprt0:		Backup of HPTR0 register
 * @hfir:		Backup of HFIR register
 * @hptxfsiz:		Backup of HPTXFSIZ register
 * @valid:      True if registers values backuped.
 */
struct dwc2_hregs_backup {
	u32 hcfg;
@@ -800,7 +873,7 @@ struct dwc2_hregs_backup {
 * @regs:		Pointer to controller regs
 * @hw_params:          Parameters that were autodetected from the
 *                      hardware registers
 * @core_params:	Parameters that define how the core should be configured
 * @params:	Parameters that define how the core should be configured
 * @op_state:           The operational State, during transitions (a_host=>
 *                      a_peripheral and b_device=>b_host) this may not match
 *                      the core, but allows the software to determine
@@ -809,10 +882,13 @@ struct dwc2_hregs_backup {
 *                      - USB_DR_MODE_PERIPHERAL
 *                      - USB_DR_MODE_HOST
 *                      - USB_DR_MODE_OTG
 * @hcd_enabled		Host mode sub-driver initialization indicator.
 * @gadget_enabled	Peripheral mode sub-driver initialization indicator.
 * @ll_hw_enabled	Status of low-level hardware resources.
 * @hcd_enabled:	Host mode sub-driver initialization indicator.
 * @gadget_enabled:	Peripheral mode sub-driver initialization indicator.
 * @ll_hw_enabled:	Status of low-level hardware resources.
 * @hibernated:		True if core is hibernated
 * @frame_number:       Frame number read from the core. For both device
 *			and host modes. The value ranges are from 0
 *			to HFNUM_MAX_FRNUM.
 * @phy:                The otg phy transceiver structure for phy control.
 * @uphy:               The otg phy transceiver structure for old USB phy
 *                      control.
@@ -832,13 +908,25 @@ struct dwc2_hregs_backup {
 *                      interrupt
 * @wkp_timer:          Timer object for handling Wakeup Detected interrupt
 * @lx_state:           Lx state of connected device
 * @gregs_backup: Backup of global registers during suspend
 * @dregs_backup: Backup of device registers during suspend
 * @hregs_backup: Backup of host registers during suspend
 * @gr_backup: Backup of global registers during suspend
 * @dr_backup: Backup of device registers during suspend
 * @hr_backup: Backup of host registers during suspend
 *
 * These are for host mode:
 *
 * @flags:              Flags for handling root port state changes
 * @flags.d32:          Contain all root port flags
 * @flags.b:            Separate root port flags from each other
 * @flags.b.port_connect_status_change: True if root port connect status
 *                      changed
 * @flags.b.port_connect_status: True if device connected to root port
 * @flags.b.port_reset_change: True if root port reset status changed
 * @flags.b.port_enable_change: True if root port enable status changed
 * @flags.b.port_suspend_change: True if root port suspend status changed
 * @flags.b.port_over_current_change: True if root port over current state
 *                       changed.
 * @flags.b.port_l1_change: True if root port l1 status changed
 * @flags.b.reserved:   Reserved bits of root port register
 * @non_periodic_sched_inactive: Inactive QHs in the non-periodic schedule.
 *                      Transfers associated with these QHs are not currently
 *                      assigned to a host channel.
@@ -847,6 +935,9 @@ struct dwc2_hregs_backup {
 *                      assigned to a host channel.
 * @non_periodic_qh_ptr: Pointer to next QH to process in the active
 *                      non-periodic schedule
 * @non_periodic_sched_waiting: Waiting QHs in the non-periodic schedule.
 *                      Transfers associated with these QHs are not currently
 *                      assigned to a host channel.
 * @periodic_sched_inactive: Inactive QHs in the periodic schedule. This is a
 *                      list of QHs for periodic transfers that are _not_
 *                      scheduled for the next frame. Each QH in the list has an
@@ -886,8 +977,6 @@ struct dwc2_hregs_backup {
 * @hs_periodic_bitmap: Bitmap used by the microframe scheduler any time the
 *                      host is in high speed mode; low speed schedules are
 *                      stored elsewhere since we need one per TT.
 * @frame_number:       Frame number read from the core at SOF. The value ranges
 *                      from 0 to HFNUM_MAX_FRNUM.
 * @periodic_qh_count:  Count of periodic QHs, if using several eps. Used for
 *                      SOF enable/disable.
 * @free_hc_list:       Free host channels in the controller. This is a list of
@@ -898,8 +987,8 @@ struct dwc2_hregs_backup {
 *                      host channel is available for non-periodic transactions.
 * @non_periodic_channels: Number of host channels assigned to non-periodic
 *                      transfers
 * @available_host_channels Number of host channels available for the microframe
 *                      scheduler to use
 * @available_host_channels: Number of host channels available for the
 *			     microframe scheduler to use
 * @hc_ptr_array:       Array of pointers to the host channel descriptors.
 *                      Allows accessing a host channel descriptor given the
 *                      host channel number. This is useful in interrupt
@@ -922,9 +1011,6 @@ struct dwc2_hregs_backup {
 * @dedicated_fifos:    Set if the hardware has dedicated IN-EP fifos.
 * @num_of_eps:         Number of available EPs (excluding EP0)
 * @debug_root:         Root directrory for debugfs.
 * @debug_file:         Main status file for debugfs.
 * @debug_testmode:     Testmode status file for debugfs.
 * @debug_fifo:         FIFO status file for debugfs.
 * @ep0_reply:          Request used for ep0 reply.
 * @ep0_buff:           Buffer for EP0 reply data, if needed.
 * @ctrl_buff:          Buffer for EP0 control requests.
@@ -939,7 +1025,37 @@ struct dwc2_hregs_backup {
 * @ctrl_in_desc:	EP0 IN data phase desc chain pointer
 * @ctrl_out_desc_dma:	EP0 OUT data phase desc chain DMA address
 * @ctrl_out_desc:	EP0 OUT data phase desc chain pointer
 * @eps:                The endpoints being supplied to the gadget framework
 * @irq:		Interrupt request line number
 * @clk:		Pointer to otg clock
 * @reset:		Pointer to dwc2 reset controller
 * @reset_ecc:          Pointer to dwc2 optional reset controller in Stratix10.
 * @regset:		A pointer to a struct debugfs_regset32, which contains
 *			a pointer to an array of register definitions, the
 *			array size and the base address where the register bank
 *			is to be found.
 * @bus_suspended:	True if bus is suspended
 * @last_frame_num:	Number of last frame. Range from 0 to  32768
 * @frame_num_array:    Used only  if CONFIG_USB_DWC2_TRACK_MISSED_SOFS is
 *			defined, for missed SOFs tracking. Array holds that
 *			frame numbers, which not equal to last_frame_num +1
 * @last_frame_num_array:   Used only  if CONFIG_USB_DWC2_TRACK_MISSED_SOFS is
 *			    defined, for missed SOFs tracking.
 *			    If current_frame_number != last_frame_num+1
 *			    then last_frame_num added to this array
 * @frame_num_idx:	Actual size of frame_num_array and last_frame_num_array
 * @dumped_frame_num_array:	1 - if missed SOFs frame numbers dumbed
 *				0 - if missed SOFs frame numbers not dumbed
 * @fifo_mem:			Total internal RAM for FIFOs (bytes)
 * @fifo_map:		Each bit intend for concrete fifo. If that bit is set,
 *			then that fifo is used
 * @gadget:		Represents a usb slave device
 * @connected:		Used in slave mode. True if device connected with host
 * @eps_in:		The IN endpoints being supplied to the gadget framework
 * @eps_out:		The OUT endpoints being supplied to the gadget framework
 * @new_connection:	Used in host mode. True if there are new connected
 *			device
 * @enabled:		Indicates the enabling state of controller
 *
 */
struct dwc2_hsotg {
	struct device *dev;
@@ -954,6 +1070,7 @@ struct dwc2_hsotg {
	unsigned int gadget_enabled:1;
	unsigned int ll_hw_enabled:1;
	unsigned int hibernated:1;
	u16 frame_number;

	struct phy *phy;
	struct usb_phy *uphy;
@@ -1029,7 +1146,6 @@ struct dwc2_hsotg {
	u16 periodic_usecs;
	unsigned long hs_periodic_bitmap[
		DIV_ROUND_UP(DWC2_HS_SCHEDULE_US, BITS_PER_LONG)];
	u16 frame_number;
	u16 periodic_qh_count;
	bool bus_suspended;
	bool new_connection;
Loading