AnsweredAssumed Answered

快速启动U-boot USB探测设备耗时算法优化(分享)

Question asked by jiu jin hong on Sep 21, 2018
Latest reply on Sep 21, 2018 by jiu jin hong

目前U-bootQUICKBOOT算法删除了USB HCD/USB HUB等协议通信相关延时。通过稳定性测试发现,会概率性出现上电后找不到USB设备的异常(频繁上下电测试)。目前版本USB Probe设备算法确实耗时很高,但是通过强制删除延时的做法不可取,尤其删除Hub Power相关延时后很明显会引起USB HUB探测设备不稳定。

通过查阅资料、git提交走读、代码走读、比较并分析,同时使用2017.3新版本实测USB,最终确认新版软件USB HUB协议算法确实得到改进,使得耗时大约减少60%,由原先的3秒减少为1秒。

因此,请依次按照D->C->B->A的顺序手动合入补丁,并做验证和及时反馈,多谢。

 

测试数据如下:

对比测试:

2015.4 U-boot (只使能USB Host):

2017.3 U-boot(只使能USB Host)

 

补丁:

A: http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2017.03_4.9.11_1.0.0_ga&id=c998da0d67091f800933e59b8693913764a9e8f4

B: http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2017.03_4.9.11_1.0.0_ga&id=3ed9eb93c2c7d8e09ac0b5a047f58c3aae201516

C: http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2017.03_4.9.11_1.0.0_ga&id=2ef117fe4fce4e1af282ac2bbb0be36c41d15e2b

D: http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=imx_v2017.03_4.9.11_1.0.0_ga&id=f7f601002d26cd5afc2241728a1e4d6106044184

Outcomes