Lines Matching refs:musb

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);
138 if (!musb) {
139 dev_err(&pdev->dev, "failed to allocate musb device\n");
156 musb->dev.parent = &pdev->dev;
159 glue->musb = musb;
165 platform_device_put(musb);
170 musb and clk variables. The ``GFP_KERNEL`` flag (line 8) allows the
195 ret = platform_device_add_resources(musb, pdev->resource,
202 ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
213 platform_device_put(musb);
224 :ref:`musb-dev-platform-data`, but here we are looking at the
247 static int jz4740_musb_init(struct musb *musb)
249 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
250 if (!musb->xceiv) {
258 musb->dyn_fifo = true;
260 musb->isr = jz4740_musb_interrupt;
276 will be discussed later in :ref:`musb-dev-quirks` and
277 :ref:`musb-handling-irqs`\ ::
279 static int jz4740_musb_exit(struct musb *musb)
281 usb_put_phy(musb->xceiv);
291 musb glue layer for a more complex controller hardware, you might need
299 ret = platform_device_add(musb);
301 dev_err(&pdev->dev, "failed to register musb device\n");
310 platform_device_put(musb);
326 platform_device_unregister(glue->musb);
351 struct musb *musb = __hci;
353 spin_lock_irqsave(&musb->lock, flags);
355 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
356 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
357 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
361 * undefined. Mask them to make sure that the musb driver core will
364 musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME |
367 if (musb->int_usb || musb->int_tx || musb->int_rx)
368 retval = musb_interrupt(musb);
370 spin_unlock_irqrestore(&musb->lock, flags);
400 device controller, which will be discussed later in :ref:`musb-dev-quirks`.
405 static int jz4740_musb_init(struct musb *musb)
407 musb->isr = jz4740_musb_interrupt;
461 .name = "musb-jz4740",
502 The ``musb-jz4740`` name (line 22) defines the MUSB driver that is used
504 ``jz4740_driver`` platform driver structure in :ref:`musb-basics`.
507 already set to allocate an automatic id in :ref:`musb-basics`. In the dev field
519 ``drivers/usb/musb/jz4740.c``:
553 :ref:`musb-dev-quirks`. Last two fields (line 8 and 9) are also
557 :ref:`musb-dev-quirks`.
567 :ref:`musb-basics`.
589 static int jz4740_musb_init(struct musb *musb)
591 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
592 if (!musb->xceiv) {
600 musb->dyn_fifo = true;
602 musb->isr = jz4740_musb_interrupt;
647 struct musb *musb = __hci;
649 spin_lock_irqsave(&musb->lock, flags);
651 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
652 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
653 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
657 * undefined. Mask them to make sure that the musb driver core will
660 musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME |
663 if (musb->int_usb || musb->int_tx || musb->int_rx)
664 retval = musb_interrupt(musb);
666 spin_unlock_irqrestore(&musb->lock, flags);