]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/usb.h
M28: Enable FDT support
[karo-tx-uboot.git] / include / usb.h
index afd65e3180fbebeb18706168fe977043f403dd36..48e4bcda54640fbf1a0d8c3feecba09236cd2341 100644 (file)
 
 #define USB_CNTL_TIMEOUT 100 /* 100ms timeout */
 
+/*
+ * This is the timeout to allow for submitting an urb in ms. We allow more
+ * time for a BULK device to react - some are slow.
+ */
+#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 1000)
+
 /* device request (setup) */
 struct devrequest {
        unsigned char   requesttype;
@@ -143,7 +149,6 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
                        int transfer_len, struct devrequest *setup);
 int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
                        int transfer_len, int interval);
-void usb_event_poll(void);
 
 /* Defines */
 #define USB_UHCI_VEND_ID       0x8086
@@ -162,6 +167,13 @@ int usb_stor_info(void);
 
 #endif
 
+#ifdef CONFIG_USB_HOST_ETHER
+
+#define USB_MAX_ETH_DEV 5
+int usb_host_eth_scan(int mode);
+
+#endif
+
 #ifdef CONFIG_USB_KEYBOARD
 
 int drv_usb_kbd_init(void);
@@ -185,9 +197,8 @@ int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
                        void *data, int len, int *actual_length, int timeout);
 int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
                        void *buffer, int transfer_len, int interval);
-void usb_disable_asynch(int disable);
+int usb_disable_asynch(int disable);
 int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
-inline void wait_ms(unsigned long ms);
 int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer,
                                int cfgno);
 int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type,
@@ -354,4 +365,12 @@ struct usb_hub_device {
        struct usb_hub_descriptor desc;
 };
 
+int usb_hub_probe(struct usb_device *dev, int ifnum);
+void usb_hub_reset(void);
+int hub_port_reset(struct usb_device *dev, int port,
+                         unsigned short *portstat);
+
+struct usb_device *usb_alloc_new_device(void);
+int usb_new_device(struct usb_device *dev);
+
 #endif /*_USB_H_ */