#include <usb_defs.h>
#include <linux/usb/ch9.h>
+#include <asm/cache.h>
+#include <part.h>
/*
* The EHCI spec says that we must align to at least 32 bytes. However,
unsigned int slot_id;
};
+struct int_queue;
+
+/*
+ * You can initialize platform's USB host or device
+ * ports by passing this enum as an argument to
+ * board_usb_init().
+ */
+enum usb_init_type {
+ USB_INIT_HOST,
+ USB_INIT_DEVICE
+};
+
/**********************************************************************
* this is how the lowlevel part communicate with the outer world
*/
defined(CONFIG_USB_OMAP3) || defined(CONFIG_USB_DA8XX) || \
defined(CONFIG_USB_BLACKFIN) || defined(CONFIG_USB_AM35X) || \
defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \
- defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_XHCI)
+ defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_XHCI) || \
+ defined(CONFIG_USB_DWC2)
-int usb_lowlevel_init(int index, void **controller);
+int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
int usb_lowlevel_stop(int index);
int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, int interval);
+#ifdef CONFIG_USB_EHCI /* Only the ehci code has pollable int support */
+struct int_queue *create_int_queue(struct usb_device *dev, unsigned long pipe,
+ int queuesize, int elementsize, void *buffer);
+int destroy_int_queue(struct usb_device *dev, struct int_queue *queue);
+void *poll_int_queue(struct usb_device *dev, struct int_queue *queue);
+#endif
+
/* Defines */
#define USB_UHCI_VEND_ID 0x8086
#define USB_UHCI_DEV_ID 0x7112
#endif
/*
- * You can initialize platform's USB host or device
- * ports by passing this enum as an argument to
- * board_usb_init().
- */
-enum board_usb_init_type {
- USB_INIT_HOST,
- USB_INIT_DEVICE
-};
-
-/*
* board-specific hardware initialization, called by
* usb drivers and u-boot commands
*
* @param index USB controller number
* @param init initializes controller as USB host or device
*/
-int board_usb_init(int index, enum board_usb_init_type init);
+int board_usb_init(int index, enum usb_init_type init);
/*
* can be used to clean up after failed USB initialization attempt
* vide: board_usb_init()
*
* @param index USB controller number for selective cleanup
- * @param init board_usb_init_type passed to board_usb_init()
+ * @param init usb_init_type passed to board_usb_init()
*/
-int board_usb_cleanup(int index, enum board_usb_init_type init);
+int board_usb_cleanup(int index, enum usb_init_type init);
#ifdef CONFIG_USB_STORAGE
#ifdef CONFIG_USB_KEYBOARD
int drv_usb_kbd_init(void);
-int usb_kbd_deregister(void);
+int usb_kbd_deregister(int force);
#endif
/* routines */