/drivers/usb/dwc3/ |
D | core.c | 69 void dwc3_set_mode(struct dwc3 *dwc, u32 mode) in dwc3_set_mode() argument 73 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_set_mode() 76 dwc3_writel(dwc->regs, DWC3_GCTL, reg); in dwc3_set_mode() 83 static void dwc3_core_soft_reset(struct dwc3 *dwc) in dwc3_core_soft_reset() argument 88 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_core_soft_reset() 90 dwc3_writel(dwc->regs, DWC3_GCTL, reg); in dwc3_core_soft_reset() 93 reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); in dwc3_core_soft_reset() 95 dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); in dwc3_core_soft_reset() 98 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); in dwc3_core_soft_reset() 100 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); in dwc3_core_soft_reset() [all …]
|
D | ep0.c | 57 static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep); 58 static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, 77 static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma, in dwc3_ep0_start_trans() argument 86 dep = dwc->eps[epnum]; in dwc3_ep0_start_trans() 88 dev_vdbg(dwc->dev, "%s: still busy\n", dep->name); in dwc3_ep0_start_trans() 92 trb = dwc->ep0_trb; in dwc3_ep0_start_trans() 105 params.param0 = upper_32_bits(dwc->ep0_trb_addr); in dwc3_ep0_start_trans() 106 params.param1 = lower_32_bits(dwc->ep0_trb_addr); in dwc3_ep0_start_trans() 108 ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, in dwc3_ep0_start_trans() 111 dev_dbg(dwc->dev, "failed to send STARTTRANSFER command\n"); in dwc3_ep0_start_trans() [all …]
|
D | gadget.c | 66 int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode) in dwc3_gadget_set_test_mode() argument 70 reg = dwc3_readl(dwc->regs, DWC3_DCTL); in dwc3_gadget_set_test_mode() 85 dwc3_writel(dwc->regs, DWC3_DCTL, reg); in dwc3_gadget_set_test_mode() 98 int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) in dwc3_gadget_set_link_state() argument 107 if (dwc->revision >= DWC3_REVISION_194A) { in dwc3_gadget_set_link_state() 109 reg = dwc3_readl(dwc->regs, DWC3_DSTS); in dwc3_gadget_set_link_state() 120 reg = dwc3_readl(dwc->regs, DWC3_DCTL); in dwc3_gadget_set_link_state() 125 dwc3_writel(dwc->regs, DWC3_DCTL, reg); in dwc3_gadget_set_link_state() 131 if (dwc->revision >= DWC3_REVISION_194A) in dwc3_gadget_set_link_state() 137 reg = dwc3_readl(dwc->regs, DWC3_DSTS); in dwc3_gadget_set_link_state() [all …]
|
D | host.c | 42 int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument 49 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); in dwc3_host_init() 54 dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); in dwc3_host_init() 56 xhci->dev.parent = dwc->dev; in dwc3_host_init() 57 xhci->dev.dma_mask = dwc->dev->dma_mask; in dwc3_host_init() 58 xhci->dev.dma_parms = dwc->dev->dma_parms; in dwc3_host_init() 60 dwc->xhci = xhci; in dwc3_host_init() 62 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init() 65 dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); in dwc3_host_init() 71 dev_err(dwc->dev, "failed to register xHCI device\n"); in dwc3_host_init() [all …]
|
D | debugfs.c | 382 struct dwc3 *dwc = s->private; in dwc3_mode_show() local 386 spin_lock_irqsave(&dwc->lock, flags); in dwc3_mode_show() 387 reg = dwc3_readl(dwc->regs, DWC3_GCTL); in dwc3_mode_show() 388 spin_unlock_irqrestore(&dwc->lock, flags); in dwc3_mode_show() 416 struct dwc3 *dwc = s->private; in dwc3_mode_write() local 434 spin_lock_irqsave(&dwc->lock, flags); in dwc3_mode_write() 435 dwc3_set_mode(dwc, mode); in dwc3_mode_write() 436 spin_unlock_irqrestore(&dwc->lock, flags); in dwc3_mode_write() 451 struct dwc3 *dwc = s->private; in dwc3_testmode_show() local 455 spin_lock_irqsave(&dwc->lock, flags); in dwc3_testmode_show() [all …]
|
D | core.h | 390 struct dwc3 *dwc; member 433 struct dwc3 *dwc; member 889 void dwc3_set_mode(struct dwc3 *dwc, u32 mode); 890 int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc); 893 int dwc3_host_init(struct dwc3 *dwc); 894 void dwc3_host_exit(struct dwc3 *dwc); 896 static inline int dwc3_host_init(struct dwc3 *dwc) in dwc3_host_init() argument 898 static inline void dwc3_host_exit(struct dwc3 *dwc) in dwc3_host_exit() argument 903 int dwc3_gadget_init(struct dwc3 *dwc); 904 void dwc3_gadget_exit(struct dwc3 *dwc); [all …]
|
D | gadget.h | 108 int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode); 109 int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state); 111 void dwc3_ep0_interrupt(struct dwc3 *dwc, 113 void dwc3_ep0_out_start(struct dwc3 *dwc); 118 int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep, 120 int dwc3_send_gadget_generic_command(struct dwc3 *dwc, int cmd, u32 param); 129 static inline u32 dwc3_gadget_ep_get_transfer_index(struct dwc3 *dwc, u8 number) in dwc3_gadget_ep_get_transfer_index() argument 133 res_id = dwc3_readl(dwc->regs, DWC3_DEPCMD(number)); in dwc3_gadget_ep_get_transfer_index()
|
/drivers/dma/ |
D | dw_dmac.c | 54 static inline void dwc_set_masters(struct dw_dma_chan *dwc) in dwc_set_masters() argument 56 struct dw_dma *dw = to_dw_dma(dwc->chan.device); in dwc_set_masters() 57 struct dw_dma_slave *dws = dwc->chan.private; in dwc_set_masters() 60 if (dwc->request_line == ~0) { in dwc_set_masters() 61 dwc->src_master = min_t(unsigned char, mmax, dwc_get_sms(dws)); in dwc_set_masters() 62 dwc->dst_master = min_t(unsigned char, mmax, dwc_get_dms(dws)); in dwc_set_masters() 101 static struct dw_desc *dwc_first_active(struct dw_dma_chan *dwc) in dwc_first_active() argument 103 return to_dw_desc(dwc->active_list.next); in dwc_first_active() 106 static struct dw_desc *dwc_desc_get(struct dw_dma_chan *dwc) in dwc_desc_get() argument 113 spin_lock_irqsave(&dwc->lock, flags); in dwc_desc_get() [all …]
|
D | dw_dmac_regs.h | 226 __dwc_regs(struct dw_dma_chan *dwc) in __dwc_regs() argument 228 return dwc->ch_regs; in __dwc_regs() 231 #define channel_readl(dwc, name) \ argument 232 dma_readl_native(&(__dwc_regs(dwc)->name)) 233 #define channel_writel(dwc, name, val) \ argument 234 dma_writel_native((val), &(__dwc_regs(dwc)->name))
|