summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-09-24 14:06:06 +0200
committerMarek Vasut <marex@denx.de>2014-11-04 06:04:00 +0100
commit8460b89a6d82ce06c712823973eda6cdb262e9d5 (patch)
treef08192f6eeb1c84dfe22ce3a32df751dc89369d0
parent8aa26b8e48ba63cf0d4fd8e49658b87cc00a9eaf (diff)
downloadu-boot-imx-8460b89a6d82ce06c712823973eda6cdb262e9d5.zip
u-boot-imx-8460b89a6d82ce06c712823973eda6cdb262e9d5.tar.gz
u-boot-imx-8460b89a6d82ce06c712823973eda6cdb262e9d5.tar.bz2
usb: Make pollable int support available outside of ehci-hcd.c
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--drivers/usb/host/ehci-hcd.c2
-rw-r--r--include/usb.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 78a1af8..c671c72 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1340,7 +1340,7 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue)
}
/* Do not free buffers associated with QHs, they're owned by someone else */
-static int
+int
destroy_int_queue(struct usb_device *dev, struct int_queue *queue)
{
struct ehci_ctrl *ctrl = dev->controller;
diff --git a/include/usb.h b/include/usb.h
index c4a288d..9d0d04d 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -129,6 +129,8 @@ struct usb_device {
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
@@ -163,6 +165,13 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
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