Re: CEPC USB Support by Luc
Luc
Thu Apr 12 15:40:28 CDT 2007
Hi,
I am not a specialist either, but maybe I could give you some usefull tips.
The UHCI driver is loaded by the PCIBUS driver. That one gets it's
information out the registry. Check the uhci.reg file for those settings.
Basically, uhci.dll will be loaded if a device on the pcibus has Class Ox0C
and SubClass Ox03. It doesn't really matter what the Vendor and Device ID
numbers are.
As Valter indicates, You might have a problem with shared interrupts. You
could try to load just the UHCI driver to see if that results in a
functional USB host port. Check your platform.bat file and remove the
"set BSP_USB_EHCI=1" or replace it by "set BSP_USB_EHCI="
You can better specify the parameters of your UHCI controller on the PCIbus.
The Complete registry setting for the UHCI should look like this:
[$(PCI_BUS_ROOT)\Template\UHCI]
"Prefix"="HCD"
"Dll"="uhci.dll"
"BusNumber"=dword:0
"DeviceNumber"=dword:7
"FunctionNumber"=dword:02
"Order"=dword:1
"Class"=dword:0C
"SubClass"=dword:03
"RevisionID"=dword:0e
"ProgIF"=dword:00
"VendorID"=dword:1106
"DeviceID"=dword:3038
"SubVendorID"=dword:0925
"SubSystemID"=dword:1234
"IsrDll"="giisr.dll"
"IsrHandler"="ISRHandler"
"HcdCapability"=dword:5 ;HCD_SUSPEND_ON_REQUEST|HCD_SUSPEND_RESUME
Basically, the settings in the original uhci.dll should work fine. I added
the additional keys because my board has 2 UHCI controllers, and I wanted to
load different drivers for them. I have a problem when both controllers are
used simultaniously. Sometimes, my OS hangs. I am still examining this
issue.
A tricky part is the installable interrupt service routine. It is installed
in the "system.c" "InitializeUHCI" function. In order to see if the UHCI
controller chip generated a interrupt, it's status register bit's are masked
with it's interrupt mask register bit's. There are some error conditions
that might also cause interrupts which can not be masked by the mask
register. I think it is one of them that causes my hang problem.
If you check the Interrupt service threat code, you will see that those
interrupt cases are left unhandeld in the driver.
In "chw.cpp" check function "USBInterruptThreat".
Probably, the programmer who wrote this driver went on vacation, and forgot
that he hadn't finished that piece of code.
It wouldn't suprise me that you get the message:
CPipe::CheckForDoneTransfersThread - warning! Called when no pipes were busy
when you execute the Interrupt Service Threat without any of the proper
interrupt bit's set.
I hope this answers (at least) some of your questions.
regards,
Luc
"Suja" <sujamoljames@yahoo.com> wrote in message
news:1176299434.890478.74780@q75g2000hsh.googlegroups.com...
> Hi All,
>
> I am reposting this for the attention of all USB exports.
>
> I enabled the USB UHCI and EHCI support in CEPC build and loaded the
> NK.BIN image using loadcepc. Also no legacy USB support in BIOS. But
> there is no response to any USB device and no pop-up wizard for driver
> installation.
>
> 1) The debug console shows HCD load and there is no specific error
> reported.
>
> 0x83fa1e08: HCD driver DLL attach
> 0x83fa1e08: HCD!HCD_Init
>
> 2) I enabled all the debug zones and the below message is coming
> periodically
>
> CPipe::CheckForDoneTransfersThread - warning! Called when no pipes
> were busy
>
> 3) Also the HCD documentation says, the default HCD module is hard-
> coded for Ven ID 0x8086 and DEV ID 0x7112. Is this still hold true for
> CE5.0 ? ( My VEN ID is same, but DEV ID is different )
>
> 4) From the mailing list, I understood the hardcoded value is
> "UHCD_DEVICE_ID_PIIX4" in UHCD.C for CE3.0. But in CE5.0 source code,
> I am not able to locate the same.
>
> Can anyone list out the exact steps of adding USB support in CEPC?
>
> Thanks in advance
> Suja.
>