summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>2018-05-16 04:04:24 -0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-05-21 03:02:13 -0400
commit6fb914d788133fd2298af87c50aefe1863cf1445 (patch)
tree52e5ef7b50fe021bbc2c5316e8291d244d0fe9ef
parent431d93c20558abe255c6a1a5db150a2f2bc3dadd (diff)
usb: dwc2: Fix kernel doc's warnings.
Added descriptions for all not described parameters. Fix all kernel doc's warnings. Acked-by: Minas Harutyunyan <hminas@synopsys.com> Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/dwc2/core.c7
-rw-r--r--drivers/usb/dwc2/core.h170
-rw-r--r--drivers/usb/dwc2/debug.h2
-rw-r--r--drivers/usb/dwc2/debugfs.c19
-rw-r--r--drivers/usb/dwc2/gadget.c29
-rw-r--r--drivers/usb/dwc2/hcd.c3
-rw-r--r--drivers/usb/dwc2/hcd.h14
-rw-r--r--drivers/usb/dwc2/hcd_ddma.c1
-rw-r--r--drivers/usb/dwc2/hcd_intr.c12
-rw-r--r--drivers/usb/dwc2/hcd_queue.c5
-rw-r--r--drivers/usb/dwc2/params.c8
-rw-r--r--drivers/usb/dwc2/pci.c6
12 files changed, 215 insertions, 61 deletions
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 18a0a1771289..1c36a6a9dd63 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -419,6 +419,8 @@ static void dwc2_wait_for_mode(struct dwc2_hsotg *hsotg,
419/** 419/**
420 * dwc2_iddig_filter_enabled() - Returns true if the IDDIG debounce 420 * dwc2_iddig_filter_enabled() - Returns true if the IDDIG debounce
421 * filter is enabled. 421 * filter is enabled.
422 *
423 * @hsotg: Programming view of DWC_otg controller
422 */ 424 */
423static bool dwc2_iddig_filter_enabled(struct dwc2_hsotg *hsotg) 425static bool dwc2_iddig_filter_enabled(struct dwc2_hsotg *hsotg)
424{ 426{
@@ -564,6 +566,9 @@ int dwc2_core_reset(struct dwc2_hsotg *hsotg, bool skip_wait)
564 * If a force is done, it requires a IDDIG debounce filter delay if 566 * If a force is done, it requires a IDDIG debounce filter delay if
565 * the filter is configured and enabled. We poll the current mode of 567 * the filter is configured and enabled. We poll the current mode of
566 * the controller to account for this delay. 568 * the controller to account for this delay.
569 *
570 * @hsotg: Programming view of DWC_otg controller
571 * @host: Host mode flag
567 */ 572 */
568void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host) 573void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
569{ 574{
@@ -610,6 +615,8 @@ void dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
610 * or not because the value of the connector ID status is affected by 615 * or not because the value of the connector ID status is affected by
611 * the force mode. We only need to call this once during probe if 616 * the force mode. We only need to call this once during probe if
612 * dr_mode == OTG. 617 * dr_mode == OTG.
618 *
619 * @hsotg: Programming view of DWC_otg controller
613 */ 620 */
614static void dwc2_clear_force_mode(struct dwc2_hsotg *hsotg) 621static void dwc2_clear_force_mode(struct dwc2_hsotg *hsotg)
615{ 622{
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 2438480e4496..6d304e91c20e 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -164,12 +164,11 @@ struct dwc2_hsotg_req;
164 * and has yet to be completed (maybe due to data move, or simply 164 * and has yet to be completed (maybe due to data move, or simply
165 * awaiting an ack from the core all the data has been completed). 165 * awaiting an ack from the core all the data has been completed).
166 * @debugfs: File entry for debugfs file for this endpoint. 166 * @debugfs: File entry for debugfs file for this endpoint.
167 * @lock: State lock to protect contents of endpoint.
168 * @dir_in: Set to true if this endpoint is of the IN direction, which 167 * @dir_in: Set to true if this endpoint is of the IN direction, which
169 * means that it is sending data to the Host. 168 * means that it is sending data to the Host.
170 * @index: The index for the endpoint registers. 169 * @index: The index for the endpoint registers.
171 * @mc: Multi Count - number of transactions per microframe 170 * @mc: Multi Count - number of transactions per microframe
172 * @interval - Interval for periodic endpoints, in frames or microframes. 171 * @interval: Interval for periodic endpoints, in frames or microframes.
173 * @name: The name array passed to the USB core. 172 * @name: The name array passed to the USB core.
174 * @halted: Set if the endpoint has been halted. 173 * @halted: Set if the endpoint has been halted.
175 * @periodic: Set if this is a periodic ep, such as Interrupt 174 * @periodic: Set if this is a periodic ep, such as Interrupt
@@ -182,6 +181,7 @@ struct dwc2_hsotg_req;
182 * @compl_desc: index of next descriptor to be completed by xFerComplete 181 * @compl_desc: index of next descriptor to be completed by xFerComplete
183 * @total_data: The total number of data bytes done. 182 * @total_data: The total number of data bytes done.
184 * @fifo_size: The size of the FIFO (for periodic IN endpoints) 183 * @fifo_size: The size of the FIFO (for periodic IN endpoints)
184 * @fifo_index: For Dedicated FIFO operation, only FIFO0 can be used for EP0.
185 * @fifo_load: The amount of data loaded into the FIFO (periodic IN) 185 * @fifo_load: The amount of data loaded into the FIFO (periodic IN)
186 * @last_load: The offset of data for the last start of request. 186 * @last_load: The offset of data for the last start of request.
187 * @size_loaded: The last loaded size for DxEPTSIZE for periodic IN 187 * @size_loaded: The last loaded size for DxEPTSIZE for periodic IN
@@ -380,9 +380,12 @@ enum dwc2_ep0_state {
380 * is FS. 380 * is FS.
381 * 0 - No (default) 381 * 0 - No (default)
382 * 1 - Yes 382 * 1 - Yes
383 * @ipg_isoc_en Indicates the IPG supports is enabled or disabled. 383 * @ipg_isoc_en: Indicates the IPG supports is enabled or disabled.
384 * 0 - Disable (default) 384 * 0 - Disable (default)
385 * 1 - Enable 385 * 1 - Enable
386 * @acg_enable: For enabling Active Clock Gating in the controller
387 * 0 - No
388 * 1 - Yes
386 * @ulpi_fs_ls: Make ULPI phy operate in FS/LS mode only 389 * @ulpi_fs_ls: Make ULPI phy operate in FS/LS mode only
387 * 0 - No (default) 390 * 0 - No (default)
388 * 1 - Yes 391 * 1 - Yes
@@ -552,7 +555,7 @@ struct dwc2_core_params {
552 * 555 *
553 * The values that are not in dwc2_core_params are documented below. 556 * The values that are not in dwc2_core_params are documented below.
554 * 557 *
555 * @op_mode Mode of Operation 558 * @op_mode: Mode of Operation
556 * 0 - HNP- and SRP-Capable OTG (Host & Device) 559 * 0 - HNP- and SRP-Capable OTG (Host & Device)
557 * 1 - SRP-Capable OTG (Host & Device) 560 * 1 - SRP-Capable OTG (Host & Device)
558 * 2 - Non-HNP and Non-SRP Capable OTG (Host & Device) 561 * 2 - Non-HNP and Non-SRP Capable OTG (Host & Device)
@@ -560,49 +563,102 @@ struct dwc2_core_params {
560 * 4 - Non-OTG Device 563 * 4 - Non-OTG Device
561 * 5 - SRP-Capable Host 564 * 5 - SRP-Capable Host
562 * 6 - Non-OTG Host 565 * 6 - Non-OTG Host
563 * @arch Architecture 566 * @arch: Architecture
564 * 0 - Slave only 567 * 0 - Slave only
565 * 1 - External DMA 568 * 1 - External DMA
566 * 2 - Internal DMA 569 * 2 - Internal DMA
567 * @ipg_isoc_en This feature indicates that the controller supports 570 * @ipg_isoc_en: This feature indicates that the controller supports
568 * the worst-case scenario of Rx followed by Rx 571 * the worst-case scenario of Rx followed by Rx
569 * Interpacket Gap (IPG) (32 bitTimes) as per the utmi 572 * Interpacket Gap (IPG) (32 bitTimes) as per the utmi
570 * specification for any token following ISOC OUT token. 573 * specification for any token following ISOC OUT token.
571 * 0 - Don't support 574 * 0 - Don't support
572 * 1 - Support 575 * 1 - Support
573 * @power_optimized Are power optimizations enabled? 576 * @power_optimized: Are power optimizations enabled?
574 * @num_dev_ep Number of device endpoints available 577 * @num_dev_ep: Number of device endpoints available
575 * @num_dev_in_eps Number of device IN endpoints available 578 * @num_dev_in_eps: Number of device IN endpoints available
576 * @num_dev_perio_in_ep Number of device periodic IN endpoints 579 * @num_dev_perio_in_ep: Number of device periodic IN endpoints
577 * available 580 * available
578 * @dev_token_q_depth Device Mode IN Token Sequence Learning Queue 581 * @dev_token_q_depth: Device Mode IN Token Sequence Learning Queue
579 * Depth 582 * Depth
580 * 0 to 30 583 * 0 to 30
581 * @host_perio_tx_q_depth 584 * @host_perio_tx_q_depth:
582 * Host Mode Periodic Request Queue Depth 585 * Host Mode Periodic Request Queue Depth
583 * 2, 4 or 8 586 * 2, 4 or 8
584 * @nperio_tx_q_depth 587 * @nperio_tx_q_depth:
585 * Non-Periodic Request Queue Depth 588 * Non-Periodic Request Queue Depth
586 * 2, 4 or 8 589 * 2, 4 or 8
587 * @hs_phy_type High-speed PHY interface type 590 * @hs_phy_type: High-speed PHY interface type
588 * 0 - High-speed interface not supported 591 * 0 - High-speed interface not supported
589 * 1 - UTMI+ 592 * 1 - UTMI+
590 * 2 - ULPI 593 * 2 - ULPI
591 * 3 - UTMI+ and ULPI 594 * 3 - UTMI+ and ULPI
592 * @fs_phy_type Full-speed PHY interface type 595 * @fs_phy_type: Full-speed PHY interface type
593 * 0 - Full speed interface not supported 596 * 0 - Full speed interface not supported
594 * 1 - Dedicated full speed interface 597 * 1 - Dedicated full speed interface
595 * 2 - FS pins shared with UTMI+ pins 598 * 2 - FS pins shared with UTMI+ pins
596 * 3 - FS pins shared with ULPI pins 599 * 3 - FS pins shared with ULPI pins
597 * @total_fifo_size: Total internal RAM for FIFOs (bytes) 600 * @total_fifo_size: Total internal RAM for FIFOs (bytes)
598 * @hibernation Is hibernation enabled? 601 * @hibernation: Is hibernation enabled?
599 * @utmi_phy_data_width UTMI+ PHY data width 602 * @utmi_phy_data_width: UTMI+ PHY data width
600 * 0 - 8 bits 603 * 0 - 8 bits
601 * 1 - 16 bits 604 * 1 - 16 bits
602 * 2 - 8 or 16 bits 605 * 2 - 8 or 16 bits
603 * @snpsid: Value from SNPSID register 606 * @snpsid: Value from SNPSID register
604 * @dev_ep_dirs: Direction of device endpoints (GHWCFG1) 607 * @dev_ep_dirs: Direction of device endpoints (GHWCFG1)
605 * @g_tx_fifo_size[] Power-on values of TxFIFO sizes 608 * @g_tx_fifo_size: Power-on values of TxFIFO sizes
609 * @dma_desc_enable: When DMA mode is enabled, specifies whether to use
610 * address DMA mode or descriptor DMA mode for accessing
611 * the data FIFOs. The driver will automatically detect the
612 * value for this if none is specified.
613 * 0 - Address DMA
614 * 1 - Descriptor DMA (default, if available)
615 * @enable_dynamic_fifo: 0 - Use coreConsultant-specified FIFO size parameters
616 * 1 - Allow dynamic FIFO sizing (default, if available)
617 * @en_multiple_tx_fifo: Specifies whether dedicated per-endpoint transmit FIFOs
618 * are enabled for non-periodic IN endpoints in device
619 * mode.
620 * @host_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO
621 * in host mode when dynamic FIFO sizing is enabled
622 * 16 to 32768
623 * Actual maximum value is autodetected and also
624 * the default.
625 * @host_perio_tx_fifo_size: Number of 4-byte words in the periodic Tx FIFO in
626 * host mode when dynamic FIFO sizing is enabled
627 * 16 to 32768
628 * Actual maximum value is autodetected and also
629 * the default.
630 * @max_transfer_size: The maximum transfer size supported, in bytes
631 * 2047 to 65,535
632 * Actual maximum value is autodetected and also
633 * the default.
634 * @max_packet_count: The maximum number of packets in a transfer
635 * 15 to 511
636 * Actual maximum value is autodetected and also
637 * the default.
638 * @host_channels: The number of host channel registers to use
639 * 1 to 16
640 * Actual maximum value is autodetected and also
641 * the default.
642 * @dev_nperio_tx_fifo_size: Number of 4-byte words in the non-periodic Tx FIFO
643 * in device mode when dynamic FIFO sizing is enabled
644 * 16 to 32768
645 * Actual maximum value is autodetected and also
646 * the default.
647 * @i2c_enable: Specifies whether to use the I2Cinterface for a full
648 * speed PHY. This parameter is only applicable if phy_type
649 * is FS.
650 * 0 - No (default)
651 * 1 - Yes
652 * @acg_enable: For enabling Active Clock Gating in the controller
653 * 0 - Disable
654 * 1 - Enable
655 * @lpm_mode: For enabling Link Power Management in the controller
656 * 0 - Disable
657 * 1 - Enable
658 * @rx_fifo_size: Number of 4-byte words in the Rx FIFO when dynamic
659 * FIFO sizing is enabled 16 to 32768
660 * Actual maximum value is autodetected and also
661 * the default.
606 */ 662 */
607struct dwc2_hw_params { 663struct dwc2_hw_params {
608 unsigned op_mode:3; 664 unsigned op_mode:3;
@@ -653,7 +709,11 @@ struct dwc2_hw_params {
653 * @gi2cctl: Backup of GI2CCTL register 709 * @gi2cctl: Backup of GI2CCTL register
654 * @glpmcfg: Backup of GLPMCFG register 710 * @glpmcfg: Backup of GLPMCFG register
655 * @gdfifocfg: Backup of GDFIFOCFG register 711 * @gdfifocfg: Backup of GDFIFOCFG register
712 * @pcgcctl: Backup of PCGCCTL register
713 * @pcgcctl1: Backup of PCGCCTL1 register
714 * @dtxfsiz: Backup of DTXFSIZ registers for each endpoint
656 * @gpwrdn: Backup of GPWRDN register 715 * @gpwrdn: Backup of GPWRDN register
716 * @valid: True if registers values backuped.
657 */ 717 */
658struct dwc2_gregs_backup { 718struct dwc2_gregs_backup {
659 u32 gotgctl; 719 u32 gotgctl;
@@ -686,6 +746,7 @@ struct dwc2_gregs_backup {
686 * @doeptsiz: Backup of DOEPTSIZ register 746 * @doeptsiz: Backup of DOEPTSIZ register
687 * @doepdma: Backup of DOEPDMA register 747 * @doepdma: Backup of DOEPDMA register
688 * @dtxfsiz: Backup of DTXFSIZ registers for each endpoint 748 * @dtxfsiz: Backup of DTXFSIZ registers for each endpoint
749 * @valid: True if registers values backuped.
689 */ 750 */
690struct dwc2_dregs_backup { 751struct dwc2_dregs_backup {
691 u32 dcfg; 752 u32 dcfg;
@@ -709,9 +770,10 @@ struct dwc2_dregs_backup {
709 * @hcfg: Backup of HCFG register 770 * @hcfg: Backup of HCFG register
710 * @haintmsk: Backup of HAINTMSK register 771 * @haintmsk: Backup of HAINTMSK register
711 * @hcintmsk: Backup of HCINTMSK register 772 * @hcintmsk: Backup of HCINTMSK register
712 * @hptr0: Backup of HPTR0 register 773 * @hprt0: Backup of HPTR0 register
713 * @hfir: Backup of HFIR register 774 * @hfir: Backup of HFIR register
714 * @hptxfsiz: Backup of HPTXFSIZ register 775 * @hptxfsiz: Backup of HPTXFSIZ register
776 * @valid: True if registers values backuped.
715 */ 777 */
716struct dwc2_hregs_backup { 778struct dwc2_hregs_backup {
717 u32 hcfg; 779 u32 hcfg;
@@ -811,7 +873,7 @@ struct dwc2_hregs_backup {
811 * @regs: Pointer to controller regs 873 * @regs: Pointer to controller regs
812 * @hw_params: Parameters that were autodetected from the 874 * @hw_params: Parameters that were autodetected from the
813 * hardware registers 875 * hardware registers
814 * @core_params: Parameters that define how the core should be configured 876 * @params: Parameters that define how the core should be configured
815 * @op_state: The operational State, during transitions (a_host=> 877 * @op_state: The operational State, during transitions (a_host=>
816 * a_peripheral and b_device=>b_host) this may not match 878 * a_peripheral and b_device=>b_host) this may not match
817 * the core, but allows the software to determine 879 * the core, but allows the software to determine
@@ -820,9 +882,9 @@ struct dwc2_hregs_backup {
820 * - USB_DR_MODE_PERIPHERAL 882 * - USB_DR_MODE_PERIPHERAL
821 * - USB_DR_MODE_HOST 883 * - USB_DR_MODE_HOST
822 * - USB_DR_MODE_OTG 884 * - USB_DR_MODE_OTG
823 * @hcd_enabled Host mode sub-driver initialization indicator. 885 * @hcd_enabled: Host mode sub-driver initialization indicator.
824 * @gadget_enabled Peripheral mode sub-driver initialization indicator. 886 * @gadget_enabled: Peripheral mode sub-driver initialization indicator.
825 * @ll_hw_enabled Status of low-level hardware resources. 887 * @ll_hw_enabled: Status of low-level hardware resources.
826 * @hibernated: True if core is hibernated 888 * @hibernated: True if core is hibernated
827 * @frame_number: Frame number read from the core. For both device 889 * @frame_number: Frame number read from the core. For both device
828 * and host modes. The value ranges are from 0 890 * and host modes. The value ranges are from 0
@@ -846,13 +908,25 @@ struct dwc2_hregs_backup {
846 * interrupt 908 * interrupt
847 * @wkp_timer: Timer object for handling Wakeup Detected interrupt 909 * @wkp_timer: Timer object for handling Wakeup Detected interrupt
848 * @lx_state: Lx state of connected device 910 * @lx_state: Lx state of connected device
849 * @gregs_backup: Backup of global registers during suspend 911 * @gr_backup: Backup of global registers during suspend
850 * @dregs_backup: Backup of device registers during suspend 912 * @dr_backup: Backup of device registers during suspend
851 * @hregs_backup: Backup of host registers during suspend 913 * @hr_backup: Backup of host registers during suspend
852 * 914 *
853 * These are for host mode: 915 * These are for host mode:
854 * 916 *
855 * @flags: Flags for handling root port state changes 917 * @flags: Flags for handling root port state changes
918 * @flags.d32: Contain all root port flags
919 * @flags.b: Separate root port flags from each other
920 * @flags.b.port_connect_status_change: True if root port connect status
921 * changed
922 * @flags.b.port_connect_status: True if device connected to root port
923 * @flags.b.port_reset_change: True if root port reset status changed
924 * @flags.b.port_enable_change: True if root port enable status changed
925 * @flags.b.port_suspend_change: True if root port suspend status changed
926 * @flags.b.port_over_current_change: True if root port over current state
927 * changed.
928 * @flags.b.port_l1_change: True if root port l1 status changed
929 * @flags.b.reserved: Reserved bits of root port register
856 * @non_periodic_sched_inactive: Inactive QHs in the non-periodic schedule. 930 * @non_periodic_sched_inactive: Inactive QHs in the non-periodic schedule.
857 * Transfers associated with these QHs are not currently 931 * Transfers associated with these QHs are not currently
858 * assigned to a host channel. 932 * assigned to a host channel.
@@ -861,6 +935,9 @@ struct dwc2_hregs_backup {
861 * assigned to a host channel. 935 * assigned to a host channel.
862 * @non_periodic_qh_ptr: Pointer to next QH to process in the active 936 * @non_periodic_qh_ptr: Pointer to next QH to process in the active
863 * non-periodic schedule 937 * non-periodic schedule
938 * @non_periodic_sched_waiting: Waiting QHs in the non-periodic schedule.
939 * Transfers associated with these QHs are not currently
940 * assigned to a host channel.
864 * @periodic_sched_inactive: Inactive QHs in the periodic schedule. This is a 941 * @periodic_sched_inactive: Inactive QHs in the periodic schedule. This is a
865 * list of QHs for periodic transfers that are _not_ 942 * list of QHs for periodic transfers that are _not_
866 * scheduled for the next frame. Each QH in the list has an 943 * scheduled for the next frame. Each QH in the list has an
@@ -910,8 +987,8 @@ struct dwc2_hregs_backup {
910 * host channel is available for non-periodic transactions. 987 * host channel is available for non-periodic transactions.
911 * @non_periodic_channels: Number of host channels assigned to non-periodic 988 * @non_periodic_channels: Number of host channels assigned to non-periodic
912 * transfers 989 * transfers
913 * @available_host_channels Number of host channels available for the microframe 990 * @available_host_channels: Number of host channels available for the
914 * scheduler to use 991 * microframe scheduler to use
915 * @hc_ptr_array: Array of pointers to the host channel descriptors. 992 * @hc_ptr_array: Array of pointers to the host channel descriptors.
916 * Allows accessing a host channel descriptor given the 993 * Allows accessing a host channel descriptor given the
917 * host channel number. This is useful in interrupt 994 * host channel number. This is useful in interrupt
@@ -934,9 +1011,6 @@ struct dwc2_hregs_backup {
934 * @dedicated_fifos: Set if the hardware has dedicated IN-EP fifos. 1011 * @dedicated_fifos: Set if the hardware has dedicated IN-EP fifos.
935 * @num_of_eps: Number of available EPs (excluding EP0) 1012 * @num_of_eps: Number of available EPs (excluding EP0)
936 * @debug_root: Root directrory for debugfs. 1013 * @debug_root: Root directrory for debugfs.
937 * @debug_file: Main status file for debugfs.
938 * @debug_testmode: Testmode status file for debugfs.
939 * @debug_fifo: FIFO status file for debugfs.
940 * @ep0_reply: Request used for ep0 reply. 1014 * @ep0_reply: Request used for ep0 reply.
941 * @ep0_buff: Buffer for EP0 reply data, if needed. 1015 * @ep0_buff: Buffer for EP0 reply data, if needed.
942 * @ctrl_buff: Buffer for EP0 control requests. 1016 * @ctrl_buff: Buffer for EP0 control requests.
@@ -951,7 +1025,37 @@ struct dwc2_hregs_backup {
951 * @ctrl_in_desc: EP0 IN data phase desc chain pointer 1025 * @ctrl_in_desc: EP0 IN data phase desc chain pointer
952 * @ctrl_out_desc_dma: EP0 OUT data phase desc chain DMA address 1026 * @ctrl_out_desc_dma: EP0 OUT data phase desc chain DMA address
953 * @ctrl_out_desc: EP0 OUT data phase desc chain pointer 1027 * @ctrl_out_desc: EP0 OUT data phase desc chain pointer
954 * @eps: The endpoints being supplied to the gadget framework 1028 * @irq: Interrupt request line number
1029 * @clk: Pointer to otg clock
1030 * @reset: Pointer to dwc2 reset controller
1031 * @reset_ecc: Pointer to dwc2 optional reset controller in Stratix10.
1032 * @regset: A pointer to a struct debugfs_regset32, which contains
1033 * a pointer to an array of register definitions, the
1034 * array size and the base address where the register bank
1035 * is to be found.
1036 * @bus_suspended: True if bus is suspended
1037 * @last_frame_num: Number of last frame. Range from 0 to 32768
1038 * @frame_num_array: Used only if CONFIG_USB_DWC2_TRACK_MISSED_SOFS is
1039 * defined, for missed SOFs tracking. Array holds that
1040 * frame numbers, which not equal to last_frame_num +1
1041 * @last_frame_num_array: Used only if CONFIG_USB_DWC2_TRACK_MISSED_SOFS is
1042 * defined, for missed SOFs tracking.
1043 * If current_frame_number != last_frame_num+1
1044 * then last_frame_num added to this array
1045 * @frame_num_idx: Actual size of frame_num_array and last_frame_num_array
1046 * @dumped_frame_num_array: 1 - if missed SOFs frame numbers dumbed
1047 * 0 - if missed SOFs frame numbers not dumbed
1048 * @fifo_mem: Total internal RAM for FIFOs (bytes)
1049 * @fifo_map: Each bit intend for concrete fifo. If that bit is set,
1050 * then that fifo is used
1051 * @gadget: Represents a usb slave device
1052 * @connected: Used in slave mode. True if device connected with host
1053 * @eps_in: The IN endpoints being supplied to the gadget framework
1054 * @eps_out: The OUT endpoints being supplied to the gadget framework
1055 * @new_connection: Used in host mode. True if there are new connected
1056 * device
1057 * @enabled: Indicates the enabling state of controller
1058 *
955 */ 1059 */
956struct dwc2_hsotg { 1060struct dwc2_hsotg {
957 struct device *dev; 1061 struct device *dev;
diff --git a/drivers/usb/dwc2/debug.h b/drivers/usb/dwc2/debug.h
index 6f23219c13cb..a8c565b6bc34 100644
--- a/drivers/usb/dwc2/debug.h
+++ b/drivers/usb/dwc2/debug.h
@@ -1,5 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/** 2/*
3 * debug.h - Designware USB2 DRD controller debug header 3 * debug.h - Designware USB2 DRD controller debug header
4 * 4 *
5 * Copyright (C) 2015 Intel Corporation 5 * Copyright (C) 2015 Intel Corporation
diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c
index a21f89354434..7e6618ad9f21 100644
--- a/drivers/usb/dwc2/debugfs.c
+++ b/drivers/usb/dwc2/debugfs.c
@@ -1,5 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/** 2/*
3 * debugfs.c - Designware USB2 DRD controller debugfs 3 * debugfs.c - Designware USB2 DRD controller debugfs
4 * 4 *
5 * Copyright (C) 2015 Intel Corporation 5 * Copyright (C) 2015 Intel Corporation
@@ -16,12 +16,13 @@
16 16
17#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \ 17#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
18 IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) 18 IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
19
19/** 20/**
20 * testmode_write - debugfs: change usb test mode 21 * testmode_write() - change usb test mode state.
21 * @seq: The seq file to write to. 22 * @file: The file to write to.
22 * @v: Unused parameter. 23 * @ubuf: The buffer where user wrote.
23 * 24 * @count: The ubuf size.
24 * This debugfs entry modify the current usb test mode. 25 * @ppos: Unused parameter.
25 */ 26 */
26static ssize_t testmode_write(struct file *file, const char __user *ubuf, size_t 27static ssize_t testmode_write(struct file *file, const char __user *ubuf, size_t
27 count, loff_t *ppos) 28 count, loff_t *ppos)
@@ -55,9 +56,9 @@ static ssize_t testmode_write(struct file *file, const char __user *ubuf, size_t
55} 56}
56 57
57/** 58/**
58 * testmode_show - debugfs: show usb test mode state 59 * testmode_show() - debugfs: show usb test mode state
59 * @seq: The seq file to write to. 60 * @s: The seq file to write to.
60 * @v: Unused parameter. 61 * @unused: Unused parameter.
61 * 62 *
62 * This debugfs entry shows which usb test mode is currently enabled. 63 * This debugfs entry shows which usb test mode is currently enabled.
63 */ 64 */
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index e64a6dcb4687..684b4f544c9b 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1,5 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/** 2/*
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com 4 * http://www.samsung.com
5 * 5 *
@@ -107,7 +107,6 @@ static inline bool using_desc_dma(struct dwc2_hsotg *hsotg)
107/** 107/**
108 * dwc2_gadget_incr_frame_num - Increments the targeted frame number. 108 * dwc2_gadget_incr_frame_num - Increments the targeted frame number.
109 * @hs_ep: The endpoint 109 * @hs_ep: The endpoint
110 * @increment: The value to increment by
111 * 110 *
112 * This function will also check if the frame number overruns DSTS_SOFFN_LIMIT. 111 * This function will also check if the frame number overruns DSTS_SOFFN_LIMIT.
113 * If an overrun occurs it will wrap the value and set the frame_overrun flag. 112 * If an overrun occurs it will wrap the value and set the frame_overrun flag.
@@ -190,6 +189,8 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg,
190 189
191/** 190/**
192 * dwc2_hsotg_tx_fifo_count - return count of TX FIFOs in device mode 191 * dwc2_hsotg_tx_fifo_count - return count of TX FIFOs in device mode
192 *
193 * @hsotg: Programming view of the DWC_otg controller
193 */ 194 */
194int dwc2_hsotg_tx_fifo_count(struct dwc2_hsotg *hsotg) 195int dwc2_hsotg_tx_fifo_count(struct dwc2_hsotg *hsotg)
195{ 196{
@@ -204,6 +205,8 @@ int dwc2_hsotg_tx_fifo_count(struct dwc2_hsotg *hsotg)
204/** 205/**
205 * dwc2_hsotg_tx_fifo_total_depth - return total FIFO depth available for 206 * dwc2_hsotg_tx_fifo_total_depth - return total FIFO depth available for
206 * device mode TX FIFOs 207 * device mode TX FIFOs
208 *
209 * @hsotg: Programming view of the DWC_otg controller
207 */ 210 */
208int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg) 211int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg)
209{ 212{
@@ -227,6 +230,8 @@ int dwc2_hsotg_tx_fifo_total_depth(struct dwc2_hsotg *hsotg)
227/** 230/**
228 * dwc2_hsotg_tx_fifo_average_depth - returns average depth of device mode 231 * dwc2_hsotg_tx_fifo_average_depth - returns average depth of device mode
229 * TX FIFOs 232 * TX FIFOs
233 *
234 * @hsotg: Programming view of the DWC_otg controller
230 */ 235 */
231int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg) 236int dwc2_hsotg_tx_fifo_average_depth(struct dwc2_hsotg *hsotg)
232{ 237{
@@ -327,6 +332,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
327} 332}
328 333
329/** 334/**
335 * dwc2_hsotg_ep_alloc_request - allocate USB rerequest structure
330 * @ep: USB endpoint to allocate request for. 336 * @ep: USB endpoint to allocate request for.
331 * @flags: Allocation flags 337 * @flags: Allocation flags
332 * 338 *
@@ -2424,6 +2430,7 @@ static u32 dwc2_hsotg_ep0_mps(unsigned int mps)
2424 * @ep: The index number of the endpoint 2430 * @ep: The index number of the endpoint
2425 * @mps: The maximum packet size in bytes 2431 * @mps: The maximum packet size in bytes
2426 * @mc: The multicount value 2432 * @mc: The multicount value
2433 * @dir_in: True if direction is in.
2427 * 2434 *
2428 * Configure the maximum packet size for the given endpoint, updating 2435 * Configure the maximum packet size for the given endpoint, updating
2429 * the hardware control registers to reflect this. 2436 * the hardware control registers to reflect this.
@@ -2723,7 +2730,7 @@ static void dwc2_gadget_handle_ep_disabled(struct dwc2_hsotg_ep *hs_ep)
2723 2730
2724/** 2731/**
2725 * dwc2_gadget_handle_out_token_ep_disabled - handle DXEPINT_OUTTKNEPDIS 2732 * dwc2_gadget_handle_out_token_ep_disabled - handle DXEPINT_OUTTKNEPDIS
2726 * @hs_ep: The endpoint on which interrupt is asserted. 2733 * @ep: The endpoint on which interrupt is asserted.
2727 * 2734 *
2728 * This is starting point for ISOC-OUT transfer, synchronization done with 2735 * This is starting point for ISOC-OUT transfer, synchronization done with
2729 * first out token received from host while corresponding EP is disabled. 2736 * first out token received from host while corresponding EP is disabled.
@@ -3183,6 +3190,7 @@ static void dwc2_hsotg_irq_fifoempty(struct dwc2_hsotg *hsotg, bool periodic)
3183/** 3190/**
3184 * dwc2_hsotg_core_init - issue softreset to the core 3191 * dwc2_hsotg_core_init - issue softreset to the core
3185 * @hsotg: The device state 3192 * @hsotg: The device state
3193 * @is_usb_reset: Usb resetting flag
3186 * 3194 *
3187 * Issue a soft reset to the core, and await the core finishing it. 3195 * Issue a soft reset to the core, and await the core finishing it.
3188 */ 3196 */
@@ -4289,7 +4297,6 @@ err:
4289/** 4297/**
4290 * dwc2_hsotg_udc_stop - stop the udc 4298 * dwc2_hsotg_udc_stop - stop the udc
4291 * @gadget: The usb gadget state 4299 * @gadget: The usb gadget state
4292 * @driver: The usb gadget driver
4293 * 4300 *
4294 * Stop udc hw block and stay tunned for future transmissions 4301 * Stop udc hw block and stay tunned for future transmissions
4295 */ 4302 */
@@ -4441,6 +4448,7 @@ static const struct usb_gadget_ops dwc2_hsotg_gadget_ops = {
4441 * @hsotg: The device state. 4448 * @hsotg: The device state.
4442 * @hs_ep: The endpoint to be initialised. 4449 * @hs_ep: The endpoint to be initialised.
4443 * @epnum: The endpoint number 4450 * @epnum: The endpoint number
4451 * @dir_in: True if direction is in.
4444 * 4452 *
4445 * Initialise the given endpoint (as part of the probe and device state 4453 * Initialise the given endpoint (as part of the probe and device state
4446 * creation) to give to the gadget driver. Setup the endpoint name, any 4454 * creation) to give to the gadget driver. Setup the endpoint name, any
@@ -4514,7 +4522,7 @@ static void dwc2_hsotg_initep(struct dwc2_hsotg *hsotg,
4514 4522
4515/** 4523/**
4516 * dwc2_hsotg_hw_cfg - read HW configuration registers 4524 * dwc2_hsotg_hw_cfg - read HW configuration registers
4517 * @param: The device state 4525 * @hsotg: Programming view of the DWC_otg controller
4518 * 4526 *
4519 * Read the USB core HW configuration registers 4527 * Read the USB core HW configuration registers
4520 */ 4528 */
@@ -4570,7 +4578,8 @@ static int dwc2_hsotg_hw_cfg(struct dwc2_hsotg *hsotg)
4570 4578
4571/** 4579/**
4572 * dwc2_hsotg_dump - dump state of the udc 4580 * dwc2_hsotg_dump - dump state of the udc
4573 * @param: The device state 4581 * @hsotg: Programming view of the DWC_otg controller
4582 *
4574 */ 4583 */
4575static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg) 4584static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg)
4576{ 4585{
@@ -4621,7 +4630,8 @@ static void dwc2_hsotg_dump(struct dwc2_hsotg *hsotg)
4621 4630
4622/** 4631/**
4623 * dwc2_gadget_init - init function for gadget 4632 * dwc2_gadget_init - init function for gadget
4624 * @dwc2: The data structure for the DWC2 driver. 4633 * @hsotg: Programming view of the DWC_otg controller
4634 *
4625 */ 4635 */
4626int dwc2_gadget_init(struct dwc2_hsotg *hsotg) 4636int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
4627{ 4637{
@@ -4718,7 +4728,8 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg)
4718 4728
4719/** 4729/**
4720 * dwc2_hsotg_remove - remove function for hsotg driver 4730 * dwc2_hsotg_remove - remove function for hsotg driver
4721 * @pdev: The platform information for the driver 4731 * @hsotg: Programming view of the DWC_otg controller
4732 *
4722 */ 4733 */
4723int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg) 4734int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg)
4724{ 4735{
@@ -4999,7 +5010,7 @@ int dwc2_gadget_enter_hibernation(struct dwc2_hsotg *hsotg)
4999 * 5010 *
5000 * @hsotg: Programming view of the DWC_otg controller 5011 * @hsotg: Programming view of the DWC_otg controller
5001 * @rem_wakeup: indicates whether resume is initiated by Device or Host. 5012 * @rem_wakeup: indicates whether resume is initiated by Device or Host.
5002 * @param reset: indicates whether resume is initiated by Reset. 5013 * @reset: indicates whether resume is initiated by Reset.
5003 * 5014 *
5004 * Return non-zero if failed to exit from hibernation. 5015 * Return non-zero if failed to exit from hibernation.
5005 */ 5016 */
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 190f95964000..0ccd4b21f973 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -592,7 +592,7 @@ u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg)
592 * dwc2_read_packet() - Reads a packet from the Rx FIFO into the destination 592 * dwc2_read_packet() - Reads a packet from the Rx FIFO into the destination
593 * buffer 593 * buffer
594 * 594 *
595 * @core_if: Programming view of DWC_otg controller 595 * @hsotg: Programming view of DWC_otg controller
596 * @dest: Destination buffer for the packet 596 * @dest: Destination buffer for the packet
597 * @bytes: Number of bytes to copy to the destination 597 * @bytes: Number of bytes to copy to the destination
598 */ 598 */
@@ -4082,7 +4082,6 @@ static struct dwc2_hsotg *dwc2_hcd_to_hsotg(struct usb_hcd *hcd)
4082 * then the refcount for the structure will go to 0 and we'll free it. 4082 * then the refcount for the structure will go to 0 and we'll free it.
4083 * 4083 *
4084 * @hsotg: The HCD state structure for the DWC OTG controller. 4084 * @hsotg: The HCD state structure for the DWC OTG controller.
4085 * @qh: The QH structure.
4086 * @context: The priv pointer from a struct dwc2_hcd_urb. 4085 * @context: The priv pointer from a struct dwc2_hcd_urb.
4087 * @mem_flags: Flags for allocating memory. 4086 * @mem_flags: Flags for allocating memory.
4088 * @ttport: We'll return this device's port number here. That's used to 4087 * @ttport: We'll return this device's port number here. That's used to
diff --git a/drivers/usb/dwc2/hcd.h b/drivers/usb/dwc2/hcd.h
index 96a9da5fb202..7db1ee7e7a77 100644
--- a/drivers/usb/dwc2/hcd.h
+++ b/drivers/usb/dwc2/hcd.h
@@ -80,7 +80,7 @@ struct dwc2_qh;
80 * @xfer_count: Number of bytes transferred so far 80 * @xfer_count: Number of bytes transferred so far
81 * @start_pkt_count: Packet count at start of transfer 81 * @start_pkt_count: Packet count at start of transfer
82 * @xfer_started: True if the transfer has been started 82 * @xfer_started: True if the transfer has been started
83 * @ping: True if a PING request should be issued on this channel 83 * @do_ping: True if a PING request should be issued on this channel
84 * @error_state: True if the error count for this transaction is non-zero 84 * @error_state: True if the error count for this transaction is non-zero
85 * @halt_on_queue: True if this channel should be halted the next time a 85 * @halt_on_queue: True if this channel should be halted the next time a
86 * request is queued for the channel. This is necessary in 86 * request is queued for the channel. This is necessary in
@@ -102,7 +102,7 @@ struct dwc2_qh;
102 * @schinfo: Scheduling micro-frame bitmap 102 * @schinfo: Scheduling micro-frame bitmap
103 * @ntd: Number of transfer descriptors for the transfer 103 * @ntd: Number of transfer descriptors for the transfer
104 * @halt_status: Reason for halting the host channel 104 * @halt_status: Reason for halting the host channel
105 * @hcint Contents of the HCINT register when the interrupt came 105 * @hcint: Contents of the HCINT register when the interrupt came
106 * @qh: QH for the transfer being processed by this channel 106 * @qh: QH for the transfer being processed by this channel
107 * @hc_list_entry: For linking to list of host channels 107 * @hc_list_entry: For linking to list of host channels
108 * @desc_list_addr: Current QH's descriptor list DMA address 108 * @desc_list_addr: Current QH's descriptor list DMA address
@@ -237,7 +237,7 @@ struct dwc2_tt {
237/** 237/**
238 * struct dwc2_hs_transfer_time - Info about a transfer on the high speed bus. 238 * struct dwc2_hs_transfer_time - Info about a transfer on the high speed bus.
239 * 239 *
240 * @start_schedule_usecs: The start time on the main bus schedule. Note that 240 * @start_schedule_us: The start time on the main bus schedule. Note that
241 * the main bus schedule is tightly packed and this 241 * the main bus schedule is tightly packed and this
242 * time should be interpreted as tightly packed (so 242 * time should be interpreted as tightly packed (so
243 * uFrame 0 starts at 0 us, uFrame 1 starts at 100 us 243 * uFrame 0 starts at 0 us, uFrame 1 starts at 100 us
@@ -301,7 +301,6 @@ struct dwc2_hs_transfer_time {
301 * "struct dwc2_tt". Not used if this device is high 301 * "struct dwc2_tt". Not used if this device is high
302 * speed. Note that this is in "schedule slice" which 302 * speed. Note that this is in "schedule slice" which
303 * is tightly packed. 303 * is tightly packed.
304 * @ls_duration_us: Duration on the low speed bus schedule.
305 * @ntd: Actual number of transfer descriptors in a list 304 * @ntd: Actual number of transfer descriptors in a list
306 * @qtd_list: List of QTDs for this QH 305 * @qtd_list: List of QTDs for this QH
307 * @channel: Host channel currently processing transfers for this QH 306 * @channel: Host channel currently processing transfers for this QH
@@ -315,7 +314,7 @@ struct dwc2_hs_transfer_time {
315 * descriptor 314 * descriptor
316 * @unreserve_timer: Timer for releasing periodic reservation. 315 * @unreserve_timer: Timer for releasing periodic reservation.
317 * @wait_timer: Timer used to wait before re-queuing. 316 * @wait_timer: Timer used to wait before re-queuing.
318 * @dwc2_tt: Pointer to our tt info (or NULL if no tt). 317 * @dwc_tt: Pointer to our tt info (or NULL if no tt).
319 * @ttport: Port number within our tt. 318 * @ttport: Port number within our tt.
320 * @tt_buffer_dirty True if clear_tt_buffer_complete is pending 319 * @tt_buffer_dirty True if clear_tt_buffer_complete is pending
321 * @unreserve_pending: True if we planned to unreserve but haven't yet. 320 * @unreserve_pending: True if we planned to unreserve but haven't yet.
@@ -325,6 +324,7 @@ struct dwc2_hs_transfer_time {
325 * periodic transfers and is ignored for periodic ones. 324 * periodic transfers and is ignored for periodic ones.
326 * @wait_timer_cancel: Set to true to cancel the wait_timer. 325 * @wait_timer_cancel: Set to true to cancel the wait_timer.
327 * 326 *
327 * @tt_buffer_dirty: True if EP's TT buffer is not clean.
328 * A Queue Head (QH) holds the static characteristics of an endpoint and 328 * A Queue Head (QH) holds the static characteristics of an endpoint and
329 * maintains a list of transfers (QTDs) for that endpoint. A QH structure may 329 * maintains a list of transfers (QTDs) for that endpoint. A QH structure may
330 * be entered in either the non-periodic or periodic schedule. 330 * be entered in either the non-periodic or periodic schedule.
@@ -400,6 +400,10 @@ struct dwc2_qh {
400 * @urb: URB for this transfer 400 * @urb: URB for this transfer
401 * @qh: Queue head for this QTD 401 * @qh: Queue head for this QTD
402 * @qtd_list_entry: For linking to the QH's list of QTDs 402 * @qtd_list_entry: For linking to the QH's list of QTDs
403 * @isoc_td_first: Index of first activated isochronous transfer
404 * descriptor in Descriptor DMA mode
405 * @isoc_td_last: Index of last activated isochronous transfer
406 * descriptor in Descriptor DMA mode
403 * 407 *
404 * A Queue Transfer Descriptor (QTD) holds the state of a bulk, control, 408 * A Queue Transfer Descriptor (QTD) holds the state of a bulk, control,
405 * interrupt, or isochronous transfer. A single QTD is created for each URB 409 * interrupt, or isochronous transfer. A single QTD is created for each URB
diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c
index 28c8898b3b66..74f11c823f79 100644
--- a/drivers/usb/dwc2/hcd_ddma.c
+++ b/drivers/usb/dwc2/hcd_ddma.c
@@ -332,6 +332,7 @@ static void dwc2_release_channel_ddma(struct dwc2_hsotg *hsotg,
332 * 332 *
333 * @hsotg: The HCD state structure for the DWC OTG controller 333 * @hsotg: The HCD state structure for the DWC OTG controller
334 * @qh: The QH to init 334 * @qh: The QH to init
335 * @mem_flags: Indicates the type of memory allocation
335 * 336 *
336 * Return: 0 if successful, negative error code otherwise 337 * Return: 0 if successful, negative error code otherwise
337 * 338 *
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index a5dfd9d8bd9a..fbea5e3fb947 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -478,6 +478,12 @@ static u32 dwc2_get_actual_xfer_length(struct dwc2_hsotg *hsotg,
478 * of the URB based on the number of bytes transferred via the host channel. 478 * of the URB based on the number of bytes transferred via the host channel.
479 * Sets the URB status if the data transfer is finished. 479 * Sets the URB status if the data transfer is finished.
480 * 480 *
481 * @hsotg: Programming view of the DWC_otg controller
482 * @chan: Programming view of host channel
483 * @chnum: Channel number
484 * @urb: Processing URB
485 * @qtd: Queue transfer descriptor
486 *
481 * Return: 1 if the data transfer specified by the URB is completely finished, 487 * Return: 1 if the data transfer specified by the URB is completely finished,
482 * 0 otherwise 488 * 0 otherwise
483 */ 489 */
@@ -566,6 +572,12 @@ void dwc2_hcd_save_data_toggle(struct dwc2_hsotg *hsotg,
566 * halt_status. Completes the Isochronous URB if all the URB frames have been 572 * halt_status. Completes the Isochronous URB if all the URB frames have been
567 * completed. 573 * completed.
568 * 574 *
575 * @hsotg: Programming view of the DWC_otg controller
576 * @chan: Programming view of host channel
577 * @chnum: Channel number
578 * @halt_status: Reason for halting a host channel
579 * @qtd: Queue transfer descriptor
580 *
569 * Return: DWC2_HC_XFER_COMPLETE if there are more frames remaining to be 581 * Return: DWC2_HC_XFER_COMPLETE if there are more frames remaining to be
570 * transferred in the URB. Otherwise return DWC2_HC_XFER_URB_COMPLETE. 582 * transferred in the URB. Otherwise return DWC2_HC_XFER_URB_COMPLETE.
571 */ 583 */
diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c
index e34ad5e65350..d7c3d6c776d8 100644
--- a/drivers/usb/dwc2/hcd_queue.c
+++ b/drivers/usb/dwc2/hcd_queue.c
@@ -679,6 +679,7 @@ static int dwc2_hs_pmap_schedule(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
679 * 679 *
680 * @hsotg: The HCD state structure for the DWC OTG controller. 680 * @hsotg: The HCD state structure for the DWC OTG controller.
681 * @qh: QH for the periodic transfer. 681 * @qh: QH for the periodic transfer.
682 * @index: Transfer index
682 */ 683 */
683static void dwc2_hs_pmap_unschedule(struct dwc2_hsotg *hsotg, 684static void dwc2_hs_pmap_unschedule(struct dwc2_hsotg *hsotg,
684 struct dwc2_qh *qh, int index) 685 struct dwc2_qh *qh, int index)
@@ -1276,7 +1277,7 @@ static void dwc2_do_unreserve(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
1276 * release the reservation. This worker is called after the appropriate 1277 * release the reservation. This worker is called after the appropriate
1277 * delay. 1278 * delay.
1278 * 1279 *
1279 * @work: Pointer to a qh unreserve_work. 1280 * @t: Address to a qh unreserve_work.
1280 */ 1281 */
1281static void dwc2_unreserve_timer_fn(struct timer_list *t) 1282static void dwc2_unreserve_timer_fn(struct timer_list *t)
1282{ 1283{
@@ -1631,7 +1632,7 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
1631 * @hsotg: The HCD state structure for the DWC OTG controller 1632 * @hsotg: The HCD state structure for the DWC OTG controller
1632 * @urb: Holds the information about the device/endpoint needed 1633 * @urb: Holds the information about the device/endpoint needed
1633 * to initialize the QH 1634 * to initialize the QH
1634 * @atomic_alloc: Flag to do atomic allocation if needed 1635 * @mem_flags: Flags for allocating memory.
1635 * 1636 *
1636 * Return: Pointer to the newly allocated QH, or NULL on error 1637 * Return: Pointer to the newly allocated QH, or NULL on error
1637 */ 1638 */
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 2700f5279285..b43d8c6a749d 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -269,6 +269,9 @@ static void dwc2_set_param_power_down(struct dwc2_hsotg *hsotg)
269/** 269/**
270 * dwc2_set_default_params() - Set all core parameters to their 270 * dwc2_set_default_params() - Set all core parameters to their
271 * auto-detected default values. 271 * auto-detected default values.
272 *
273 * @hsotg: Programming view of the DWC_otg controller
274 *
272 */ 275 */
273static void dwc2_set_default_params(struct dwc2_hsotg *hsotg) 276static void dwc2_set_default_params(struct dwc2_hsotg *hsotg)
274{ 277{
@@ -339,6 +342,8 @@ static void dwc2_set_default_params(struct dwc2_hsotg *hsotg)
339/** 342/**
340 * dwc2_get_device_properties() - Read in device properties. 343 * dwc2_get_device_properties() - Read in device properties.
341 * 344 *
345 * @hsotg: Programming view of the DWC_otg controller
346 *
342 * Read in the device properties and adjust core parameters if needed. 347 * Read in the device properties and adjust core parameters if needed.
343 */ 348 */
344static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg) 349static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg)
@@ -690,6 +695,9 @@ static void dwc2_get_dev_hwparams(struct dwc2_hsotg *hsotg)
690/** 695/**
691 * During device initialization, read various hardware configuration 696 * During device initialization, read various hardware configuration
692 * registers and interpret the contents. 697 * registers and interpret the contents.
698 *
699 * @hsotg: Programming view of the DWC_otg controller
700 *
693 */ 701 */
694int dwc2_get_hwparams(struct dwc2_hsotg *hsotg) 702int dwc2_get_hwparams(struct dwc2_hsotg *hsotg)
695{ 703{
diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c
index 7f21747007f1..e9e26f021a89 100644
--- a/drivers/usb/dwc2/pci.c
+++ b/drivers/usb/dwc2/pci.c
@@ -77,6 +77,12 @@ static int dwc2_pci_quirks(struct pci_dev *pdev, struct platform_device *dwc2)
77 return 0; 77 return 0;
78} 78}
79 79
80/**
81 * dwc2_pci_probe() - Provides the cleanup entry points for the DWC_otg PCI
82 * driver
83 *
84 * @pci: The programming view of DWC_otg PCI
85 */
80static void dwc2_pci_remove(struct pci_dev *pci) 86static void dwc2_pci_remove(struct pci_dev *pci)
81{ 87{
82 struct dwc2_pci_glue *glue = pci_get_drvdata(pci); 88 struct dwc2_pci_glue *glue = pci_get_drvdata(pci);