#include <common.h>
#include <console.h>
+#include <malloc.h>
#include <watchdog.h>
+#include <linux/err.h>
#include <linux/errno.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
static int _musb_submit_int_msg(struct musb_host_data *host,
struct usb_device *dev, unsigned long pipe,
- void *buffer, int len, int interval)
+ void *buffer, int len, int interval, bool nonblock)
{
construct_urb(&host->urb, &host->hep, dev, USB_ENDPOINT_XFER_INT, pipe,
buffer, len, NULL, interval);
}
int submit_int_msg(struct usb_device *dev, unsigned long pipe,
- void *buffer, int length, int interval)
+ void *buffer, int length, int interval, bool nonblock)
{
- return _musb_submit_int_msg(&musb_host, dev, pipe, buffer, length, interval);
+ return _musb_submit_int_msg(&musb_host, dev, pipe, buffer, length,
+ interval, nonblock);
}
struct int_queue *create_int_queue(struct usb_device *dev,
static int musb_submit_int_msg(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
- int interval)
+ int interval, bool nonblock)
{
struct musb_host_data *host = dev_get_priv(dev);
- return _musb_submit_int_msg(host, udev, pipe, buffer, length, interval);
+ return _musb_submit_int_msg(host, udev, pipe, buffer, length, interval,
+ nonblock);
}
static struct int_queue *musb_create_int_queue(struct udevice *dev,
#endif /* CONFIG_IS_ENABLED(DM_USB) */
#endif /* CONFIG_USB_MUSB_HOST */
-#ifdef CONFIG_USB_MUSB_GADGET
+#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET)
static struct musb *gadget;
int usb_gadget_handle_interrupts(int index)
musbp = &musb_host.host;
break;
#endif
-#ifdef CONFIG_USB_MUSB_GADGET
+#if defined(CONFIG_USB_MUSB_GADGET) && !CONFIG_IS_ENABLED(DM_USB_GADGET)
case MUSB_PERIPHERAL:
musbp = &gadget;
break;