summaryrefslogtreecommitdiff
path: root/include/usb
diff options
context:
space:
mode:
authorTom Rix <Tom.Rix@windriver.com>2009-10-31 12:37:41 -0500
committerRemy Bohmer <linux@bohmer.net>2009-12-20 12:47:37 +0100
commitf298e4b6dd56df3e35a13a6ddd572ca3baf06ad2 (patch)
treedf52bb5df9b9d717e1927bd652b8cdcc04d35f59 /include/usb
parentbffbb2a86d2a3aa28bd8f9869aa553082fb5af5f (diff)
downloadu-boot-imx-f298e4b6dd56df3e35a13a6ddd572ca3baf06ad2.zip
u-boot-imx-f298e4b6dd56df3e35a13a6ddd572ca3baf06ad2.tar.gz
u-boot-imx-f298e4b6dd56df3e35a13a6ddd572ca3baf06ad2.tar.bz2
OMAP3 Add usb device support
This change adds the usb device support for musb. Omap3 platform support added at the same level as davinci. The interface for usbtty to use the musb device support was added. Verified on omap3 beagle, zoom1 and zoom2. Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/musb_udc.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/usb/musb_udc.h b/include/usb/musb_udc.h
new file mode 100644
index 0000000..ef37dbb
--- /dev/null
+++ b/include/usb/musb_udc.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix <Tom.Rix@windriver.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef __MUSB_UDC_H__
+#define __MUSB_UDC_H__
+
+#include <usbdevice.h>
+
+/* UDC level routines */
+void udc_irq(void);
+void udc_set_nak(int ep_num);
+void udc_unset_nak(int ep_num);
+int udc_endpoint_write(struct usb_endpoint_instance *endpoint);
+void udc_setup_ep(struct usb_device_instance *device, unsigned int id,
+ struct usb_endpoint_instance *endpoint);
+void udc_connect(void);
+void udc_disconnect(void);
+void udc_enable(struct usb_device_instance *device);
+void udc_disable(void);
+void udc_startup_events(struct usb_device_instance *device);
+int udc_init(void);
+
+/* usbtty */
+#ifdef CONFIG_USB_TTY
+
+#define EP0_MAX_PACKET_SIZE 64 /* MUSB_EP0_FIFOSIZE */
+#define UDC_INT_ENDPOINT 1
+#define UDC_INT_PACKET_SIZE 64
+#define UDC_OUT_ENDPOINT 2
+#define UDC_OUT_PACKET_SIZE 64
+#define UDC_IN_ENDPOINT 3
+#define UDC_IN_PACKET_SIZE 64
+#define UDC_BULK_PACKET_SIZE 64
+
+#endif /* CONFIG_USB_TTY */
+
+#endif /* __MUSB_UDC_H__ */
+