Home
last modified time | relevance | path

Searched refs:udc (Results 1 – 25 of 119) sorted by relevance

12345

/linux-6.6.21/drivers/usb/gadget/udc/
Dsnps_udc_plat.c23 static void start_udc(struct udc *udc) in start_udc() argument
25 if (udc->driver) { in start_udc()
26 dev_info(udc->dev, "Connecting...\n"); in start_udc()
27 udc_enable_dev_setup_interrupts(udc); in start_udc()
28 udc_basic_init(udc); in start_udc()
29 udc->connected = 1; in start_udc()
33 static void stop_udc(struct udc *udc) in stop_udc() argument
38 spin_lock(&udc->lock); in stop_udc()
41 reg = readl(&udc->regs->ctl); in stop_udc()
43 writel(reg, &udc->regs->ctl); in stop_udc()
[all …]
Dmv_udc_core.c40 ((ep)->udc->ep0_dir) : ((ep)->direction))
58 static void stop_activity(struct mv_udc *udc, struct usb_gadget_driver *driver);
69 static void ep0_reset(struct mv_udc *udc) in ep0_reset() argument
77 ep = &udc->eps[i]; in ep0_reset()
78 ep->udc = udc; in ep0_reset()
81 ep->dqh = &udc->ep_dqh[i]; in ep0_reset()
90 epctrlx = readl(&udc->op_regs->epctrlx[0]); in ep0_reset()
102 writel(epctrlx, &udc->op_regs->epctrlx[0]); in ep0_reset()
107 static void ep0_stall(struct mv_udc *udc) in ep0_stall() argument
112 epctrlx = readl(&udc->op_regs->epctrlx[0]); in ep0_stall()
[all …]
Dlpc32xx_udc.c101 struct lpc32xx_udc *udc; member
188 dev_dbg(epp->udc->dev, "%s: " fmt, __func__, ## arg)
190 dev_err(epp->udc->dev, "%s: " fmt, __func__, ## arg)
192 dev_info(epp->udc->dev, "%s: " fmt, __func__, ## arg)
194 dev_warn(epp->udc->dev, "%s:" fmt, __func__, ## arg)
499 struct lpc32xx_udc *udc = s->private; in udc_show() local
505 spin_lock_irqsave(&udc->lock, flags); in udc_show()
508 udc->vbus ? "present" : "off", in udc_show()
509 udc->enabled ? (udc->vbus ? "active" : "enabled") : in udc_show()
511 udc->gadget.is_selfpowered ? "self" : "VBUS", in udc_show()
[all …]
Dbcm63xx_udc.c217 struct bcm63xx_udc *udc; member
242 struct bcm63xx_udc *udc; member
352 static inline u32 usbd_readl(struct bcm63xx_udc *udc, u32 off) in usbd_readl() argument
354 return bcm_readl(udc->usbd_regs + off); in usbd_readl()
357 static inline void usbd_writel(struct bcm63xx_udc *udc, u32 val, u32 off) in usbd_writel() argument
359 bcm_writel(val, udc->usbd_regs + off); in usbd_writel()
362 static inline u32 usb_dma_readl(struct bcm63xx_udc *udc, u32 off) in usb_dma_readl() argument
364 return bcm_readl(udc->iudma_regs + off); in usb_dma_readl()
367 static inline void usb_dma_writel(struct bcm63xx_udc *udc, u32 val, u32 off) in usb_dma_writel() argument
369 bcm_writel(val, udc->iudma_regs + off); in usb_dma_writel()
[all …]
Dudc-xilinx.c142 struct xusb_udc *udc; member
259 static void xudc_wrstatus(struct xusb_udc *udc) in xudc_wrstatus() argument
261 struct xusb_ep *ep0 = &udc->ep[XUSB_EP_NUMBER_ZERO]; in xudc_wrstatus()
264 epcfgreg = udc->read_fn(udc->addr + ep0->offset)| in xudc_wrstatus()
266 udc->write_fn(udc->addr, ep0->offset, epcfgreg); in xudc_wrstatus()
267 udc->write_fn(udc->addr, ep0->offset + XUSB_EP_BUF0COUNT_OFFSET, 0); in xudc_wrstatus()
268 udc->write_fn(udc->addr, XUSB_BUFFREADY_OFFSET, 1); in xudc_wrstatus()
279 static void xudc_epconfig(struct xusb_ep *ep, struct xusb_udc *udc) in xudc_epconfig() argument
289 udc->write_fn(udc->addr, ep->offset, epcfgreg); in xudc_epconfig()
292 udc->write_fn(udc->addr, ep->offset + XUSB_EP_BUF0COUNT_OFFSET, in xudc_epconfig()
[all …]
Dmax3420_udc.c157 struct max3420_udc *udc; member
199 static void spi_ack_ctrl(struct max3420_udc *udc) in spi_ack_ctrl() argument
201 struct spi_device *spi = udc->spi; in spi_ack_ctrl()
218 static u8 spi_rd8_ack(struct max3420_udc *udc, u8 reg, int actstat) in spi_rd8_ack() argument
220 struct spi_device *spi = udc->spi; in spi_rd8_ack()
240 static u8 spi_rd8(struct max3420_udc *udc, u8 reg) in spi_rd8() argument
242 return spi_rd8_ack(udc, reg, 0); in spi_rd8()
245 static void spi_wr8_ack(struct max3420_udc *udc, u8 reg, u8 val, int actstat) in spi_wr8_ack() argument
247 struct spi_device *spi = udc->spi; in spi_wr8_ack()
266 static void spi_wr8(struct max3420_udc *udc, u8 reg, u8 val) in spi_wr8() argument
[all …]
Dat91_udc.c89 #define at91_udp_read(udc, reg) \ argument
90 __raw_readl((udc)->udp_baseaddr + (reg))
91 #define at91_udp_write(udc, reg, val) \ argument
92 __raw_writel((val), (udc)->udp_baseaddr + (reg))
114 struct at91_udc *udc = ep->udc; in proc_ep_show() local
116 spin_lock_irqsave(&udc->lock, flags); in proc_ep_show()
160 spin_unlock_irqrestore(&udc->lock, flags); in proc_ep_show()
184 struct at91_udc *udc = s->private; in proc_udc_show() local
191 udc->vbus ? "present" : "off", in proc_udc_show()
192 udc->enabled in proc_udc_show()
[all …]
Daspeed_udc.c182 struct ast_udc_dev *udc; member
248 dev_dbg(&(e)->udc->pdev->dev, "%s():%s " fmt, __func__, \
269 #define ast_udc_read(udc, offset) \ argument
270 readl((udc)->reg + (offset))
271 #define ast_udc_write(udc, val, offset) \ argument
272 writel((val), (udc)->reg + (offset))
284 struct ast_udc_dev *udc = ep->udc; in ast_udc_done() local
300 spin_unlock(&udc->lock); in ast_udc_done()
302 spin_lock(&udc->lock); in ast_udc_done()
329 static void ast_udc_stop_activity(struct ast_udc_dev *udc) in ast_udc_stop_activity() argument
[all …]
Dfsl_qe_udc.c78 struct qe_udc *udc = ep->udc; in done() local
94 dma_unmap_single(udc->gadget.dev.parent, in done()
102 dma_sync_single_for_cpu(udc->gadget.dev.parent, in done()
109 dev_vdbg(udc->dev, "complete %s req %p stat %d len %u/%u\n", in done()
115 spin_unlock(&udc->lock); in done()
119 spin_lock(&udc->lock); in done()
146 struct qe_udc *udc = ep->udc; in qe_eprx_stall_change() local
148 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eprx_stall_change()
155 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eprx_stall_change()
163 struct qe_udc *udc = ep->udc; in qe_eptx_stall_change() local
[all …]
Datmel_usba_udc.c48 spin_lock_irq(&ep->udc->lock); in queue_dbg_open()
55 spin_unlock_irq(&ep->udc->lock); in queue_dbg_open()
61 spin_unlock_irq(&ep->udc->lock); in queue_dbg_open()
142 struct usba_udc *udc; in regs_dbg_open() local
148 udc = inode->i_private; in regs_dbg_open()
153 spin_lock_irq(&udc->lock); in regs_dbg_open()
155 data[i] = readl_relaxed(udc->regs + i * 4); in regs_dbg_open()
156 spin_unlock_irq(&udc->lock); in regs_dbg_open()
204 static void usba_ep_init_debugfs(struct usba_udc *udc, in usba_ep_init_debugfs() argument
209 ep_root = debugfs_create_dir(ep->ep.name, udc->debugfs_root); in usba_ep_init_debugfs()
[all …]
Dpxa27x_udc.c92 struct pxa_udc *udc = s->private; in state_dbg_show() local
95 if (!udc->driver) in state_dbg_show()
103 udc->driver ? udc->driver->driver.name : "(none)"); in state_dbg_show()
105 tmp = udc_readl(udc, UDCCR); in state_dbg_show()
124 udc_readl(udc, UDCICR0), udc_readl(udc, UDCICR1)); in state_dbg_show()
126 udc_readl(udc, UDCISR0), udc_readl(udc, UDCISR1)); in state_dbg_show()
127 seq_printf(s, "udcfnr=%d\n", udc_readl(udc, UDCFNR)); in state_dbg_show()
129 udc->stats.irqs_reset, udc->stats.irqs_suspend, in state_dbg_show()
130 udc->stats.irqs_resume, udc->stats.irqs_reconfig); in state_dbg_show()
138 struct pxa_udc *udc = s->private; in queues_dbg_show() local
[all …]
Dcore.c703 __must_hold(&gadget->udc->connect_lock) in usb_gadget_connect_locked()
712 if (gadget->deactivated || !gadget->udc->allow_connect || !gadget->udc->started) { in usb_gadget_connect_locked()
747 mutex_lock(&gadget->udc->connect_lock); in usb_gadget_connect()
749 mutex_unlock(&gadget->udc->connect_lock); in usb_gadget_connect()
756 __must_hold(&gadget->udc->connect_lock) in usb_gadget_disconnect_locked()
768 if (gadget->deactivated || !gadget->udc->started) { in usb_gadget_disconnect_locked()
782 if (gadget->udc->driver) in usb_gadget_disconnect_locked()
783 gadget->udc->driver->disconnect(gadget); in usb_gadget_disconnect_locked()
809 mutex_lock(&gadget->udc->connect_lock); in usb_gadget_disconnect()
811 mutex_unlock(&gadget->udc->connect_lock); in usb_gadget_disconnect()
[all …]
Drenesas_usbf.c281 struct usbf_udc *udc; member
426 static inline u32 usbf_reg_readl(struct usbf_udc *udc, uint offset) in usbf_reg_readl() argument
428 return readl(udc->regs + offset); in usbf_reg_readl()
431 static inline void usbf_reg_writel(struct usbf_udc *udc, uint offset, u32 val) in usbf_reg_writel() argument
433 writel(val, udc->regs + offset); in usbf_reg_writel()
436 static inline void usbf_reg_bitset(struct usbf_udc *udc, uint offset, u32 set) in usbf_reg_bitset() argument
440 tmp = usbf_reg_readl(udc, offset); in usbf_reg_bitset()
442 usbf_reg_writel(udc, offset, tmp); in usbf_reg_bitset()
445 static inline void usbf_reg_bitclr(struct usbf_udc *udc, uint offset, u32 clr) in usbf_reg_bitclr() argument
449 tmp = usbf_reg_readl(udc, offset); in usbf_reg_bitclr()
[all …]
Dfsl_udc_core.c155 __releases(ep->udc->lock) in done()
156 __acquires(ep->udc->lock) in done()
158 struct fsl_udc *udc = NULL; in done() local
163 udc = (struct fsl_udc *)ep->udc; in done()
180 dma_pool_free(udc->td_pool, curr_td, curr_td->td_dma); in done()
183 usb_gadget_unmap_request(&ep->udc->gadget, &req->req, ep_is_in(ep)); in done()
192 spin_unlock(&ep->udc->lock); in done()
196 spin_lock(&ep->udc->lock); in done()
224 static int dr_controller_setup(struct fsl_udc *udc) in dr_controller_setup() argument
236 switch (udc->phy_mode) { in dr_controller_setup()
[all …]
Domap_udc.c149 struct omap_udc *udc; in omap_ep_enable() local
193 udc = ep->udc; in omap_ep_enable()
194 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in omap_ep_enable()
199 spin_lock_irqsave(&udc->lock, flags); in omap_ep_enable()
211 omap_writew(udc->clr_halt, UDC_CTRL); in omap_ep_enable()
216 list_add(&ep->iso, &udc->iso); in omap_ep_enable()
231 spin_unlock_irqrestore(&udc->lock, flags); in omap_ep_enable()
249 spin_lock_irqsave(&ep->udc->lock, flags); in omap_ep_disable()
258 spin_unlock_irqrestore(&ep->udc->lock, flags); in omap_ep_disable()
293 struct omap_udc *udc = ep->udc; in done() local
[all …]
/linux-6.6.21/drivers/usb/isp1760/
Disp1760-udc.c50 static u32 isp1760_udc_read(struct isp1760_udc *udc, u16 field) in isp1760_udc_read() argument
52 return isp1760_field_read(udc->fields, field); in isp1760_udc_read()
55 static void isp1760_udc_write(struct isp1760_udc *udc, u16 field, u32 val) in isp1760_udc_write() argument
57 isp1760_field_write(udc->fields, field, val); in isp1760_udc_write()
60 static u32 isp1760_udc_read_raw(struct isp1760_udc *udc, u16 reg) in isp1760_udc_read_raw() argument
64 regmap_raw_read(udc->regs, reg, &val, 4); in isp1760_udc_read_raw()
69 static u16 isp1760_udc_read_raw16(struct isp1760_udc *udc, u16 reg) in isp1760_udc_read_raw16() argument
73 regmap_raw_read(udc->regs, reg, &val, 2); in isp1760_udc_read_raw16()
78 static void isp1760_udc_write_raw(struct isp1760_udc *udc, u16 reg, u32 val) in isp1760_udc_write_raw() argument
82 regmap_raw_write(udc->regs, reg, &val_le, 4); in isp1760_udc_write_raw()
[all …]
/linux-6.6.21/drivers/staging/emxx_udc/
Demxx_udc.c49 static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs);
56 #define _nbu2ss_zero_len_pkt(udc, epnum) \ argument
57 _nbu2ss_ep_in_end(udc, epnum, 0, 0)
97 static void _nbu2ss_dump_register(struct nbu2ss_udc *udc) in _nbu2ss_dump_register() argument
104 if (!udc) { in _nbu2ss_dump_register()
109 spin_unlock(&udc->lock); in _nbu2ss_dump_register()
111 dev_dbg(&udc->dev, "\n-USB REG-\n"); in _nbu2ss_dump_register()
114 dev_dbg(&udc->dev, "USB%04x =%08x", i, (int)reg_data); in _nbu2ss_dump_register()
117 dev_dbg(&udc->dev, " %08x", (int)reg_data); in _nbu2ss_dump_register()
120 dev_dbg(&udc->dev, " %08x", (int)reg_data); in _nbu2ss_dump_register()
[all …]
/linux-6.6.21/drivers/usb/usbip/
Dvudc_dev.c73 static void nuke(struct vudc *udc, struct vep *ep) in nuke() argument
83 spin_unlock(&udc->lock); in nuke()
85 spin_lock(&udc->lock); in nuke()
90 static void stop_activity(struct vudc *udc) in stop_activity() argument
95 udc->address = 0; in stop_activity()
98 nuke(udc, &udc->ep[i]); in stop_activity()
100 list_for_each_entry_safe(urb_p, tmp, &udc->urb_queue, urb_entry) { in stop_activity()
106 struct vep *vudc_find_endpoint(struct vudc *udc, u8 address) in vudc_find_endpoint() argument
111 return &udc->ep[0]; in vudc_find_endpoint()
114 struct vep *ep = &udc->ep[i]; in vudc_find_endpoint()
[all …]
Dvudc_sysfs.c23 int get_gadget_descs(struct vudc *udc) in get_gadget_descs() argument
26 struct vep *ep0 = to_vep(udc->gadget.ep0); in get_gadget_descs()
27 struct usb_device_descriptor *ddesc = &udc->dev_desc; in get_gadget_descs()
31 if (!udc->driver || !udc->pullup) in get_gadget_descs()
40 spin_unlock(&udc->lock); in get_gadget_descs()
41 ret = udc->driver->setup(&(udc->gadget), &req); in get_gadget_descs()
42 spin_lock(&udc->lock); in get_gadget_descs()
56 udc->desc_cached = 1; in get_gadget_descs()
74 struct vudc *udc = (struct vudc *)dev_get_drvdata(dev); in dev_desc_read() local
75 char *desc_ptr = (char *) &udc->dev_desc; in dev_desc_read()
[all …]
Dvudc_transfer.c58 static int handle_control_request(struct vudc *udc, struct urb *urb, in handle_control_request() argument
73 udc->address = w_value; in handle_control_request()
84 udc->gadget.b_hnp_enable = 1; in handle_control_request()
87 udc->gadget.a_hnp_support = 1; in handle_control_request()
90 udc->gadget.a_alt_hnp_support = 1; in handle_control_request()
96 udc->devstatus |= (1 << w_value); in handle_control_request()
101 ep2 = vudc_find_endpoint(udc, w_index); in handle_control_request()
102 if (!ep2 || ep2->ep.name == udc->ep[0].ep.name) { in handle_control_request()
129 udc->devstatus &= ~(1 << w_value); in handle_control_request()
134 ep2 = vudc_find_endpoint(udc, w_index); in handle_control_request()
[all …]
Dvudc_rx.c62 static int v_recv_cmd_unlink(struct vudc *udc, in v_recv_cmd_unlink() argument
68 spin_lock_irqsave(&udc->lock, flags); in v_recv_cmd_unlink()
69 list_for_each_entry(urb_p, &udc->urb_queue, urb_entry) { in v_recv_cmd_unlink()
74 v_kick_timer(udc, jiffies); in v_recv_cmd_unlink()
75 spin_unlock_irqrestore(&udc->lock, flags); in v_recv_cmd_unlink()
79 spin_lock(&udc->lock_tx); in v_recv_cmd_unlink()
80 v_enqueue_ret_unlink(udc, pdu->base.seqnum, 0); in v_recv_cmd_unlink()
81 wake_up(&udc->tx_waitq); in v_recv_cmd_unlink()
82 spin_unlock(&udc->lock_tx); in v_recv_cmd_unlink()
83 spin_unlock_irqrestore(&udc->lock, flags); in v_recv_cmd_unlink()
[all …]
Dvudc_tx.c38 static int v_send_ret_unlink(struct vudc *udc, struct v_unlink *unlink) in v_send_ret_unlink() argument
60 ret = kernel_sendmsg(udc->ud.tcp_socket, &msg, iov, in v_send_ret_unlink()
63 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_unlink()
73 static int v_send_ret_submit(struct vudc *udc, struct urbp *urb_p) in v_send_ret_submit() argument
89 dev_err(&udc->gadget.dev, in v_send_ret_submit()
102 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_MALLOC); in v_send_ret_submit()
141 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_submit()
154 usbip_event_add(&udc->ud, in v_send_ret_submit()
166 ret = kernel_sendmsg(udc->ud.tcp_socket, &msg, in v_send_ret_submit()
169 usbip_event_add(&udc->ud, VUDC_EVENT_ERROR_TCP); in v_send_ret_submit()
[all …]
Dvudc.h41 struct vudc *udc; member
146 int get_gadget_descs(struct vudc *udc);
151 void v_enqueue_ret_unlink(struct vudc *udc, __u32 seqnum, __u32 status);
152 void v_enqueue_ret_submit(struct vudc *udc, struct urbp *urb_p);
160 void v_init_timer(struct vudc *udc);
161 void v_start_timer(struct vudc *udc);
162 void v_kick_timer(struct vudc *udc, unsigned long time);
163 void v_stop_timer(struct vudc *udc);
170 struct vep *vudc_find_endpoint(struct vudc *udc, u8 address);
/linux-6.6.21/Documentation/ABI/stable/
Dsysfs-class-udc1 What: /sys/class/udc/<udc>/a_alt_hnp_support
9 What: /sys/class/udc/<udc>/a_hnp_support
17 What: /sys/class/udc/<udc>/b_hnp_enable
25 What: /sys/class/udc/<udc>/current_speed
33 What: /sys/class/udc/<udc>/is_a_peripheral
42 What: /sys/class/udc/<udc>/is_otg
50 What: /sys/class/udc/<udc>/maximum_speed
58 What: /sys/class/udc/<udc>/soft_connect
67 What: /sys/class/udc/<udc>/srp
75 What: /sys/class/udc/<udc>/state
[all …]
/linux-6.6.21/Documentation/devicetree/bindings/usb/
Dmaxim,max3420-udc.yaml4 $id: http://devicetree.org/schemas/usb/maxim,max3420-udc.yaml#
22 - maxim,max3420-udc
23 - maxim,max3421-udc
36 - const: udc
59 udc@0 {
60 compatible = "maxim,max3420-udc";
64 interrupt-names = "udc", "vbus";

12345