[U-Boot] [PATCH v4 01/13] linux/usb/ch9.h: update with the version from Linux tree

2012-11-03 Thread Ilya Yanok
Signed-off-by: Ilya Yanok ya...@cogentembedded.com
Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com
---

 drivers/usb/gadget/config.c  |1 -
 drivers/usb/gadget/epautoconf.c  |1 -
 drivers/usb/gadget/ether.c   |1 -
 drivers/usb/gadget/s3c_udc_otg.c |1 -
 drivers/usb/gadget/usbstring.c   |1 -
 include/linux/usb/ch9.h  |  514 --
 include/usb/s3c_udc.h|1 -
 7 files changed, 499 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index f88d0c1..f9163a8 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -27,7 +27,6 @@
 #include linux/string.h
 
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index b656c8b..5b8776e 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -23,7 +23,6 @@
 
 #include common.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include asm/errno.h
 #include linux/usb/gadget.h
 #include asm/unaligned.h
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 1e187e5..c51e69c 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -24,7 +24,6 @@
 #include asm/errno.h
 #include linux/netdevice.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/cdc.h
 #include linux/usb/gadget.h
 #include net.h
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 3fdfdf7..f9d24e3 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -37,7 +37,6 @@
 #include malloc.h
 
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 #include asm/byteorder.h
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index 4dbe060..9cf 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -13,7 +13,6 @@
 #include common.h
 #include asm/errno.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 #include asm/unaligned.h
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index ce1d1e1..d1d732c 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -28,15 +28,13 @@
  * [c] for consistency, removing all doubt even when it appears to
  * someone that the two other points are non-issues for that
  * particular descriptor type.
- *
- * Ported to U-boot by: Thomas Smits ts.sm...@gmail.com and
- *  Remy Bohmer li...@bohmer.net
  */
 
 #ifndef __LINUX_USB_CH9_H
 #define __LINUX_USB_CH9_H
 
 #include linux/types.h   /* __u8 etc */
+#include asm/byteorder.h /* le16_to_cpu */
 
 /*-*/
 
@@ -70,7 +68,7 @@
 #define USB_RECIP_OTHER0x03
 /* From Wireless USB 1.0 */
 #define USB_RECIP_PORT 0x04
-#define USB_RECIP_RPIPE0x05
+#define USB_RECIP_RPIPE0x05
 
 /*
  * Standard requests, for the bRequest field of a SETUP packet.
@@ -90,6 +88,8 @@
 #define USB_REQ_GET_INTERFACE  0x0A
 #define USB_REQ_SET_INTERFACE  0x0B
 #define USB_REQ_SYNCH_FRAME0x0C
+#define USB_REQ_SET_SEL0x30
+#define USB_REQ_SET_ISOCH_DELAY0x31
 
 #define USB_REQ_SET_ENCRYPTION 0x0D/* Wireless USB */
 #define USB_REQ_GET_ENCRYPTION 0x0E
@@ -105,10 +105,16 @@
 #define USB_REQ_LOOPBACK_DATA_READ 0x16
 #define USB_REQ_SET_INTERFACE_DS   0x17
 
+/* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command,
+ * used by hubs to put ports into a new L1 suspend state, except that it
+ * forgot to define its number ...
+ */
+
 /*
  * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and
  * are read as a bit array returned by USB_REQ_GET_STATUS.  (So there
- * are at most sixteen features of each type.)
+ * are at most sixteen features of each type.)  Hubs may also support a
+ * new USB_REQ_TEST_AND_SET_FEATURE to put ports into L1 suspend.
  */
 #define USB_DEVICE_SELF_POWERED0   /* (read only) */
 #define USB_DEVICE_REMOTE_WAKEUP   1   /* dev may initiate wakeup */
@@ -120,8 +126,38 @@
 #define USB_DEVICE_A_ALT_HNP_SUPPORT   5   /* (otg) other RH port does */
 #define USB_DEVICE_DEBUG_MODE  6   /* (special devices only) */
 
+/*
+ * Test Mode Selectors
+ * See USB 2.0 spec Table 9-7
+ */
+#defineTEST_J  1
+#defineTEST_K  2
+#defineTEST_SE0_NAK3
+#defineTEST_PACKET 4
+#defineTEST_FORCE_EN   5
+
+/*
+ * New Feature Selectors as added by USB 3.0
+ * See USB 3.0 spec Table 9-6
+ */
+#define USB_DEVICE_U1_ENABLE   48  /* dev may initiate U1 transition */
+#define 

[U-Boot] [PATCH v4 01/13] linux/usb/ch9.h: update with the version from Linux tree

2012-11-03 Thread Ilya Yanok
Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com
---

 drivers/usb/gadget/config.c  |1 -
 drivers/usb/gadget/epautoconf.c  |1 -
 drivers/usb/gadget/ether.c   |1 -
 drivers/usb/gadget/s3c_udc_otg.c |1 -
 drivers/usb/gadget/usbstring.c   |1 -
 include/linux/usb/ch9.h  |  514 --
 include/usb/s3c_udc.h|1 -
 7 files changed, 499 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index f88d0c1..f9163a8 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -27,7 +27,6 @@
 #include linux/string.h
 
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index b656c8b..5b8776e 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -23,7 +23,6 @@
 
 #include common.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include asm/errno.h
 #include linux/usb/gadget.h
 #include asm/unaligned.h
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 1e187e5..c51e69c 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -24,7 +24,6 @@
 #include asm/errno.h
 #include linux/netdevice.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/cdc.h
 #include linux/usb/gadget.h
 #include net.h
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 3fdfdf7..f9d24e3 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -37,7 +37,6 @@
 #include malloc.h
 
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 #include asm/byteorder.h
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index 4dbe060..9cf 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -13,7 +13,6 @@
 #include common.h
 #include asm/errno.h
 #include linux/usb/ch9.h
-#include usbdescriptors.h
 #include linux/usb/gadget.h
 
 #include asm/unaligned.h
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index ce1d1e1..d1d732c 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -28,15 +28,13 @@
  * [c] for consistency, removing all doubt even when it appears to
  * someone that the two other points are non-issues for that
  * particular descriptor type.
- *
- * Ported to U-boot by: Thomas Smits ts.sm...@gmail.com and
- *  Remy Bohmer li...@bohmer.net
  */
 
 #ifndef __LINUX_USB_CH9_H
 #define __LINUX_USB_CH9_H
 
 #include linux/types.h   /* __u8 etc */
+#include asm/byteorder.h /* le16_to_cpu */
 
 /*-*/
 
@@ -70,7 +68,7 @@
 #define USB_RECIP_OTHER0x03
 /* From Wireless USB 1.0 */
 #define USB_RECIP_PORT 0x04
-#define USB_RECIP_RPIPE0x05
+#define USB_RECIP_RPIPE0x05
 
 /*
  * Standard requests, for the bRequest field of a SETUP packet.
@@ -90,6 +88,8 @@
 #define USB_REQ_GET_INTERFACE  0x0A
 #define USB_REQ_SET_INTERFACE  0x0B
 #define USB_REQ_SYNCH_FRAME0x0C
+#define USB_REQ_SET_SEL0x30
+#define USB_REQ_SET_ISOCH_DELAY0x31
 
 #define USB_REQ_SET_ENCRYPTION 0x0D/* Wireless USB */
 #define USB_REQ_GET_ENCRYPTION 0x0E
@@ -105,10 +105,16 @@
 #define USB_REQ_LOOPBACK_DATA_READ 0x16
 #define USB_REQ_SET_INTERFACE_DS   0x17
 
+/* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command,
+ * used by hubs to put ports into a new L1 suspend state, except that it
+ * forgot to define its number ...
+ */
+
 /*
  * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and
  * are read as a bit array returned by USB_REQ_GET_STATUS.  (So there
- * are at most sixteen features of each type.)
+ * are at most sixteen features of each type.)  Hubs may also support a
+ * new USB_REQ_TEST_AND_SET_FEATURE to put ports into L1 suspend.
  */
 #define USB_DEVICE_SELF_POWERED0   /* (read only) */
 #define USB_DEVICE_REMOTE_WAKEUP   1   /* dev may initiate wakeup */
@@ -120,8 +126,38 @@
 #define USB_DEVICE_A_ALT_HNP_SUPPORT   5   /* (otg) other RH port does */
 #define USB_DEVICE_DEBUG_MODE  6   /* (special devices only) */
 
+/*
+ * Test Mode Selectors
+ * See USB 2.0 spec Table 9-7
+ */
+#defineTEST_J  1
+#defineTEST_K  2
+#defineTEST_SE0_NAK3
+#defineTEST_PACKET 4
+#defineTEST_FORCE_EN   5
+
+/*
+ * New Feature Selectors as added by USB 3.0
+ * See USB 3.0 spec Table 9-6
+ */
+#define USB_DEVICE_U1_ENABLE   48  /* dev may initiate U1 transition */
+#define USB_DEVICE_U2_ENABLE   49  /* dev may initiate U2 transition */