diff options
author | Felipe Balbi <balbi@ti.com> | 2013-12-19 13:12:37 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-03-05 10:44:50 -0500 |
commit | f2b685d5aad81facb85542227f5f8215eda8f4ce (patch) | |
tree | 8f0dfaf3893d1fd932d5fe057e082499b1f8eddb /drivers/usb/dwc3 | |
parent | e1dadd3b0f277e59847d6b7de86ff67306bee4b1 (diff) |
usb: dwc3: cleanup struct dwc3
move 1-bit flags to the bottom of the structure,
sort all bit flags alphabetically, add documentation
which was missing.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index f2693b63b710..eab166a02cd6 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h | |||
@@ -616,14 +616,6 @@ struct dwc3_scratchpad_array { | |||
616 | * @usb3_phy: pointer to USB3 PHY | 616 | * @usb3_phy: pointer to USB3 PHY |
617 | * @dcfg: saved contents of DCFG register | 617 | * @dcfg: saved contents of DCFG register |
618 | * @gctl: saved contents of GCTL register | 618 | * @gctl: saved contents of GCTL register |
619 | * @is_selfpowered: true when we are selfpowered | ||
620 | * @three_stage_setup: set if we perform a three phase setup | ||
621 | * @ep0_bounced: true when we used bounce buffer | ||
622 | * @ep0_expect_in: true when we expect a DATA IN transfer | ||
623 | * @start_config_issued: true when StartConfig command has been issued | ||
624 | * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround | ||
625 | * @needs_fifo_resize: not all users might want fifo resizing, flag it | ||
626 | * @resize_fifos: tells us it's ok to reconfigure our TxFIFO sizes. | ||
627 | * @isoch_delay: wValue from Set Isochronous Delay request; | 619 | * @isoch_delay: wValue from Set Isochronous Delay request; |
628 | * @u2sel: parameter from Set SEL request. | 620 | * @u2sel: parameter from Set SEL request. |
629 | * @u2pel: parameter from Set SEL request. | 621 | * @u2pel: parameter from Set SEL request. |
@@ -638,6 +630,19 @@ struct dwc3_scratchpad_array { | |||
638 | * @mem: points to start of memory which is used for this struct. | 630 | * @mem: points to start of memory which is used for this struct. |
639 | * @hwparams: copy of hwparams registers | 631 | * @hwparams: copy of hwparams registers |
640 | * @root: debugfs root folder pointer | 632 | * @root: debugfs root folder pointer |
633 | * @regset: debugfs pointer to regdump file | ||
634 | * @test_mode: true when we're entering a USB test mode | ||
635 | * @test_mode_nr: test feature selector | ||
636 | * @delayed_status: true when gadget driver asks for delayed status | ||
637 | * @ep0_bounced: true when we used bounce buffer | ||
638 | * @ep0_expect_in: true when we expect a DATA IN transfer | ||
639 | * @is_selfpowered: true when we are selfpowered | ||
640 | * @needs_fifo_resize: not all users might want fifo resizing, flag it | ||
641 | * @pullups_connected: true when Run/Stop bit is set | ||
642 | * @resize_fifos: tells us it's ok to reconfigure our TxFIFO sizes. | ||
643 | * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround | ||
644 | * @start_config_issued: true when StartConfig command has been issued | ||
645 | * @three_stage_setup: set if we perform a three phase setup | ||
641 | */ | 646 | */ |
642 | struct dwc3 { | 647 | struct dwc3 { |
643 | struct usb_ctrlrequest *ctrl_req; | 648 | struct usb_ctrlrequest *ctrl_req; |
@@ -697,17 +702,6 @@ struct dwc3 { | |||
697 | #define DWC3_REVISION_240A 0x5533240a | 702 | #define DWC3_REVISION_240A 0x5533240a |
698 | #define DWC3_REVISION_250A 0x5533250a | 703 | #define DWC3_REVISION_250A 0x5533250a |
699 | 704 | ||
700 | unsigned is_selfpowered:1; | ||
701 | unsigned three_stage_setup:1; | ||
702 | unsigned ep0_bounced:1; | ||
703 | unsigned ep0_expect_in:1; | ||
704 | unsigned start_config_issued:1; | ||
705 | unsigned setup_packet_pending:1; | ||
706 | unsigned delayed_status:1; | ||
707 | unsigned needs_fifo_resize:1; | ||
708 | unsigned resize_fifos:1; | ||
709 | unsigned pullups_connected:1; | ||
710 | |||
711 | enum dwc3_ep0_next ep0_next_event; | 705 | enum dwc3_ep0_next ep0_next_event; |
712 | enum dwc3_ep0_state ep0state; | 706 | enum dwc3_ep0_state ep0state; |
713 | enum dwc3_link_state link_state; | 707 | enum dwc3_link_state link_state; |
@@ -731,6 +725,17 @@ struct dwc3 { | |||
731 | 725 | ||
732 | u8 test_mode; | 726 | u8 test_mode; |
733 | u8 test_mode_nr; | 727 | u8 test_mode_nr; |
728 | |||
729 | unsigned delayed_status:1; | ||
730 | unsigned ep0_bounced:1; | ||
731 | unsigned ep0_expect_in:1; | ||
732 | unsigned is_selfpowered:1; | ||
733 | unsigned needs_fifo_resize:1; | ||
734 | unsigned pullups_connected:1; | ||
735 | unsigned resize_fifos:1; | ||
736 | unsigned setup_packet_pending:1; | ||
737 | unsigned start_config_issued:1; | ||
738 | unsigned three_stage_setup:1; | ||
734 | }; | 739 | }; |
735 | 740 | ||
736 | /* -------------------------------------------------------------------------- */ | 741 | /* -------------------------------------------------------------------------- */ |