usb: hub: Add 3.0 hub port status mask of 2.0 hub
authorBin Meng <bmeng.cn@gmail.com>
Wed, 19 Jul 2017 13:50:01 +0000 (21:50 +0800)
committerMarek Vasut <marex@denx.de>
Fri, 28 Jul 2017 21:34:21 +0000 (23:34 +0200)
USB 3.0 hub port status has different bit position regarding to
port power, port speed, etc. But others are the same as 2.0 hubs.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
include/usb_defs.h

index 608a0ca568bff911cd2f761587bd913d077ba01b..6b4385a2d8347f0334aa7bcf028137e3d02d6840 100644 (file)
 
 /*
  * Changes to wPortStatus bit field in USB 3.0
- * See USB 3.0 spec Table 10-11
+ * See USB 3.0 spec Table 10-10
  */
 #define USB_SS_PORT_STAT_LINK_STATE    0x01e0
 #define USB_SS_PORT_STAT_POWER         0x0200
 #define USB_SS_PORT_STAT_SPEED         0x1c00
 #define USB_SS_PORT_STAT_SPEED_5GBPS   0x0000
+/* Bits that are the same from USB 2.0 */
+#define USB_SS_PORT_STAT_MASK          (USB_PORT_STAT_CONNECTION | \
+                                        USB_PORT_STAT_ENABLE | \
+                                        USB_PORT_STAT_OVERCURRENT | \
+                                        USB_PORT_STAT_RESET)
 
 /* wPortChange bits */
 #define USB_PORT_STAT_C_CONNECTION  0x0001