Hello,
I plan UHCI driver and I want to know what is the initialization procedure.
For example:
1) HCRESET
2) Reset port
etc.
Sorry for my English but I'm Italian
UHCI Initialization Procedure
- iocoder
- Member
- Posts: 208
- Joined: Sun Oct 18, 2009 5:47 pm
- Libera.chat IRC: iocoder
- Location: Alexandria, Egypt | Ottawa, Canada
- Contact:
Re: UHCI Initialization Procedure
Buona sera signore,
I'm currently working also on a UHCI driver, my initialization code does the following:
1- Initializes arrays that will be used, which are an Array for QHs, an Array for TDs, and an Array for Frame List.
2- Uses the machinsm of Linux in calculating number of ports.
3- Turns off Legacy Support for Keyboard and Mouse. (Linux does that, but i think removing that step is better).
4- does a HCReset.
5- Disables Interrupt requests (Just to be safe).
6- Finally, Resets the ports.
Than, it initializes the Universal Host Controller:
1- Sets SOFMOD register to 64. (In order to make each frame take 1ms).
2- Sets the frame list entries to 0x00001.
3- Sets FRBASEADD register to the base of the array of frame list in memory.
4- Sets UHCI_REG_FRNUM to Zero
5- Finally, sets UHCI_REG_USBCMD to 0x01 (RUNNING Mode).
Now you are ready to make TDs and to transfer data with drives, you should make a function that watches changes in attached and detached drives, and when a new connected device is found, you should enumerate it. I'm now working on Enumeration, i hope to finish it successfully.
Finally i would say that sono egiziano ma studio l'italiano a scuola perche` l'italiano e` una lingua facilissima e musicale.
Regards,
Mostafa
I'm currently working also on a UHCI driver, my initialization code does the following:
1- Initializes arrays that will be used, which are an Array for QHs, an Array for TDs, and an Array for Frame List.
2- Uses the machinsm of Linux in calculating number of ports.
3- Turns off Legacy Support for Keyboard and Mouse. (Linux does that, but i think removing that step is better).
4- does a HCReset.
5- Disables Interrupt requests (Just to be safe).
6- Finally, Resets the ports.
Than, it initializes the Universal Host Controller:
1- Sets SOFMOD register to 64. (In order to make each frame take 1ms).
2- Sets the frame list entries to 0x00001.
3- Sets FRBASEADD register to the base of the array of frame list in memory.
4- Sets UHCI_REG_FRNUM to Zero
5- Finally, sets UHCI_REG_USBCMD to 0x01 (RUNNING Mode).
Now you are ready to make TDs and to transfer data with drives, you should make a function that watches changes in attached and detached drives, and when a new connected device is found, you should enumerate it. I'm now working on Enumeration, i hope to finish it successfully.
Finally i would say that sono egiziano ma studio l'italiano a scuola perche` l'italiano e` una lingua facilissima e musicale.
Regards,
Mostafa
Re: UHCI Initialization Procedure
Ciao, grazie per aver risposto
In questo mondo c'è ancora qualcuno che studia l' italiano?
However, now UHCI driver works. I changed the initialization procedure as you said.
But it don't work with all devices, it work only with a usb mouse or usb tablet.
This devices(mouse and tablet) show a SPD(Short Packet), maybe the other devices don't work for that?
Saluti, Enrico
In questo mondo c'è ancora qualcuno che studia l' italiano?
However, now UHCI driver works. I changed the initialization procedure as you said.
But it don't work with all devices, it work only with a usb mouse or usb tablet.
This devices(mouse and tablet) show a SPD(Short Packet), maybe the other devices don't work for that?
Saluti, Enrico
Re: UHCI Initialization Procedure
UHCI does not work with hi-speed devices. There you might need an EHCI driver: http://prettyos.svn.sourceforge.net/vie ... nel/ehci.c (PrettyOS)
EDIT: UHCI does not work with hi-speed devices in hi-speed mode (sorry for being not fully correct)
EDIT: UHCI does not work with hi-speed devices in hi-speed mode (sorry for being not fully correct)
Last edited by ehenkes on Sun May 16, 2010 6:01 pm, edited 1 time in total.
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
Re: UHCI Initialization Procedure
Hello, ehenkes
That is not true. You can connect hi-speed devices to UHCI or OHCI, but they must work. Although in this case the devices in high-speed works in low-speed.
Saluti, Enrico
That is not true. You can connect hi-speed devices to UHCI or OHCI, but they must work. Although in this case the devices in high-speed works in low-speed.
Saluti, Enrico
- iocoder
- Member
- Posts: 208
- Joined: Sun Oct 18, 2009 5:47 pm
- Libera.chat IRC: iocoder
- Location: Alexandria, Egypt | Ottawa, Canada
- Contact:
Re: UHCI Initialization Procedure
Buonasera!
i will try to figure that out to make sure of that.
Regards e Saluti,
Mostafa.
Certo! l'italiano e` studiato approssimativamente in tutto il mondo.In questo mondo c'è ancora qualcuno che studia l' italiano?
well, how don't that devices work, or what kind of trobules happens?? although i'm a beginner but i, or somebody else, might help you.But it don't work with all devices, it work only with a usb mouse or usb tablet.
in my point of view, as long as the device appears to UHCI, so it is able to work in low and full speed. it may also appear to EHCI if it supports hi-speed. if it is only hi-speed, i think it shall appear to EHCI only.UHCI does not work with hi-speed devices.
i will try to figure that out to make sure of that.
Regards e Saluti,
Mostafa.
Re: UHCI Initialization Procedure
Such devices would not be USB 2.0 compliant and are thus forbidden (every high speed device must somehow work in full speed mode, too).mostafazizo wrote:if it is only hi-speed, i think it shall appear to EHCI only.
- iocoder
- Member
- Posts: 208
- Joined: Sun Oct 18, 2009 5:47 pm
- Libera.chat IRC: iocoder
- Location: Alexandria, Egypt | Ottawa, Canada
- Contact:
Re: UHCI Initialization Procedure
yes you are right, i figured that out. any hi-speed device should support full-speed transforms, or it breaks the USB Standard Specification for USB2.XanClic wrote:Such devices would not be USB 2.0 compliant and are thus forbidden (every high speed device must somehow work in full speed mode, too).mostafazizo wrote:if it is only hi-speed, i think it shall appear to EHCI only.