summaryrefslogtreecommitdiff
path: root/include/usb.h
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2015-12-22 01:18:13 +0100
committerMarek Vasut <marex@denx.de>2015-12-31 10:05:31 +0100
commitc75f57fba4712fed1b0f7b9b10c2bbfdb9ede449 (patch)
tree0266dc3aca10dca86b9881543edc738718105963 /include/usb.h
parent78680314c53a95c0bb25e942662979843b60d7b9 (diff)
downloadu-boot-imx-c75f57fba4712fed1b0f7b9b10c2bbfdb9ede449.zip
u-boot-imx-c75f57fba4712fed1b0f7b9b10c2bbfdb9ede449.tar.gz
u-boot-imx-c75f57fba4712fed1b0f7b9b10c2bbfdb9ede449.tar.bz2
usb: Alloc buffer for USB descriptor dynamically
The configuration descriptor includes all interface, endpoint and auxiliary descriptors (e.g. report, union) so 512 bytes may not be enough. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/usb.h')
-rw-r--r--include/usb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/usb.h b/include/usb.h
index 55b9268..198ecbc 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -266,8 +266,9 @@ int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
void *buffer, int transfer_len, int interval);
int usb_disable_asynch(int disable);
int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
-int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer,
- int cfgno);
+int usb_get_configuration_no(struct usb_device *dev, int cfgno,
+ unsigned char *buffer, int length);
+int usb_get_configuration_len(struct usb_device *dev, int cfgno);
int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type,
unsigned char id, void *buf, int size);
int usb_get_class_descriptor(struct usb_device *dev, int ifnum,