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>
This commit is contained in:
Xiaoguang Wu 2018-07-16 20:58:06 +08:00 committed by lijinxia
parent b9597d4fa8
commit 3389e83177
1 changed files with 11 additions and 0 deletions

View File

@ -823,10 +823,21 @@ usb_dev_init(void *pdata, char *opt)
goto errout;
switch (desc.bcdUSB) {
case 0x310:
case 0x300:
ver = 3; break;
case 0x200:
case 0x201:
case 0x210:
case 0x110:
/* 0x110 is a special case.
* xHCI spec v1.0 was released in 2010 and USB spec v1.1 was
* released in 1998, anything about USB 1.x could hardly be
* found in xHCI spec. So here use USB 2.x to do the emulation
* for USB 1.x device.
* And one more thing, it is almost impossible to find an USB
* 1.x device today.
*/
ver = 2; break;
default:
goto errout;