x86 based Device Hangs in EHCI Initialization
Posted: Tue May 17, 2016 7:41 am
Hi all,
I'm dealing with a strange issue. My device hangs while initializing EHCI. I'm using Windows Embedded CE 6 as an operating system. My hw is AMD CS5536 and has 1 EHCI and 2 OHCI in the compain controller.
I will try to explain my hw setup and cases. Additionally, i will explain what i did up to now.
I'm doing cyclic reboot with following configurations:
Case 1 : There is no USB device attached. : No problem observed.
Case 2 : There are 2 usb port attached : No problem observed.
Case 3 : There is a usb port and usb hub. 1 usb device is attached to usb hub. : Device hangs.
Seems like, when i stress the USB, somehow system hangs.
In my OS initializaiton, firstly EHCI is initialized and then OHCI. I think this is the correct way of initializing USB Host Controllers as I read from some links for Linux discussions.
Luckily, I have a software debugger called (KITL) and can debug the issue till device hangs.
What i experienced is that, after setting CONFIGFLAG register which routes all USB device to EHCI first, device hangs. I commented out the code which sets this register and device booted but it didn't recognize high speed devices as expected.
My question is why setting CONFIGFLAG can cause such hang issue?
I have done/checked followings;
- BIOS and EHCI hand off is done in EHCI driver of the operating system.
- If I initialize OHCI before EHCI, it improves the situation a lot but doesnt solve it completely.
- If i dont set CONFIGFLAG, device boots but doesnt recognize high speed devices as i mentioned earlier.
I have another device which is based on Intel, same USB Host Controller driver works great with it.
So I dont know what to do next? What would be your suggestions? Can it be HW specific?
How initializing OHCI earlier improves the situation ? As far as i know, BIOS also initialize OHCI. Can it be related to this ? If it is what should i check?
When I read OHCI/EHCI specification and compare it with source code, it seems perfect match. I dont understand the cause of this issue. I also checked Linux source codes and couldnt find a massive difference. Pls note that, i dont have a hw debugger, therefore i dont see the situation of registers when device hangs.
Any feedback is welcome
Regards,
Buğra
I'm dealing with a strange issue. My device hangs while initializing EHCI. I'm using Windows Embedded CE 6 as an operating system. My hw is AMD CS5536 and has 1 EHCI and 2 OHCI in the compain controller.
I will try to explain my hw setup and cases. Additionally, i will explain what i did up to now.
I'm doing cyclic reboot with following configurations:
Case 1 : There is no USB device attached. : No problem observed.
Case 2 : There are 2 usb port attached : No problem observed.
Case 3 : There is a usb port and usb hub. 1 usb device is attached to usb hub. : Device hangs.
Seems like, when i stress the USB, somehow system hangs.
In my OS initializaiton, firstly EHCI is initialized and then OHCI. I think this is the correct way of initializing USB Host Controllers as I read from some links for Linux discussions.
Luckily, I have a software debugger called (KITL) and can debug the issue till device hangs.
What i experienced is that, after setting CONFIGFLAG register which routes all USB device to EHCI first, device hangs. I commented out the code which sets this register and device booted but it didn't recognize high speed devices as expected.
My question is why setting CONFIGFLAG can cause such hang issue?
I have done/checked followings;
- BIOS and EHCI hand off is done in EHCI driver of the operating system.
- If I initialize OHCI before EHCI, it improves the situation a lot but doesnt solve it completely.
- If i dont set CONFIGFLAG, device boots but doesnt recognize high speed devices as i mentioned earlier.
I have another device which is based on Intel, same USB Host Controller driver works great with it.
So I dont know what to do next? What would be your suggestions? Can it be HW specific?
How initializing OHCI earlier improves the situation ? As far as i know, BIOS also initialize OHCI. Can it be related to this ? If it is what should i check?
When I read OHCI/EHCI specification and compare it with source code, it seems perfect match. I dont understand the cause of this issue. I also checked Linux source codes and couldnt find a massive difference. Pls note that, i dont have a hw debugger, therefore i dont see the situation of registers when device hangs.
Any feedback is welcome
Regards,
Buğra