| /linux/drivers/usb/musb/ |
| H A D | musb_virthub.c | 3 * MUSB OTG driver virtual root hub support 23 struct musb *musb; in musb_host_finish_resume() local 27 musb = container_of(work, struct musb, finish_resume_work.work); in musb_host_finish_resume() 29 spin_lock_irqsave(&musb->lock, flags); in musb_host_finish_resume() 31 power = musb_readb(musb->mregs, MUSB_POWER); in musb_host_finish_resume() 33 musb_dbg(musb, "root port resume stopped, power %02x", power); in musb_host_finish_resume() 34 musb_writeb(musb->mregs, MUSB_POWER, power); in musb_host_finish_resume() 41 musb->is_active = 1; in musb_host_finish_resume() 42 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND | MUSB_PORT_STAT_RESUME); in musb_host_finish_resume() 43 musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16; in musb_host_finish_resume() [all …]
|
| H A D | musb_core.h | 3 * MUSB OTG driver defines 23 #include <linux/usb/musb.h> 27 struct musb; 32 /* Helper defines for struct musb->hwvers */ 106 #define MUSB_MODE(musb) ((musb)->is_host ? "Host" : "Peripheral") argument 158 int (*init)(struct musb *musb); 159 int (*exit)(struct musb *musb); 161 void (*enable)(struct musb *musb); 162 void (*disable)(struct musb *musb); 180 (*dma_init) (struct musb *musb, void __iomem *base); [all …]
|
| H A D | omap2430.c | 24 #include <linux/usb/musb.h> 33 struct platform_device *musb; member 41 #define glue_to_musb(g) platform_get_drvdata(g->musb) 45 static inline void omap2430_low_level_exit(struct musb *musb) in omap2430_low_level_exit() argument 50 l = musb_readl(musb->mregs, OTG_FORCESTDBY); in omap2430_low_level_exit() 52 musb_writel(musb->mregs, OTG_FORCESTDBY, l); in omap2430_low_level_exit() 55 static inline void omap2430_low_level_init(struct musb *musb) in omap2430_low_level_init() argument 59 l = musb_readl(musb->mregs, OTG_FORCESTDBY); in omap2430_low_level_init() 61 musb_writel(musb->mregs, OTG_FORCESTDBY, l); in omap2430_low_level_init() 69 pr_err("%s: musb core is not yet initialized\n", __func__); in omap2430_musb_mailbox() [all …]
|
| H A D | musb_gadget.c | 3 * MUSB OTG driver peripheral support 34 struct musb *musb, struct musb_ep *musb_ep) in map_dma_buffer() argument 37 struct dma_controller *dma = musb->dma_controller; in map_dma_buffer() 60 musb->controller, in map_dma_buffer() 66 ret = dma_mapping_error(musb->controller, dma_addr); in map_dma_buffer() 73 dma_sync_single_for_device(musb->controller, in map_dma_buffer() 85 struct musb *musb) in unmap_dma_buffer() argument 93 dev_vdbg(musb->controller, in unmap_dma_buffer() 98 dma_unmap_single(musb->controller, in unmap_dma_buffer() 106 dma_sync_single_for_cpu(musb->controller, in unmap_dma_buffer() [all …]
|
| H A D | mpfs.c | 3 * PolarFire SoC (MPFS) MUSB Glue Layer 27 struct platform_device *musb; member 52 static void mpfs_musb_set_vbus(struct musb *musb, int is_on) in mpfs_musb_set_vbus() argument 61 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); in mpfs_musb_set_vbus() 64 musb->is_active = 1; in mpfs_musb_set_vbus() 65 musb->xceiv->otg->default_a = 1; in mpfs_musb_set_vbus() 66 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in mpfs_musb_set_vbus() 68 MUSB_HST_MODE(musb); in mpfs_musb_set_vbus() 70 musb->is_active = 0; in mpfs_musb_set_vbus() 76 musb->xceiv->otg->default_a = 0; in mpfs_musb_set_vbus() [all …]
|
| H A D | musb_dsps.c | 40 * DSPS musb wrapper register offset. 42 * musb ips. 104 struct platform_device *musb; /* child musb pdev */ member 136 struct musb *musb = platform_get_drvdata(glue->musb); in dsps_mod_timer() local 144 mod_timer(&musb->dev_timer, jiffies + wait); in dsps_mod_timer() 168 static void dsps_musb_enable(struct musb *musb) in dsps_musb_enable() argument 170 struct device *dev = musb->controller; in dsps_musb_enable() 173 void __iomem *reg_base = musb->ctrl_base; in dsps_musb_enable() 177 epmask = ((musb->epmask & wrp->txep_mask) << wrp->txep_shift) | in dsps_musb_enable() 178 ((musb->epmask & wrp->rxep_mask) << wrp->rxep_shift); in dsps_musb_enable() [all …]
|
| H A D | tusb6010.c | 34 struct platform_device *musb; member 40 static void tusb_musb_set_vbus(struct musb *musb, int is_on); 49 static u8 tusb_get_revision(struct musb *musb) in tusb_get_revision() argument 51 void __iomem *tbase = musb->ctrl_base; in tusb_get_revision() 66 static void tusb_print_revision(struct musb *musb) in tusb_print_revision() argument 68 void __iomem *tbase = musb->ctrl_base; in tusb_print_revision() 71 rev = musb->tusb_revision; in tusb_print_revision() 99 static void tusb_wbus_quirk(struct musb *musb, int enabled) in tusb_wbus_quirk() argument 101 void __iomem *tbase = musb->ctrl_base; in tusb_wbus_quirk() 114 dev_dbg(musb->controller, "Enabled tusb wbus quirk ctrl %08x ena %08x\n", in tusb_wbus_quirk() [all …]
|
| H A D | musb_host.h | 3 * MUSB OTG driver host defines 55 extern struct musb *hcd_to_musb(struct usb_hcd *); 56 extern irqreturn_t musb_h_ep0_irq(struct musb *); 57 extern int musb_host_alloc(struct musb *); 58 extern int musb_host_setup(struct musb *, int); 59 extern void musb_host_cleanup(struct musb *); 60 extern void musb_host_tx(struct musb *, u8); 61 extern void musb_host_rx(struct musb *, u8); 62 extern void musb_root_disconnect(struct musb *musb); 63 extern void musb_host_free(struct musb *); [all …]
|
| H A D | da8xx.c | 70 struct platform_device *musb; member 86 static void da8xx_musb_enable(struct musb *musb) in da8xx_musb_enable() argument 88 void __iomem *reg_base = musb->ctrl_base; in da8xx_musb_enable() 92 mask = ((musb->epmask & DA8XX_USB_TX_EP_MASK) << DA8XX_INTR_TX_SHIFT) | in da8xx_musb_enable() 93 ((musb->epmask & DA8XX_USB_RX_EP_MASK) << DA8XX_INTR_RX_SHIFT) | in da8xx_musb_enable() 105 static void da8xx_musb_disable(struct musb *musb) in da8xx_musb_disable() argument 107 void __iomem *reg_base = musb->ctrl_base; in da8xx_musb_disable() 117 static void da8xx_musb_set_vbus(struct musb *musb, int is_on) in da8xx_musb_set_vbus() argument 119 WARN_ON(is_on && is_peripheral_active(musb)); in da8xx_musb_set_vbus() 126 struct musb *musb = timer_container_of(musb, t, in otg_timer() local [all …]
|
| H A D | musb_gadget.h | 3 * MUSB OTG driver peripheral defines 16 extern irqreturn_t musb_g_ep0_irq(struct musb *); 17 extern void musb_g_tx(struct musb *, u8); 18 extern void musb_g_rx(struct musb *, u8); 19 extern void musb_g_reset(struct musb *); 20 extern void musb_g_suspend(struct musb *); 21 extern void musb_g_resume(struct musb *); 22 extern void musb_g_wakeup(struct musb *); 23 extern void musb_g_disconnect(struct musb *); 24 extern void musb_gadget_cleanup(struct musb *); [all …]
|
| H A D | musb_host.c | 3 * MUSB OTG driver host support 25 /* MUSB HOST status 22-mar-2006 74 struct musb *hcd_to_musb(struct usb_hcd *hcd) in hcd_to_musb() 76 return *(struct musb **) hcd->hcd_priv; in hcd_to_musb() 80 static void musb_ep_program(struct musb *musb, u8 epnum, 89 struct musb *musb = ep->musb; in musb_h_tx_flush_fifo() local 114 if (dev_WARN_ONCE(musb->controller, retries-- < 1, in musb_h_tx_flush_fifo() 147 * musb must be locked. 172 if (is_cppi_enabled(ep->musb)) in musb_h_tx_dma_start() 197 musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) in musb_start_urb() argument [all …]
|
| H A D | musb_debugfs.c | 3 * MUSB OTG driver debugfs support 86 struct musb *musb = s->private; in musb_regdump_show() local 89 seq_printf(s, "MUSB (M)HDRC Register Dump\n"); in musb_regdump_show() 90 pm_runtime_get_sync(musb->controller); in musb_regdump_show() 96 musb_readb(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show() 100 musb_readw(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show() 104 musb_readl(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show() 109 pm_runtime_put_autosuspend(musb->controller); in musb_regdump_show() 116 struct musb *musb = s->private; in musb_test_mode_show() local 119 pm_runtime_get_sync(musb->controller); in musb_test_mode_show() [all …]
|
| H A D | musb_regs.h | 3 * MUSB OTG driver register defines 16 * MUSB Register bits 56 /* MUSB ULPI VBUSCONTROL */ 282 static inline void musb_write_rxfunaddr(struct musb *musb, u8 epnum, in musb_write_rxfunaddr() argument 285 musb_writeb(musb->mregs, in musb_write_rxfunaddr() 286 musb->io.busctl_offset(epnum, MUSB_RXFUNCADDR), in musb_write_rxfunaddr() 290 static inline void musb_write_rxhubaddr(struct musb *musb, u8 epnum, in musb_write_rxhubaddr() argument 293 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBADDR), in musb_write_rxhubaddr() 297 static inline void musb_write_rxhubport(struct musb *musb, u8 epnum, in musb_write_rxhubport() argument 300 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBPORT), in musb_write_rxhubport() [all …]
|
| H A D | musb_dma.h | 3 * MUSB OTG driver DMA controller abstraction 53 #define musb_dma_ux500(musb) (musb->ops->quirks & MUSB_DMA_UX500) argument 55 #define musb_dma_ux500(musb) 0 argument 59 #define musb_dma_cppi41(musb) (musb->ops->quirks & MUSB_DMA_CPPI41) argument 61 #define musb_dma_cppi41(musb) 0 argument 65 #define tusb_dma_omap(musb) (musb->ops->quirks & MUSB_DMA_TUSB_OMAP) argument 67 #define tusb_dma_omap(musb) 0 argument 71 #define musb_dma_inventra(musb) (musb->ops->quirks & MUSB_DMA_INVENTRA) argument 73 #define musb_dma_inventra(musb) 0 argument 77 #define is_cppi_enabled(musb) musb_dma_cppi41(musb) argument [all …]
|
| H A D | musb_cppi41.c | 61 if (!is_host_active(cppi41_channel->controller->controller.musb)) in save_rx_toggle() 73 struct musb *musb = hw_ep->musb; in update_rx_toggle() local 79 if (!is_host_active(musb)) in update_rx_toggle() 82 musb_ep_select(musb->mregs, hw_ep->epnum); in update_rx_toggle() 94 musb_dbg(musb, "Restoring DATA1 toggle."); in update_rx_toggle() 103 struct musb *musb = hw_ep->musb; in musb_is_tx_fifo_empty() local 104 void __iomem *epio = musb->endpoints[epnum].regs; in musb_is_tx_fifo_empty() 107 musb_ep_select(musb->mregs, hw_ep->epnum); in musb_is_tx_fifo_empty() 120 struct musb *musb = hw_ep->musb; in cppi41_trans_done() local 139 musb_ep_select(musb->mregs, hw_ep->epnum); in cppi41_trans_done() [all …]
|
| H A D | tusb6010_omap.c | 30 struct musb *musb; member 66 dev_dbg(chdat->musb->controller, "ep%i dmareq0 is busy for ep%i\n", in tusb_omap_use_shared_dmareq() 102 struct musb *musb = chdat->musb; in tusb_omap_dma_cb() local 103 struct device *dev = musb->controller; in tusb_omap_dma_cb() 106 void __iomem *mbase = musb->mregs; in tusb_omap_dma_cb() 109 spin_lock_irqsave(&musb->lock, flags); in tusb_omap_dma_cb() 111 dev_dbg(musb->controller, "ep%i %s dma callback\n", in tusb_omap_dma_cb() 123 dev_dbg(musb->controller, "Corrupt %s XFR_SIZE: 0x%08lx\n", in tusb_omap_dma_cb() 131 dev_dbg(musb->controller, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); in tusb_omap_dma_cb() 137 dev_dbg(musb->controller, "Using PIO for remaining %lu bytes\n", pio); in tusb_omap_dma_cb() [all …]
|
| H A D | musbhsdma.c | 3 * MUSB OTG driver - support for Mentor's DMA controller 78 struct musb *musb = controller->private_data; in dma_controller_stop() local 83 dev_err(musb->controller, in dma_controller_stop() 149 struct musb *musb = controller->private_data; in configure_channel() local 154 musb_dbg(musb, "%p, pkt_sz %d, addr %pad, len %d, mode %d", in configure_channel() 187 struct musb *musb = controller->private_data; in dma_channel_program() local 189 musb_dbg(musb, "ep%d-%s pkt_sz %d, dma_addr %pad length %d, mode %d", in dma_channel_program() 206 if ((musb->hwvers >= MUSB_HWVERS_1800) && (dma_addr % 4)) in dma_channel_program() 224 struct musb *musb = musb_channel->controller->private_data; in dma_channel_abort() local 232 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort() [all …]
|
| H A D | ux500_dma.c | 3 * drivers/usb/musb/ux500_dma.c 22 #include <linux/platform_data/usb-musb-ux500.h> 56 struct musb *musb = hw_ep->musb; in ux500_dma_callback() local 59 dev_dbg(musb->controller, "DMA rx transfer done on hw_ep=%d\n", in ux500_dma_callback() 62 spin_lock_irqsave(&musb->lock, flags); in ux500_dma_callback() 65 musb_dma_completion(musb, hw_ep->epnum, ux500_channel->is_tx); in ux500_dma_callback() 66 spin_unlock_irqrestore(&musb->lock, flags); in ux500_dma_callback() 82 struct musb *musb = ux500_channel->controller->private_data; in ux500_configure_channel() local 83 dma_addr_t usb_fifo_addr = (musb->io.fifo_offset(hw_ep->epnum) + in ux500_configure_channel() 86 dev_dbg(musb->controller, in ux500_configure_channel() [all …]
|
| H A D | musb_debug.h | 3 * MUSB OTG driver debug defines 20 void musb_dbg(struct musb *musb, const char *fmt, ...); 23 void musb_init_debugfs(struct musb *musb); 24 void musb_exit_debugfs(struct musb *musb); 26 static inline void musb_init_debugfs(struct musb *musb) in musb_init_debugfs() argument 29 static inline void musb_exit_debugfs(struct musb *musb) in musb_exit_debugfs() argument
|
| H A D | musb_trace.c | 3 * musb_trace.c - MUSB Controller Trace Support 13 void musb_dbg(struct musb *musb, const char *fmt, ...) in musb_dbg() argument 22 trace_musb_log(musb, &vaf); in musb_dbg()
|
| H A D | Kconfig | 27 module will be called "musb-hdrc". 32 prompt "MUSB Mode Selection" 41 Select this when you want to use MUSB in host mode only, 49 Select this when you want to use MUSB in gadget mode only, 57 This is the default mode of working of MUSB controller where 126 comment "MUSB DMA mode"
|
| /linux/Documentation/driver-api/usb/ |
| H A D | writing_musb_glue_layer.rst | 2 Writing a MUSB Glue Layer 10 The Linux MUSB subsystem is part of the larger Linux USB subsystem. It 18 Dual-Role Controller (MUSB HDRC) found in the Mentor Graphics Inventra™ 21 As a self-taught exercise I have written an MUSB glue layer for the 22 Ingenic JZ4740 SoC, modelled after the many MUSB glue layers in the 24 ``drivers/usb/musb/jz4740.c``. In this documentation I will walk through the 30 Linux MUSB Basics 36 Devices also provide an overview of the Linux kernel MUSB configuration, 42 Linux USB stack is a layered architecture in which the MUSB controller 43 hardware sits at the lowest. The MUSB controller driver abstract the [all …]
|
| /linux/Documentation/devicetree/bindings/usb/ |
| H A D | ti,omap4-musb.yaml | 4 $id: http://devicetree.org/schemas/usb/ti,omap4-musb.yaml# 7 title: Texas Instruments OMAP MUSB USB OTG Controller 13 Texas Instruments glue layer for the Mentor Graphics MUSB OTG controller. 18 to the generic MUSB core driver. 23 - ti,omap3-musb 24 - ti,omap4-musb 42 Indicates the MUSB controller supports multipoint. This is a MUSB 49 Specifies the number of endpoints. This is a MUSB configuration 106 compatible = "ti,omap4-musb";
|
| H A D | mediatek,musb.yaml | 5 $id: http://devicetree.org/schemas/usb/mediatek,musb.yaml# 8 title: MediaTek MUSB DRD/OTG Controller 20 - mediatek,mt8516-musb 21 - mediatek,mt2701-musb 22 - mediatek,mt7623-musb 23 - const: mediatek,mtk-musb 95 compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb";
|
| H A D | ingenic,musb.yaml | 4 $id: http://devicetree.org/schemas/usb/ingenic,musb.yaml# 19 - ingenic,jz4770-musb 20 - ingenic,jz4740-musb 22 - const: ingenic,jz4725b-musb 23 - const: ingenic,jz4740-musb 68 compatible = "ingenic,jz4740-musb";
|