Home
last modified time | relevance | path

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

1234567

/linux/drivers/usb/isp1760/
H A 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/drivers/usb/gadget/udc/
H A 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 …]
H A 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 …]
H A 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 …]
H A Dat91_udc.c90 #define at91_udp_read(udc, reg) \ argument
91 __raw_readl((udc)->udp_baseaddr + (reg))
92 #define at91_udp_write(udc, reg, val) \ argument
93 __raw_writel((val), (udc)->udp_baseaddr + (reg))
101 static const char debug_filename[] = "driver/udc";
115 struct at91_udc *udc = ep->udc; in proc_ep_show() local
117 spin_lock_irqsave(&udc->lock, flags); in proc_ep_show()
161 spin_unlock_irqrestore(&udc->lock, flags); in proc_ep_show()
185 struct at91_udc *udc = s->private; in proc_udc_show() local
192 udc->vbus ? "present" : "off", in proc_udc_show()
[all …]
H A Domap_udc.c3 * omap_udc.c -- for OMAP full speed udc; most chips support OTG.
66 * The OMAP UDC needs _very_ early endpoint setup: before enabling the
70 * optional new "UDC not yet running" state to the gadget driver model,
148 struct omap_udc *udc; in omap_ep_enable() local
192 udc = ep->udc; in omap_ep_enable()
193 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in omap_ep_enable()
198 spin_lock_irqsave(&udc->lock, flags); in omap_ep_enable()
210 omap_writew(udc->clr_halt, UDC_CTRL); in omap_ep_enable()
215 list_add(&ep->iso, &udc->iso); in omap_ep_enable()
230 spin_unlock_irqrestore(&udc->lock, flags); in omap_ep_enable()
[all …]
H A 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 …]
H A 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 …]
H A Dpxa25x_udc.c47 #define UDCCR 0x0000 /* UDC Control Register */
48 #define UDC_RES1 0x0004 /* UDC Undocumented - Reserved1 */
49 #define UDC_RES2 0x0008 /* UDC Undocumented - Reserved2 */
50 #define UDC_RES3 0x000C /* UDC Undocumented - Reserved3 */
51 #define UDCCS0 0x0010 /* UDC Endpoint 0 Control/Status Register */
52 #define UDCCS1 0x0014 /* UDC Endpoint 1 (IN) Control/Status Register */
53 #define UDCCS2 0x0018 /* UDC Endpoint 2 (OUT) Control/Status Register */
54 #define UDCCS3 0x001C /* UDC Endpoint 3 (IN) Control/Status Register */
55 #define UDCCS4 0x0020 /* UDC Endpoint 4 (OUT) Control/Status Register */
56 #define UDCCS5 0x0024 /* UDC Endpoint 5 (Interrupt) Control/Status Register */
[all …]
H A Dsnps_udc_core.c3 * amd5536.c -- AMD 5536 UDC high/full speed USB device controller
10 * This file does the core driver implementation for the UDC that is based
39 static void udc_setup_endpoints(struct udc *dev);
40 static void udc_soft_reset(struct udc *dev);
46 static const char name[] = "udc";
55 static struct udc *udc; variable
77 * that UDC has only one bit (RDE) to enable/disable RX DMA for
183 /* Prints UDC device registers and endpoint irq registers */
184 static void print_regs(struct udc *dev) in print_regs()
217 int udc_mask_unused_interrupts(struct udc *dev) in udc_mask_unused_interrupts()
[all …]
/linux/drivers/usb/usbip/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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/Documentation/ABI/stable/
H A 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/arch/arm/mach-pxa/
H A 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 …]
/linux/Documentation/devicetree/bindings/usb/
H A Datmel-usb.txt58 "atmel,at91rm9200-udc"
59 "atmel,at91sam9260-udc"
60 "atmel,at91sam9261-udc"
61 "atmel,at91sam9263-udc"
74 compatible = "atmel,at91rm9200-udc";
86 "atmel,at91sam9rl-udc"
87 "atmel,at91sam9g45-udc"
88 "atmel,sama5d3-udc"
89 "microchip,sam9x60-udc"
90 "microchip,lan9662-udc"
[all …]
H A Diproc-udc.txt4 iProc family (Northstar2, Cygnus) of SoCs'. The UDC is based
10 For Broadcom NS2 platform, add "brcm,ns2-udc","brcm,iproc-udc".
11 For Broadcom Cygnus platform, add "brcm,cygnus-udc", "brcm,iproc-udc".
12 - reg: Offset and length of UDC register set
18 compatible = "brcm,ns2-udc", "brcm,iproc-udc";
H A Dpxa-usb.txt32 UDC
35 - compatible: Should be "marvell,pxa270-udc" for USB controllers
38 - interrupts: single interrupt generated by the UDC IP
39 - clocks: input clock of the UDC IP (see clock-bindings.txt)
47 pxa27x_udc: udc@40600000 {
48 compatible = "marvell,pxa270-udc";
H A Dci-hdrc-usb2.yaml19 - nuvoton,npcm750-udc
21 - nvidia,tegra20-udc
23 - nvidia,tegra30-udc
24 - nvidia,tegra114-udc
25 - nvidia,tegra124-udc
39 - nuvoton,npcm845-udc
40 - const: nuvoton,npcm750-udc
H A Dnxp,lpc3220-udc.yaml4 $id: http://devicetree.org/schemas/usb/nxp,lpc3220-udc.yaml#
7 title: NXP LPC32xx SoC USB Device Controller (UDC)
14 const: nxp,lpc3220-udc
32 the UDC controller for connecting to the USB physical layer
45 compatible = "nxp,lpc3220-udc";
/linux/Documentation/usb/
H A Draw-gadget.rst25 descriptors. Note that the UDC driver might respond to some requests on
33 3. Raw Gadget provides a way to select a UDC device/driver to bind to,
34 while GadgetFS currently binds to the first available UDC. This allows
38 capabilities. This allows the user to write UDC-agnostic gadgets.
60 Note that some UDC drivers have fixed addresses assigned to endpoints, and
62 Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets.
65 endpoints that the UDC driver has. Based on that, userspace must choose UDC
/linux/include/uapi/linux/usb/
H A Draw_gadget.h22 * @driver_name: The name of the UDC driver.
23 * @device_name: The name of a UDC instance.
25 * The last two fields identify a UDC the gadget driver should bind to.
26 * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N"
27 * as its device_name, where N in the index of the Dummy UDC instance.
41 /* This event is queued when the driver has bound to a UDC. */
109 /* Maximum length of UDC endpoint name in struct usb_raw_ep_info. */
143 * @name: Name of the endpoint as it is defined in the UDC driver.
172 * Instructs Raw Gadget to bind to a UDC and start emulating a USB device.
230 * Constrains UDC VBUS power usage.
[all …]
/linux/drivers/usb/cdns3/
H A DMakefile29 cdnsp-udc-pci-y := cdnsp-pci.o
33 obj-m += cdnsp-udc-pci.o
35 obj-$(CONFIG_USB_CDNSP_PCI) += cdnsp-udc-pci.o
39 cdnsp-udc-pci-$(CONFIG_USB_CDNSP_GADGET) += cdnsp-ring.o cdnsp-gadget.o \
43 cdnsp-udc-pci-$(CONFIG_TRACING) += cdnsp-trace.o

1234567