#include <config.h>
#include <net.h>
#include <malloc.h>
+#include <asm/byteorder.h>
+#include <asm/errno.h>
#include <asm/io.h>
#include <asm/unaligned.h>
#include <linux/types.h>
+#include <linux/usb/ch9.h>
+#include <linux/usb/gadget.h>
#include <usb/mv_udc.h>
+#include "../host/ehci.h"
+#include "mv_udc.h"
/*
* Check if the system has too long cachelines. If the cachelines are
static void ep_enable(int num, int in, int maxpacket)
{
- struct ept_queue_head *head;
struct mv_udc *udc = (struct mv_udc *)controller.ctrl->hcor;
unsigned n;
- head = mv_get_qh(num, in);
n = readl(&udc->epctrl[num]);
if (in)
n |= (CTRL_RXE | CTRL_RXR | CTRL_RXT_BULK);
if (num != 0) {
+ struct ept_queue_head *head = mv_get_qh(num, in);
+
head->config = CONFIG_MAX_PKT(maxpacket) | CONFIG_ZLT;
mv_flush_qh(num);
}