Home
last modified time | relevance | path

Searched refs:dwc (Results 1 – 10 of 10) sorted by relevance

/drivers/usb/dwc3/
Dcore.c53 void dwc3_set_mode(struct dwc3 *dwc, u32 mode) in dwc3_set_mode() argument
57 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_set_mode()
60 dwc3_writel(dwc->regs, DWC3_GCTL, reg); in dwc3_set_mode()
67 static int dwc3_core_soft_reset(struct dwc3 *dwc) in dwc3_core_soft_reset() argument
73 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_core_soft_reset()
75 dwc3_writel(dwc->regs, DWC3_GCTL, reg); in dwc3_core_soft_reset()
78 reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); in dwc3_core_soft_reset()
80 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); in dwc3_core_soft_reset()
83 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); in dwc3_core_soft_reset()
85 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); in dwc3_core_soft_reset()
[all …]
Dep0.c38 static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep);
39 static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
58 static void dwc3_ep0_prepare_one_trb(struct dwc3 *dwc, u8 epnum, in dwc3_ep0_prepare_one_trb() argument
64 dep = dwc->eps[epnum]; in dwc3_ep0_prepare_one_trb()
66 trb = &dwc->ep0_trb[dep->free_slot]; in dwc3_ep0_prepare_one_trb()
88 static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum) in dwc3_ep0_start_trans() argument
94 dep = dwc->eps[epnum]; in dwc3_ep0_start_trans()
101 params.param0 = upper_32_bits(dwc->ep0_trb_addr); in dwc3_ep0_start_trans()
102 params.param1 = lower_32_bits(dwc->ep0_trb_addr); in dwc3_ep0_start_trans()
104 ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, in dwc3_ep0_start_trans()
[all …]
Dgadget.c47 int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode) in dwc3_gadget_set_test_mode() argument
51 reg = dwc3_readl(dwc->regs, DWC3_DCTL); in dwc3_gadget_set_test_mode()
66 dwc3_writel(dwc->regs, DWC3_DCTL, reg); in dwc3_gadget_set_test_mode()
78 int dwc3_gadget_get_link_state(struct dwc3 *dwc) in dwc3_gadget_get_link_state() argument
82 reg = dwc3_readl(dwc->regs, DWC3_DSTS); in dwc3_gadget_get_link_state()
95 int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) in dwc3_gadget_set_link_state() argument
104 if (dwc->revision >= DWC3_REVISION_194A) { in dwc3_gadget_set_link_state()
106 reg = dwc3_readl(dwc->regs, DWC3_DSTS); in dwc3_gadget_set_link_state()
117 reg = dwc3_readl(dwc->regs, DWC3_DCTL); in dwc3_gadget_set_link_state()
122 dwc3_writel(dwc->regs, DWC3_DCTL, reg); in dwc3_gadget_set_link_state()
[all …]
Dhost.c23 int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument
31 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); in dwc3_host_init()
35 dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); in dwc3_host_init()
37 xhci->dev.parent = dwc->dev; in dwc3_host_init()
38 xhci->dev.dma_mask = dwc->dev->dma_mask; in dwc3_host_init()
39 xhci->dev.dma_parms = dwc->dev->dma_parms; in dwc3_host_init()
41 dwc->xhci = xhci; in dwc3_host_init()
43 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init()
46 dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); in dwc3_host_init()
52 pdata.usb3_lpm_capable = dwc->usb3_lpm_capable; in dwc3_host_init()
[all …]
Dulpi.c27 static int dwc3_ulpi_busyloop(struct dwc3 *dwc, u8 addr, bool read) in dwc3_ulpi_busyloop() argument
41 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_busyloop()
52 struct dwc3 *dwc = dev_get_drvdata(ops->dev); in dwc3_ulpi_read() local
57 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_read()
59 ret = dwc3_ulpi_busyloop(dwc, addr, true); in dwc3_ulpi_read()
63 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYACC(0)); in dwc3_ulpi_read()
70 struct dwc3 *dwc = dev_get_drvdata(ops->dev); in dwc3_ulpi_write() local
75 dwc3_writel(dwc->regs, DWC3_GUSB2PHYACC(0), reg); in dwc3_ulpi_write()
77 return dwc3_ulpi_busyloop(dwc, addr, false); in dwc3_ulpi_write()
85 int dwc3_ulpi_init(struct dwc3 *dwc) in dwc3_ulpi_init() argument
[all …]
Ddebugfs.c362 struct dwc3 *dwc = s->private; in dwc3_mode_show() local
366 spin_lock_irqsave(&dwc->lock, flags); in dwc3_mode_show()
367 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_mode_show()
368 spin_unlock_irqrestore(&dwc->lock, flags); in dwc3_mode_show()
396 struct dwc3 *dwc = s->private; in dwc3_mode_write() local
414 spin_lock_irqsave(&dwc->lock, flags); in dwc3_mode_write()
415 dwc3_set_mode(dwc, mode); in dwc3_mode_write()
416 spin_unlock_irqrestore(&dwc->lock, flags); in dwc3_mode_write()
431 struct dwc3 *dwc = s->private; in dwc3_testmode_show() local
435 spin_lock_irqsave(&dwc->lock, flags); in dwc3_testmode_show()
[all …]
Dcore.h429 struct dwc3 *dwc; member
472 struct dwc3 *dwc; member
1024 void dwc3_set_mode(struct dwc3 *dwc, u32 mode);
1025 int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc);
1028 int dwc3_host_init(struct dwc3 *dwc);
1029 void dwc3_host_exit(struct dwc3 *dwc);
1031 static inline int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument
1033 static inline void dwc3_host_exit(struct dwc3 *dwc) in dwc3_host_exit() argument
1038 int dwc3_gadget_init(struct dwc3 *dwc);
1039 void dwc3_gadget_exit(struct dwc3 *dwc);
[all …]
Dgadget.h82 void dwc3_ep0_interrupt(struct dwc3 *dwc,
84 void dwc3_ep0_out_start(struct dwc3 *dwc);
98 static inline u32 dwc3_gadget_ep_get_transfer_index(struct dwc3 *dwc, u8 number) in dwc3_gadget_ep_get_transfer_index() argument
102 res_id = dwc3_readl(dwc->regs, DWC3_DEPCMD(number)); in dwc3_gadget_ep_get_transfer_index()
/drivers/dma/dw/
Dcore.c78 static struct dw_desc *dwc_first_active(struct dw_dma_chan *dwc) in dwc_first_active() argument
80 return to_dw_desc(dwc->active_list.next); in dwc_first_active()
83 static struct dw_desc *dwc_desc_get(struct dw_dma_chan *dwc) in dwc_desc_get() argument
90 spin_lock_irqsave(&dwc->lock, flags); in dwc_desc_get()
91 list_for_each_entry_safe(desc, _desc, &dwc->free_list, desc_node) { in dwc_desc_get()
98 dev_dbg(chan2dev(&dwc->chan), "desc %p not ACKed\n", desc); in dwc_desc_get()
100 spin_unlock_irqrestore(&dwc->lock, flags); in dwc_desc_get()
102 dev_vdbg(chan2dev(&dwc->chan), "scanned %u descriptors on freelist\n", i); in dwc_desc_get()
111 static void dwc_desc_put(struct dw_dma_chan *dwc, struct dw_desc *desc) in dwc_desc_put() argument
118 spin_lock_irqsave(&dwc->lock, flags); in dwc_desc_put()
[all …]
Dregs.h260 __dwc_regs(struct dw_dma_chan *dwc) in __dwc_regs() argument
262 return dwc->ch_regs; in __dwc_regs()
265 #define channel_readl(dwc, name) \ argument
266 dma_readl_native(&(__dwc_regs(dwc)->name))
267 #define channel_writel(dwc, name, val) \ argument
268 dma_writel_native((val), &(__dwc_regs(dwc)->name))