Skip to content

Commit 3389e83

Browse files
xiaoguangwulijinxia
authored andcommitted
DM USB: add some BCD codes
BCD code is USB Specification Release Number in Binaray-Coded Decimal. Add some BCD codes for some USB devices. Change-Id: I40f04ef2ebaf5b0da554ff8f432415e8e3cebe01 Tracked-On: Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Reviewed-by: Liang Yang <liang3.yang@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent b9597d4 commit 3389e83

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

devicemodel/hw/platform/usb_pmapper.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,10 +823,21 @@ usb_dev_init(void *pdata, char *opt)
823823
goto errout;
824824

825825
switch (desc.bcdUSB) {
826+
case 0x310:
826827
case 0x300:
827828
ver = 3; break;
828829
case 0x200:
830+
case 0x201:
831+
case 0x210:
829832
case 0x110:
833+
/* 0x110 is a special case.
834+
* xHCI spec v1.0 was released in 2010 and USB spec v1.1 was
835+
* released in 1998, anything about USB 1.x could hardly be
836+
* found in xHCI spec. So here use USB 2.x to do the emulation
837+
* for USB 1.x device.
838+
* And one more thing, it is almost impossible to find an USB
839+
* 1.x device today.
840+
*/
830841
ver = 2; break;
831842
default:
832843
goto errout;

0 commit comments

Comments
 (0)