Home
last modified time | relevance | path

Searched full:udc (Results 1 – 25 of 216) sorted by relevance

123456789

/linux-6.12.1/drivers/usb/gadget/udc/
Dsnps_udc_plat.c3 * snps_udc_plat.c - Synopsys UDC Platform Driver
20 #define UDC_MOD_DESCRIPTION "Synopsys UDC platform driver"
22 static void start_udc(struct udc *udc) in start_udc() argument
24 if (udc->driver) { in start_udc()
25 dev_info(udc->dev, "Connecting...\n"); in start_udc()
26 udc_enable_dev_setup_interrupts(udc); in start_udc()
27 udc_basic_init(udc); in start_udc()
28 udc->connected = 1; in start_udc()
32 static void stop_udc(struct udc *udc) in stop_udc() argument
37 spin_lock(&udc->lock); 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 …]
Dmax3420_udc.c157 struct max3420_udc *udc; member
190 static const char driver_name[] = "max3420-udc";
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()
[all …]
Dudc-xilinx.c124 * @udc: xilinx usb peripheral driver instance pointer
142 struct xusb_udc *udc; member
201 static const char driver_name[] = "xilinx-udc";
257 * @udc: pointer to the usb device controller structure.
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()
[all …]
Dbcm63xx_udc.c3 * bcm63xx_udc.c -- BCM63xx UDC high/full speed USB device controller
194 * @udc: Reference to the device controller.
217 struct bcm63xx_udc *udc; member
234 * @udc: Reference to the device controller.
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
[all …]
Dlpc32xx_udc.c101 struct lpc32xx_udc *udc; member
123 * Common UDC structure
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)
471 static const char debug_filename[] = "driver/udc";
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()
[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))
100 static const char debug_filename[] = "driver/udc";
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()
[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()
141 struct usba_udc *udc; in regs_dbg_open() local
147 udc = inode->i_private; in regs_dbg_open()
152 spin_lock_irq(&udc->lock); in regs_dbg_open()
154 data[i] = readl_relaxed(udc->regs + i * 4); in regs_dbg_open()
155 spin_unlock_irq(&udc->lock); in regs_dbg_open()
202 static void usba_ep_init_debugfs(struct usba_udc *udc, in usba_ep_init_debugfs() argument
207 ep_root = debugfs_create_dir(ep->ep.name, udc->debugfs_root); in usba_ep_init_debugfs()
[all …]
Daspeed_udc.c29 * UDC register definitions *
182 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()
[all …]
Dpxa27x_udc.c3 * Handles the Intel 27x USB Device Controller (UDC)
36 * This driver handles the USB Device Controller (UDC) in Intel's PXA 27x
45 * This UDC hardware wants to implement a bit too much USB protocol. The
64 * made of UDC's double buffering either. USB "On-The-Go" is not implemented.
91 struct pxa_udc *udc = s->private; in state_dbg_show() local
94 if (!udc->driver) in state_dbg_show()
102 udc->driver ? udc->driver->driver.name : "(none)"); in state_dbg_show()
104 tmp = udc_readl(udc, UDCCR); in state_dbg_show()
123 udc_readl(udc, UDCICR0), udc_readl(udc, UDCICR1)); in state_dbg_show()
125 udc_readl(udc, UDCISR0), udc_readl(udc, UDCISR1)); in state_dbg_show()
[all …]
Dfsl_qe_udc.c79 struct qe_udc *udc = ep->udc; in done() local
95 dma_unmap_single(udc->gadget.dev.parent, in done()
103 dma_sync_single_for_cpu(udc->gadget.dev.parent, in done()
110 dev_vdbg(udc->dev, "complete %s req %p stat %d len %u/%u\n", in done()
116 spin_unlock(&udc->lock); in done()
120 spin_lock(&udc->lock); in done()
147 struct qe_udc *udc = ep->udc; in qe_eprx_stall_change() local
149 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eprx_stall_change()
156 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eprx_stall_change()
164 struct qe_udc *udc = ep->udc; in qe_eptx_stall_change() local
[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 …]
Dcore.c3 * udc.c - Core UDC Framework
9 #define pr_fmt(fmt) "UDC core: " fmt
36 * @list: for use by the udc class driver
39 * @started: the UDC's started state. True if the UDC had started.
40 * @allow_connect: Indicates whether UDC is allowed to be pulled up.
44 * @connect_lock: protects udc->started, gadget->connect,
50 * This represents the internal data structure which is used by the UDC-class
51 * to hold information about udc driver and gadget together.
68 /* Protects udc_list, udc->driver, driver->is_bound, and related calls */
78 * This function should be used only in UDC drivers to initialize endpoint
[all …]
Dfsl_udc_core.c16 #define pr_fmt(x) "udc: " x
53 static const char driver_name[] = "fsl-usb2-udc";
155 __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()
186 dev_vdbg(&udc->gadget.dev, "complete %s req %p stat %d len %u/%u\n", in done()
192 spin_unlock(&ep->udc->lock); in done()
[all …]
Domap_udc.c3 * omap_udc.c -- for OMAP full speed udc; most chips support OTG.
65 * The OMAP UDC needs _very_ early endpoint setup: before enabling the
69 * optional new "UDC not yet running" state to the gadget driver model,
147 struct omap_udc *udc; in omap_ep_enable() local
191 udc = ep->udc; in omap_ep_enable()
192 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in omap_ep_enable()
197 spin_lock_irqsave(&udc->lock, flags); in omap_ep_enable()
209 omap_writew(udc->clr_halt, UDC_CTRL); in omap_ep_enable()
214 list_add(&ep->iso, &udc->iso); in omap_ep_enable()
229 spin_unlock_irqrestore(&udc->lock, flags); in omap_ep_enable()
[all …]
Damd5536udc_pci.c3 * amd5536udc_pci.c -- AMD 5536 UDC high/full speed USB device controller
10 * The AMD5536 UDC is part of the x86 southbridge AMD Geode CS5536.
14 * Make sure that UDC is assigned to port 4 by BIOS settings (port can also
18 * UDC DMA requires 32-bit aligned buffers so DMA with gadget ether does not
25 * The driver is split so as to use the core UDC driver which is based on
32 #define UDC_MOD_DESCRIPTION "AMD 5536 UDC - USB Device Controller"
45 /* udc specific */
49 static struct udc *udc; variable
57 struct udc *dev; in udc_pci_remove()
61 usb_del_gadget_udc(&udc->gadget); in udc_pci_remove()
[all …]
Dpxa27x_udc.h22 #define UDCCR 0x0000 /* UDC Control Register */
23 #define UDCICR0 0x0004 /* UDC Interrupt Control Register0 */
24 #define UDCICR1 0x0008 /* UDC Interrupt Control Register1 */
25 #define UDCISR0 0x000C /* UDC Interrupt Status Register 0 */
26 #define UDCISR1 0x0010 /* UDC Interrupt Status Register 1 */
27 #define UDCFNR 0x0014 /* UDC Frame Number Register */
28 #define UDCOTGICR 0x0018 /* UDC On-The-Go interrupt control */
31 #define UDCCSRn(x) (0x0100 + ((x)<<2)) /* UDC Control/Status register */
32 #define UDCBCRn(x) (0x0200 + ((x)<<2)) /* UDC Byte Count Register */
33 #define UDCDRn(x) (0x0300 + ((x)<<2)) /* UDC Data Register */
[all …]
/linux-6.12.1/drivers/usb/isp1760/
Disp1760-udc.c24 #include "isp1760-udc.h"
50 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
[all …]
/linux-6.12.1/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.c22 /* called with udc->lock held */
23 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
[all …]
Dvudc_transfer.c46 * @udc: pointer to vudc
56 * Adapted from drivers/usb/gadget/udc/dummy_hcd.c
58 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()
[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_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 …]
/linux-6.12.1/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.12.1/arch/arm/mach-pxa/
Dpxa27x-udc.h8 #error You cannot include both PXA25x and PXA27x UDC support
11 #define UDCCR __REG(0x40600000) /* UDC Control Register */
20 #define UDCCR_ACN (0x03 << 11) /* Active UDC configuration Number */
22 #define UDCCR_AIN (0x07 << 8) /* Active UDC interface Number */
24 #define UDCCR_AAISN (0x07 << 5) /* Active UDC Alternate Interface
31 #define UDCCR_UDR (1 << 2) /* UDC Resume */
32 #define UDCCR_UDA (1 << 1) /* UDC Active */
33 #define UDCCR_UDE (1 << 0) /* UDC Enable */
35 #define UDCICR0 __REG(0x40600004) /* UDC Interrupt Control Register0 */
36 #define UDCICR1 __REG(0x40600008) /* UDC Interrupt Control Register1 */
[all …]

123456789