USB: musb_udc: Make musb_peri_rx_ep check for MUSB_RXCSR_RXPKTRDY
[oweals/u-boot.git] / drivers / usb / musb / musb_hcd.c
index 325edb9677d48c69a427a8c3923a626b6fc7c9d0..06be38d1cf96928b043f0b92fedbc8ec4d91bb9c 100644 (file)
@@ -824,7 +824,7 @@ static int musb_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
 
        dev->act_len = len;
        dev->status = stat;
-       debug("dev act_len %d, status %d\n", dev->act_len, dev->status);
+       debug("dev act_len %d, status %lu\n", dev->act_len, dev->status);
 
        return stat;
 }
@@ -1092,7 +1092,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
 /*
  * This function initializes the usb controller module.
  */
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
 {
        u8  power;
        u32 timeout;
@@ -1113,7 +1113,7 @@ int usb_lowlevel_init(void)
         * should be a usb device connected.
         */
        timeout = musb_cfg.timeout;
-       while (timeout--)
+       while (--timeout)
                if (readb(&musbr->devctl) & MUSB_DEVCTL_HM)
                        break;
 
@@ -1144,7 +1144,7 @@ int usb_lowlevel_init(void)
 /*
  * This function stops the operation of the davinci usb module.
  */
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
 {
        /* Reset the USB module */
        musb_platform_deinit();
@@ -1265,31 +1265,3 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe,
        dev->act_len = len;
        return 0;
 }
-
-
-#ifdef CONFIG_SYS_USB_EVENT_POLL
-/*
- * This function polls for USB keyboard data.
- */
-void usb_event_poll()
-{
-       struct stdio_dev *dev;
-       struct usb_device *usb_kbd_dev;
-       struct usb_interface *iface;
-       struct usb_endpoint_descriptor *ep;
-       int pipe;
-       int maxp;
-
-       /* Get the pointer to USB Keyboard device pointer */
-       dev = stdio_get_by_name("usbkbd");
-       usb_kbd_dev = (struct usb_device *)dev->priv;
-       iface = &usb_kbd_dev->config.if_desc[0];
-       ep = &iface->ep_desc[0];
-       pipe = usb_rcvintpipe(usb_kbd_dev, ep->bEndpointAddress);
-
-       /* Submit a interrupt transfer request */
-       maxp = usb_maxpacket(usb_kbd_dev, pipe);
-       usb_submit_int_msg(usb_kbd_dev, pipe, &new[0],
-                       maxp > 8 ? 8 : maxp, ep->bInterval);
-}
-#endif /* CONFIG_SYS_USB_EVENT_POLL */