/linux/drivers/usb/musb/ |
H A D | musb_core.h | 27 struct musb; 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); 182 int (*set_mode)(struct musb *musb, u8 mode); 183 void (*try_idle)(struct musb *musb, unsigned long timeout); 184 int (*recover)(struct musb *musb); [all …]
|
H A D | musb_virthub.c | 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() 44 usb_hcd_poll_rh_status(musb->hcd); in musb_host_finish_resume() [all …]
|
H A D | musb_host.h | 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 *); 64 extern void musb_host_resume_root_hub(struct musb *musb); [all …]
|
H A D | musb_gadget.h | 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 *); 25 extern int musb_gadget_setup(struct musb *); [all …]
|
H A D | musb_debugfs.c | 86 struct musb *musb = s->private; in musb_regdump_show() local 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_mark_last_busy(musb->controller); in musb_regdump_show() 110 pm_runtime_put_autosuspend(musb->controller); in musb_regdump_show() 117 struct musb *musb = s->private; in musb_test_mode_show() local 120 pm_runtime_get_sync(musb->controller); in musb_test_mode_show() 121 test = musb_readb(musb->mregs, MUSB_TESTMODE); in musb_test_mode_show() [all …]
|
H A D | musb_regs.h | 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() 304 static inline void musb_write_txfunaddr(struct musb *musb, u8 epnum, in musb_write_txfunaddr() argument 307 musb_writeb(musb->mregs, in musb_write_txfunaddr() 308 musb->io.busctl_offset(epnum, MUSB_TXFUNCADDR), in musb_write_txfunaddr() [all …]
|
H A D | musb_dma.h | 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 79 #define is_cppi_enabled(musb) 0 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 | 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() 245 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort() [all …]
|
H A D | ux500_dma.c | 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() 134 struct musb *musb = controller->private_data; in ux500_dma_channel_allocate() local 157 dev_dbg(musb->controller, "hw_ep=%d, is_tx=0x%x, channel=%d\n", in ux500_dma_channel_allocate() [all …]
|
H A D | musb_debug.h | 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 | 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 | musb_io.h | 15 #define musb_ep_select(_mbase, _epnum) musb->io.ep_select((_mbase), (_epnum))
|
/linux/Documentation/driver-api/usb/ |
H A D | writing_musb_glue_layer.rst | 24 ``drivers/usb/musb/jz4740.c``. In this documentation I will walk through the 53 | | <------ drivers/usb/musb/musb_gadget.c 54 | MUSB Controller driver | <------ drivers/usb/musb/musb_host.c 55 | | <------ drivers/usb/musb/musb_core.c 60 | | <-- drivers/usb/musb/jz4740.c 86 .name = "musb-jz4740", 104 struct platform_device *musb; 109 The dev and musb members are both device structure variables. The first 128 struct platform_device *musb; 137 musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); [all …]
|
/linux/Documentation/devicetree/bindings/usb/ |
H A D | omap-usb.txt | 4 - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" 6 - multipoint : Should be "1" indicating the musb controller supports 29 compatible = "ti,omap4-musb";
|
H A D | ux500-usb.txt | 4 - compatible : Should be "stericsson,db8500-musb" 18 compatible = "stericsson,db8500-musb";
|
H A D | am33xx-usb.txt | 31 - compatible: ti,musb-am33xx 39 - mentor,multipoint: Should be "1" indicating the musb controller supports 103 compatible = "ti,musb-am33xx"; 150 compatible = "ti,musb-am33xx";
|
H A D | da8xx-usb.txt | 7 - compatible : Should be set to "ti,da830-musb". 48 compatible = "ti,da830-musb";
|
/linux/arch/arm64/boot/dts/mediatek/ |
H A D | mt8516.dtsi | 467 compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb"; 480 compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb";
|
/linux/Documentation/devicetree/bindings/phy/ |
H A D | phy-da8xx-usb.txt | 27 compatible = "ti,da830-musb";
|
/linux/arch/arm/boot/dts/mediatek/ |
H A D | mt7623n-bananapi-bpi-r2.dts | 399 musb_pins: musb { 400 pins-musb {
|
/linux/arch/mips/boot/dts/ingenic/ |
H A D | jz4725b.dtsi | 308 compatible = "ingenic,jz4725b-musb", "ingenic,jz4740-musb";
|
/linux/arch/arm/boot/dts/allwinner/ |
H A D | sun8i-a23.dtsi | 97 compatible = "allwinner,sun6i-a31-musb";
|
/linux/arch/arm/boot/dts/ti/omap/ |
H A D | am3517.dtsi | 78 compatible = "ti,omap3-musb";
|