#include <common.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <asm/processor.h>
#include <asm/unaligned.h>
#include <errno.h>
#include <usb.h>
+#include <linux/delay.h>
#define USB_BUFSIZ 512
static struct usb_device usb_dev[USB_MAX_DEVICE];
static int dev_index;
-#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-#endif
-
/***************************************************************************
* Init USB Device
*/
return change;
}
+/* Lock or unlock async schedule on the controller */
+__weak int usb_lock_async(struct usb_device *dev, int lock)
+{
+ return 0;
+}
+
/*
* disables the asynch behaviour of the control message. This is used for data
* transfers that uses the exclusiv access to the control and bulk messages.
err = get_descriptor_len(dev, 64, 8);
if (err)
return err;
+
+ /*
+ * Logitech Unifying Receiver 046d:c52b bcdDevice 12.10 seems
+ * sensitive about the first Get Descriptor request. If there
+ * are any other requests in the same microframe, the device
+ * reports bogus data, first of the descriptor parts is not
+ * sent to the host. Wait over one microframe duration here
+ * (1mS for USB 1.x , 125uS for USB 2.0) to avoid triggering
+ * the issue.
+ */
+ mdelay(1);
}
dev->epmaxpacketin[0] = dev->descriptor.bMaxPacketSize0;