最終更新:2014-06-04 (水) 05:41:55 (1841d)  

dwc3 はてなブックマークを見る
Top / dwc3

representation of our controller

struct dwc3 {
        struct usb_ctrlrequest  *ctrl_req;
        struct dwc3_trb         *ep0_trb;
        void                    *ep0_bounce;
        u8                      *setup_buf;
        dma_addr_t              ctrl_req_addr;
        dma_addr_t              ep0_trb_addr;
        dma_addr_t              ep0_bounce_addr;
        struct dwc3_request     ep0_usb_req;

        /* device lock */
        spinlock_t              lock;

        struct device           *dev;

        struct platform_device  *xhci;
        struct resource         xhci_resources[DWC3_XHCI_RESOURCES_NUM];

        struct dwc3_event_buffer **ev_buffs;
        struct dwc3_ep          *eps[DWC3_ENDPOINTS_NUM];

        struct usb_gadget       gadget;
        struct usb_gadget_driver *gadget_driver;

        struct usb_phy          *usb2_phy;
        struct usb_phy          *usb3_phy;

        void __iomem            *regs;
        size_t                  regs_size;

        enum usb_dr_mode        dr_mode;

        /* used for suspend/resume */
        u32                     dcfg;
        u32                     gctl;

        u32                     num_event_buffers;
        u32                     u1u2;
        u32                     maximum_speed;
        u32                     revision;

#define DWC3_REVISION_173A      0x5533173a
#define DWC3_REVISION_175A      0x5533175a
#define DWC3_REVISION_180A      0x5533180a
#define DWC3_REVISION_183A      0x5533183a
#define DWC3_REVISION_185A      0x5533185a
#define DWC3_REVISION_187A      0x5533187a
#define DWC3_REVISION_188A      0x5533188a
#define DWC3_REVISION_190A      0x5533190a
#define DWC3_REVISION_194A      0x5533194a
#define DWC3_REVISION_200A      0x5533200a
#define DWC3_REVISION_202A      0x5533202a
#define DWC3_REVISION_210A      0x5533210a
#define DWC3_REVISION_220A      0x5533220a
#define DWC3_REVISION_230A      0x5533230a
#define DWC3_REVISION_240A      0x5533240a
#define DWC3_REVISION_250A      0x5533250a

        unsigned                is_selfpowered:1;
        unsigned                three_stage_setup:1;
        unsigned                ep0_bounced:1;
        unsigned                ep0_expect_in:1;
        unsigned                start_config_issued:1;
        unsigned                setup_packet_pending:1;
        unsigned                delayed_status:1;
        unsigned                needs_fifo_resize:1;
        unsigned                resize_fifos:1;
        unsigned                pullups_connected:1;

        enum dwc3_ep0_next      ep0_next_event;
        enum dwc3_ep0_state     ep0state;
        enum dwc3_link_state    link_state;

        u16                     isoch_delay;
        u16                     u2sel;
        u16                     u2pel;
        u8                      u1sel;
        u8                      u1pel;

        u8                      speed;

        u8                      num_out_eps;
        u8                      num_in_eps;

        void                    *mem;

        struct dwc3_hwparams    hwparams;
        struct dentry           *root;
        struct debugfs_regset32 *regset;

        u8                      test_mode;
        u8                      test_mode_nr;
};

メンバ

関連