diff options
Diffstat (limited to 'sys/dev/usb/controller/musb_otg.c')
| -rw-r--r-- | sys/dev/usb/controller/musb_otg.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/dev/usb/controller/musb_otg.c b/sys/dev/usb/controller/musb_otg.c index d242574b6d2d..22ce005b151e 100644 --- a/sys/dev/usb/controller/musb_otg.c +++ b/sys/dev/usb/controller/musb_otg.c @@ -209,7 +209,7 @@ musbotg_wakeup_peer(struct musbotg_softc *sc) /* wait 8 milliseconds */ /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); temp &= ~MUSB2_MASK_RESUME; @@ -301,7 +301,7 @@ musbotg_setup_rx(struct musbotg_td *td) MUSB2_REG_EPFIFO(0), (void *)&req, sizeof(req)); /* copy data into real buffer */ - usb2_copy_in(td->pc, 0, &req, sizeof(req)); + usbd_copy_in(td->pc, 0, &req, sizeof(req)); td->offset = sizeof(req); td->remainder = 0; @@ -404,7 +404,7 @@ musbotg_setup_data_rx(struct musbotg_td *td) while (count > 0) { uint32_t temp; - usb2_get_page(td->pc, td->offset, &buf_res); + usbd_get_page(td->pc, td->offset, &buf_res); /* get correct length */ if (buf_res.length > count) { @@ -428,7 +428,7 @@ musbotg_setup_data_rx(struct musbotg_td *td) MUSB2_REG_EPFIFO(0), (void *)(&sc->sc_bounce_buf[count / 4]), temp); } - usb2_copy_in(td->pc, td->offset, + usbd_copy_in(td->pc, td->offset, sc->sc_bounce_buf, count); /* update offset and remainder */ @@ -522,7 +522,7 @@ musbotg_setup_data_tx(struct musbotg_td *td) while (count > 0) { uint32_t temp; - usb2_get_page(td->pc, td->offset, &buf_res); + usbd_get_page(td->pc, td->offset, &buf_res); /* get correct length */ if (buf_res.length > count) { @@ -531,7 +531,7 @@ musbotg_setup_data_tx(struct musbotg_td *td) /* check for unaligned memory address */ if (USB_P2U(buf_res.buffer) & 3) { - usb2_copy_out(td->pc, td->offset, + usbd_copy_out(td->pc, td->offset, sc->sc_bounce_buf, count); temp = count & ~3; @@ -692,7 +692,7 @@ repeat: while (count > 0) { uint32_t temp; - usb2_get_page(td->pc, td->offset, &buf_res); + usbd_get_page(td->pc, td->offset, &buf_res); /* get correct length */ if (buf_res.length > count) { @@ -716,7 +716,7 @@ repeat: sc->sc_io_hdl, MUSB2_REG_EPFIFO(td->ep_no), ((void *)&sc->sc_bounce_buf[count / 4]), temp); } - usb2_copy_in(td->pc, td->offset, + usbd_copy_in(td->pc, td->offset, sc->sc_bounce_buf, count); /* update offset and remainder */ @@ -810,7 +810,7 @@ repeat: while (count > 0) { uint32_t temp; - usb2_get_page(td->pc, td->offset, &buf_res); + usbd_get_page(td->pc, td->offset, &buf_res); /* get correct length */ if (buf_res.length > count) { @@ -819,7 +819,7 @@ repeat: /* check for unaligned memory address */ if (USB_P2U(buf_res.buffer) & 3) { - usb2_copy_out(td->pc, td->offset, + usbd_copy_out(td->pc, td->offset, sc->sc_bounce_buf, count); temp = count & ~3; @@ -1115,7 +1115,7 @@ musbotg_setup_standard_chain(struct usb_xfer *xfer) DPRINTFN(8, "addr=%d endpt=%d sumlen=%d speed=%d\n", xfer->address, UE_GET_ADDR(xfer->endpointno), - xfer->sumlen, usb2_get_speed(xfer->xroot->udev)); + xfer->sumlen, usbd_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -1297,11 +1297,11 @@ musbotg_start_standard_chain(struct usb_xfer *xfer) DPRINTFN(14, "enabled interrupts on endpoint\n"); /* put transfer on interrupt queue */ - usb2_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer); + usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer); /* start timeout, if any */ if (xfer->timeout != 0) { - usb2_transfer_timeout_ms(xfer, + usbd_transfer_timeout_ms(xfer, &musbotg_timeout, xfer->timeout); } } @@ -1449,7 +1449,7 @@ musbotg_device_done(struct usb_xfer *xfer, usb_error_t error) DPRINTFN(14, "disabled interrupts on endpoint\n"); } /* dequeue transfer and start next transfer */ - usb2_transfer_done(xfer, error); + usbd_transfer_done(xfer, error); } static void @@ -1689,7 +1689,7 @@ musbotg_init(struct musbotg_softc *sc) (sc->sc_clocks_on) (sc->sc_clocks_arg); } /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* disable all interrupts */ @@ -1702,7 +1702,7 @@ musbotg_init(struct musbotg_softc *sc) musbotg_pull_common(sc, 0); /* wait a little bit (10ms) */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); /* disable double packet buffering */ MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, 0xFFFF); @@ -2011,7 +2011,7 @@ musbotg_device_isoc_enter(struct usb_xfer *xfer) */ temp = (nframes - xfer->endpoint->isoc_next) & MUSB2_MASK_FRAME; - if (usb2_get_speed(xfer->xroot->udev) == USB_SPEED_HIGH) { + if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_HIGH) { fs_frames = (xfer->nframes + 7) / 8; } else { fs_frames = xfer->nframes; @@ -2039,7 +2039,7 @@ musbotg_device_isoc_enter(struct usb_xfer *xfer) * pre-compute when the isochronous transfer will be finished: */ xfer->isoc_time_complete = - usb2_isoc_time_expand(&sc->sc_bus, nframes) + temp + + usb_isoc_time_expand(&sc->sc_bus, nframes) + temp + fs_frames; /* compute frame number for next insertion */ @@ -2581,7 +2581,7 @@ musbotg_xfer_setup(struct usb_setup_params *parm) else parm->hc_max_packet_count = 1; - usb2_transfer_setup_sub(parm); + usbd_transfer_setup_sub(parm); /* * compute maximum number of TDs @@ -2608,7 +2608,7 @@ musbotg_xfer_setup(struct usb_setup_params *parm) } /* - * check if "usb2_transfer_setup_sub" set an error + * check if "usbd_transfer_setup_sub" set an error */ if (parm->err) { return; |
