]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
usb: Make pollable int support available outside of ehci-hcd.c
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Sep 2014 12:06:06 +0000 (14:06 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 4 Nov 2014 05:04:00 +0000 (06:04 +0100)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/usb/host/ehci-hcd.c
include/usb.h

index 78a1af8d7d9d5d1e34048713e3c3386cdc3d136e..c671c72cb1cfc014a00b47b8b7ad38c1a52e5b0f 100644 (file)
@@ -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;
index c4a288d5e9f804bbbda4ac9c8c24f13d1bd59c55..9d0d04dd8e1ba45aa000da2f3e9791ad685b2441 100644 (file)
@@ -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