Home
last modified time | relevance | path

Searched refs:musb (Results 1 – 25 of 34) sorted by relevance

12

/drivers/usb/musb/
Dmusb_core.c128 static inline struct musb *dev_to_musb(struct device *dev) in dev_to_musb()
308 struct musb *musb = hw_ep->musb; in musb_default_write_fifo() local
316 dev_dbg(musb->controller, "%cX ep%d fifo %p count %d buf %p\n", in musb_default_write_fifo()
352 struct musb *musb = hw_ep->musb; in musb_default_read_fifo() local
358 dev_dbg(musb->controller, "%cX ep%d fifo %p count %d buf %p\n", in musb_default_read_fifo()
412 (*musb_dma_controller_create)(struct musb *musb, void __iomem *base);
424 return hw_ep->musb->io.read_fifo(hw_ep, len, dst); in musb_read_fifo()
429 return hw_ep->musb->io.write_fifo(hw_ep, len, src); in musb_write_fifo()
454 void musb_load_testpacket(struct musb *musb) in musb_load_testpacket() argument
456 void __iomem *regs = musb->endpoints[0].regs; in musb_load_testpacket()
[all …]
Dmusb_core.h52 struct musb;
136 #define MUSB_MODE(musb) ((musb)->is_host ? "Host" : "Peripheral") argument
184 int (*init)(struct musb *musb);
185 int (*exit)(struct musb *musb);
187 void (*enable)(struct musb *musb);
188 void (*disable)(struct musb *musb);
204 (*dma_init) (struct musb *musb, void __iomem *base);
206 int (*set_mode)(struct musb *musb, u8 mode);
207 void (*try_idle)(struct musb *musb, unsigned long timeout);
208 int (*recover)(struct musb *musb);
[all …]
Dmusb_virthub.c48 struct musb *musb; in musb_host_finish_resume() local
52 musb = container_of(work, struct musb, finish_resume_work.work); in musb_host_finish_resume()
54 spin_lock_irqsave(&musb->lock, flags); in musb_host_finish_resume()
56 power = musb_readb(musb->mregs, MUSB_POWER); in musb_host_finish_resume()
58 musb_dbg(musb, "root port resume stopped, power %02x", power); in musb_host_finish_resume()
59 musb_writeb(musb->mregs, MUSB_POWER, power); in musb_host_finish_resume()
66 musb->is_active = 1; in musb_host_finish_resume()
67 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND | MUSB_PORT_STAT_RESUME); in musb_host_finish_resume()
68 musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16; in musb_host_finish_resume()
69 usb_hcd_poll_rh_status(musb->hcd); in musb_host_finish_resume()
[all …]
Dmusb_gadget_ep0.c46 #define next_ep0_request(musb) next_in_request(&(musb)->endpoints[0]) argument
76 struct musb *musb, in service_tx_status_request() argument
79 void __iomem *mbase = musb->mregs; in service_tx_status_request()
88 result[0] = musb->g.is_selfpowered << USB_DEVICE_SELF_POWERED; in service_tx_status_request()
89 result[0] |= musb->may_wakeup << USB_DEVICE_REMOTE_WAKEUP; in service_tx_status_request()
90 if (musb->g.is_otg) { in service_tx_status_request()
91 result[0] |= musb->g.b_hnp_enable in service_tx_status_request()
93 result[0] |= musb->g.a_alt_hnp_support in service_tx_status_request()
95 result[0] |= musb->g.a_hnp_support in service_tx_status_request()
124 ep = &musb->endpoints[epnum].ep_in; in service_tx_status_request()
[all …]
Dmusb_gadget.c58 struct musb *musb, struct musb_ep *musb_ep) in map_dma_buffer() argument
61 struct dma_controller *dma = musb->dma_controller; in map_dma_buffer()
84 musb->controller, in map_dma_buffer()
90 ret = dma_mapping_error(musb->controller, dma_addr); in map_dma_buffer()
97 dma_sync_single_for_device(musb->controller, in map_dma_buffer()
109 struct musb *musb) in unmap_dma_buffer() argument
117 dev_vdbg(musb->controller, in unmap_dma_buffer()
122 dma_unmap_single(musb->controller, in unmap_dma_buffer()
130 dma_sync_single_for_cpu(musb->controller, in unmap_dma_buffer()
151 __releases(ep->musb->lock) in musb_g_giveback()
[all …]
Domap2430.c48 struct platform_device *musb; member
53 #define glue_to_musb(g) platform_get_drvdata(g->musb)
57 static void omap2430_musb_set_vbus(struct musb *musb, int is_on) in omap2430_musb_set_vbus() argument
59 struct usb_otg *otg = musb->xceiv->otg; in omap2430_musb_set_vbus()
67 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); in omap2430_musb_set_vbus()
70 if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) { in omap2430_musb_set_vbus()
74 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); in omap2430_musb_set_vbus()
79 while (musb_readb(musb->mregs, MUSB_DEVCTL) & in omap2430_musb_set_vbus()
87 dev_err(musb->controller, in omap2430_musb_set_vbus()
95 musb->is_active = 1; in omap2430_musb_set_vbus()
[all …]
Dmusb_host.h80 extern struct musb *hcd_to_musb(struct usb_hcd *);
81 extern irqreturn_t musb_h_ep0_irq(struct musb *);
82 extern int musb_host_alloc(struct musb *);
83 extern int musb_host_setup(struct musb *, int);
84 extern void musb_host_cleanup(struct musb *);
85 extern void musb_host_tx(struct musb *, u8);
86 extern void musb_host_rx(struct musb *, u8);
87 extern void musb_root_disconnect(struct musb *musb);
88 extern void musb_host_free(struct musb *);
89 extern void musb_host_cleanup(struct musb *);
[all …]
Dtusb6010.c34 struct platform_device *musb; member
38 static void tusb_musb_set_vbus(struct musb *musb, int is_on);
47 static u8 tusb_get_revision(struct musb *musb) in tusb_get_revision() argument
49 void __iomem *tbase = musb->ctrl_base; in tusb_get_revision()
64 static void tusb_print_revision(struct musb *musb) in tusb_print_revision() argument
66 void __iomem *tbase = musb->ctrl_base; in tusb_print_revision()
69 rev = musb->tusb_revision; in tusb_print_revision()
97 static void tusb_wbus_quirk(struct musb *musb, int enabled) in tusb_wbus_quirk() argument
99 void __iomem *tbase = musb->ctrl_base; in tusb_wbus_quirk()
112 dev_dbg(musb->controller, "Enabled tusb wbus quirk ctrl %08x ena %08x\n", in tusb_wbus_quirk()
[all …]
Dux500.c42 struct platform_device *musb; member
45 #define glue_to_musb(g) platform_get_drvdata(g->musb)
47 static void ux500_musb_set_vbus(struct musb *musb, int is_on) in ux500_musb_set_vbus() argument
56 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); in ux500_musb_set_vbus()
59 if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) { in ux500_musb_set_vbus()
62 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); in ux500_musb_set_vbus()
67 while (musb_readb(musb->mregs, MUSB_DEVCTL) & 0x80) { in ux500_musb_set_vbus()
70 dev_err(musb->controller, in ux500_musb_set_vbus()
77 musb->is_active = 1; in ux500_musb_set_vbus()
78 musb->xceiv->otg->default_a = 1; in ux500_musb_set_vbus()
[all …]
Dblackfin.c31 struct platform_device *musb; member
34 #define glue_to_musb(g) platform_get_drvdata(g->musb)
76 struct musb *musb = hw_ep->musb; in bfin_write_fifo() local
85 dev_dbg(musb->controller, "TX ep%d fifo %p count %d buf %p, epio %p\n", in bfin_write_fifo()
140 struct musb *musb = hw_ep->musb; in bfin_read_fifo() local
197 dev_dbg(musb->controller, "%cX ep%d fifo %p count %d buf %p\n", in bfin_read_fifo()
207 struct musb *musb = __hci; in blackfin_interrupt() local
209 spin_lock_irqsave(&musb->lock, flags); in blackfin_interrupt()
211 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); in blackfin_interrupt()
212 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); in blackfin_interrupt()
[all …]
Dda8xx.c83 struct platform_device *musb; member
99 static void da8xx_musb_enable(struct musb *musb) in da8xx_musb_enable() argument
101 void __iomem *reg_base = musb->ctrl_base; in da8xx_musb_enable()
105 mask = ((musb->epmask & DA8XX_USB_TX_EP_MASK) << DA8XX_INTR_TX_SHIFT) | in da8xx_musb_enable()
106 ((musb->epmask & DA8XX_USB_RX_EP_MASK) << DA8XX_INTR_RX_SHIFT) | in da8xx_musb_enable()
118 static void da8xx_musb_disable(struct musb *musb) in da8xx_musb_disable() argument
120 void __iomem *reg_base = musb->ctrl_base; in da8xx_musb_disable()
125 musb_writeb(musb->mregs, MUSB_DEVCTL, 0); in da8xx_musb_disable()
131 static void da8xx_musb_set_vbus(struct musb *musb, int is_on) in da8xx_musb_set_vbus() argument
133 WARN_ON(is_on && is_peripheral_active(musb)); in da8xx_musb_set_vbus()
[all …]
Ddavinci.c57 struct platform_device *musb; member
93 static void davinci_musb_enable(struct musb *musb) in davinci_musb_enable() argument
98 tmp = (musb->epmask & DAVINCI_USB_TX_ENDPTS_MASK) in davinci_musb_enable()
100 musb_writel(musb->ctrl_base, DAVINCI_USB_INT_MASK_SET_REG, tmp); in davinci_musb_enable()
102 tmp = (musb->epmask & (0xfffe & DAVINCI_USB_RX_ENDPTS_MASK)) in davinci_musb_enable()
104 musb_writel(musb->ctrl_base, DAVINCI_USB_INT_MASK_SET_REG, tmp); in davinci_musb_enable()
109 musb_writel(musb->ctrl_base, DAVINCI_USB_INT_MASK_SET_REG, tmp); in davinci_musb_enable()
118 musb_writel(musb->ctrl_base, DAVINCI_USB_INT_SET_REG, in davinci_musb_enable()
125 static void davinci_musb_disable(struct musb *musb) in davinci_musb_disable() argument
132 musb_writel(musb->ctrl_base, DAVINCI_USB_INT_MASK_CLR_REG, in davinci_musb_disable()
[all …]
Dmusb_dsps.c119 struct platform_device *musb; /* child musb pdev */ member
151 static void dsps_musb_enable(struct musb *musb) in dsps_musb_enable() argument
153 struct device *dev = musb->controller; in dsps_musb_enable()
157 void __iomem *reg_base = musb->ctrl_base; in dsps_musb_enable()
161 epmask = ((musb->epmask & wrp->txep_mask) << wrp->txep_shift) | in dsps_musb_enable()
162 ((musb->epmask & wrp->rxep_mask) << wrp->rxep_shift); in dsps_musb_enable()
168 if (musb->xceiv->otg->state == OTG_STATE_B_IDLE && in dsps_musb_enable()
169 musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE) in dsps_musb_enable()
177 static void dsps_musb_disable(struct musb *musb) in dsps_musb_disable() argument
179 struct device *dev = musb->controller; in dsps_musb_disable()
[all …]
Dam35x.c88 struct platform_device *musb; member
97 static void am35x_musb_enable(struct musb *musb) in am35x_musb_enable() argument
99 void __iomem *reg_base = musb->ctrl_base; in am35x_musb_enable()
103 epmask = ((musb->epmask & AM35X_TX_EP_MASK) << AM35X_INTR_TX_SHIFT) | in am35x_musb_enable()
104 ((musb->epmask & AM35X_RX_EP_MASK) << AM35X_INTR_RX_SHIFT); in am35x_musb_enable()
117 static void am35x_musb_disable(struct musb *musb) in am35x_musb_disable() argument
119 void __iomem *reg_base = musb->ctrl_base; in am35x_musb_disable()
124 musb_writeb(musb->mregs, MUSB_DEVCTL, 0); in am35x_musb_disable()
130 static void am35x_musb_set_vbus(struct musb *musb, int is_on) in am35x_musb_set_vbus() argument
132 WARN_ON(is_on && is_peripheral_active(musb)); in am35x_musb_set_vbus()
[all …]
Dmusb_gadget.h41 extern irqreturn_t musb_g_ep0_irq(struct musb *);
42 extern void musb_g_tx(struct musb *, u8);
43 extern void musb_g_rx(struct musb *, u8);
44 extern void musb_g_reset(struct musb *);
45 extern void musb_g_suspend(struct musb *);
46 extern void musb_g_resume(struct musb *);
47 extern void musb_g_wakeup(struct musb *);
48 extern void musb_g_disconnect(struct musb *);
49 extern void musb_gadget_cleanup(struct musb *);
50 extern int musb_gadget_setup(struct musb *);
[all …]
Dmusb_host.c98 struct musb *hcd_to_musb(struct usb_hcd *hcd) in hcd_to_musb()
100 return *(struct musb **) hcd->hcd_priv; in hcd_to_musb()
104 static void musb_ep_program(struct musb *musb, u8 epnum,
113 struct musb *musb = ep->musb; in musb_h_tx_flush_fifo() local
138 if (dev_WARN_ONCE(musb->controller, retries-- < 1, in musb_h_tx_flush_fifo()
196 if (is_cppi_enabled(ep->musb)) in musb_h_tx_dma_start()
221 musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh) in musb_start_urb() argument
225 void __iomem *mbase = musb->mregs; in musb_start_urb()
241 musb->ep0_stage = MUSB_EP0_START; in musb_start_urb()
257 trace_musb_urb_start(musb, urb); in musb_start_urb()
[all …]
Dmusb_debugfs.c113 struct musb *musb = s->private; in musb_regdump_show() local
117 pm_runtime_get_sync(musb->controller); in musb_regdump_show()
123 musb_readb(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
127 musb_readw(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
131 musb_readl(musb->mregs, musb_regmap[i].offset)); in musb_regdump_show()
136 pm_runtime_mark_last_busy(musb->controller); in musb_regdump_show()
137 pm_runtime_put_autosuspend(musb->controller); in musb_regdump_show()
148 struct musb *musb = s->private; in musb_test_mode_show() local
151 pm_runtime_get_sync(musb->controller); in musb_test_mode_show()
152 test = musb_readb(musb->mregs, MUSB_TESTMODE); in musb_test_mode_show()
[all …]
Dmusb_dma.h72 #define musb_dma_ux500(musb) (musb->io.quirks & MUSB_DMA_UX500) argument
74 #define musb_dma_ux500(musb) 0 argument
78 #define musb_dma_cppi41(musb) (musb->io.quirks & MUSB_DMA_CPPI41) argument
80 #define musb_dma_cppi41(musb) 0 argument
84 #define musb_dma_cppi(musb) (musb->io.quirks & MUSB_DMA_CPPI) argument
86 #define musb_dma_cppi(musb) 0 argument
90 #define tusb_dma_omap(musb) (musb->io.quirks & MUSB_DMA_TUSB_OMAP) argument
92 #define tusb_dma_omap(musb) 0 argument
96 #define musb_dma_inventra(musb) (musb->io.quirks & MUSB_DMA_INVENTRA) argument
98 #define musb_dma_inventra(musb) 0 argument
[all …]
Djz4740.c28 struct platform_device *musb; member
36 struct musb *musb = __hci; in jz4740_musb_interrupt() local
38 spin_lock_irqsave(&musb->lock, flags); in jz4740_musb_interrupt()
40 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); in jz4740_musb_interrupt()
41 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); in jz4740_musb_interrupt()
42 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX); in jz4740_musb_interrupt()
49 musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME | in jz4740_musb_interrupt()
52 if (musb->int_usb || musb->int_tx || musb->int_rx) in jz4740_musb_interrupt()
53 retval = musb_interrupt(musb); in jz4740_musb_interrupt()
55 spin_unlock_irqrestore(&musb->lock, flags); in jz4740_musb_interrupt()
[all …]
Dsunxi.c80 static struct musb *sunxi_musb;
84 struct musb *musb; member
108 struct musb *musb = glue->musb; in sunxi_musb_work() local
112 spin_lock_irqsave(&musb->lock, flags); in sunxi_musb_work()
114 devctl = readb(musb->mregs + SUNXI_MUSB_DEVCTL); in sunxi_musb_work()
117 musb->xceiv->otg->default_a = 1; in sunxi_musb_work()
118 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE; in sunxi_musb_work()
119 MUSB_HST_MODE(musb); in sunxi_musb_work()
123 musb->xceiv->otg->default_a = 0; in sunxi_musb_work()
124 musb->xceiv->otg->state = OTG_STATE_B_IDLE; in sunxi_musb_work()
[all …]
Dmusb_regs.h364 static inline void musb_write_rxfunaddr(struct musb *musb, u8 epnum, in musb_write_rxfunaddr() argument
367 musb_writeb(musb->mregs, in musb_write_rxfunaddr()
368 musb->io.busctl_offset(epnum, MUSB_RXFUNCADDR), in musb_write_rxfunaddr()
372 static inline void musb_write_rxhubaddr(struct musb *musb, u8 epnum, in musb_write_rxhubaddr() argument
375 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBADDR), in musb_write_rxhubaddr()
379 static inline void musb_write_rxhubport(struct musb *musb, u8 epnum, in musb_write_rxhubport() argument
382 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBPORT), in musb_write_rxhubport()
386 static inline void musb_write_txfunaddr(struct musb *musb, u8 epnum, in musb_write_txfunaddr() argument
389 musb_writeb(musb->mregs, in musb_write_txfunaddr()
390 musb->io.busctl_offset(epnum, MUSB_TXFUNCADDR), in musb_write_txfunaddr()
[all …]
Dmusb_cppi41.c33 struct musb *musb; member
48 if (!is_host_active(cppi41_channel->controller->musb)) in save_rx_toggle()
60 struct musb *musb = hw_ep->musb; in update_rx_toggle() local
66 if (!is_host_active(musb)) in update_rx_toggle()
69 musb_ep_select(musb->mregs, hw_ep->epnum); in update_rx_toggle()
81 musb_dbg(cppi41_channel->controller->musb, in update_rx_toggle()
91 struct musb *musb = hw_ep->musb; in musb_is_tx_fifo_empty() local
92 void __iomem *epio = musb->endpoints[epnum].regs; in musb_is_tx_fifo_empty()
95 musb_ep_select(musb->mregs, hw_ep->epnum); in musb_is_tx_fifo_empty()
107 struct musb *musb = hw_ep->musb; in cppi41_trans_done() local
[all …]
Dmusb_trace.h19 #define TRACE_SYSTEM musb
35 TP_PROTO(struct musb *musb, struct va_format *vaf),
36 TP_ARGS(musb, vaf),
38 __string(name, dev_name(musb->controller))
42 __assign_str(name, dev_name(musb->controller));
136 TP_PROTO(struct musb *musb),
137 TP_ARGS(musb),
139 __string(name, dev_name(musb->controller))
145 __assign_str(name, dev_name(musb->controller));
146 __entry->int_usb = musb->int_usb;
[all …]
Dtusb6010_omap.c35 struct musb *musb; member
59 struct musb *musb; member
76 dev_dbg(chdat->musb->controller, "ep%i dmareq0 is busy for ep%i\n", in tusb_omap_use_shared_dmareq()
112 struct musb *musb = chdat->musb; in tusb_omap_dma_cb() local
113 struct device *dev = musb->controller; in tusb_omap_dma_cb()
116 void __iomem *mbase = musb->mregs; in tusb_omap_dma_cb()
120 spin_lock_irqsave(&musb->lock, flags); in tusb_omap_dma_cb()
130 dev_dbg(musb->controller, "ep%i %s dma callback ch: %i status: %x\n", in tusb_omap_dma_cb()
143 dev_dbg(musb->controller, "Corrupt %s dma ch%i XFR_SIZE: 0x%08lx\n", in tusb_omap_dma_cb()
152 dev_dbg(musb->controller, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); in tusb_omap_dma_cb()
[all …]
Dmusbhsdma.c44 struct musb *musb = controller->private_data; in dma_controller_stop() local
49 dev_err(musb->controller, in dma_controller_stop()
115 struct musb *musb = controller->private_data; in configure_channel() local
120 musb_dbg(musb, "%p, pkt_sz %d, addr %pad, len %d, mode %d", in configure_channel()
153 struct musb *musb = controller->private_data; in dma_channel_program() local
155 musb_dbg(musb, "ep%d-%s pkt_sz %d, dma_addr %pad length %d, mode %d", in dma_channel_program()
164 if (musb->ops->adjust_channel_params) { in dma_channel_program()
165 int ret = musb->ops->adjust_channel_params(channel, in dma_channel_program()
180 if ((musb->hwvers >= MUSB_HWVERS_1800) && (dma_addr % 4)) in dma_channel_program()
198 struct musb *musb = musb_channel->controller->private_data; in dma_channel_abort() local
[all …]

12