USB

General discussion about Visopsys. We'll create more specific forums if the number of posts justifies that.
Post Reply
User avatar
Asper
Posts: 6
Joined: Tue Feb 01, 2011 7:23 am
Location: Kyrgyzstan, Bishkek

USB

Post by Asper » Tue Feb 01, 2011 7:34 am

Hi all!

I have learned a lot about Visopsys USB stack and I like it for the simplicity and efficiency. I want to make a USB stack for another OS using ideas from it.
Is it under development nowadays? Does UHCI work? What about OHCI? EHCI?

User avatar
andymc
Posts: 560
Joined: Tue Nov 16, 2010 7:20 pm

Re: USB

Post by andymc » Wed Feb 02, 2011 12:46 am

Hi Asper,

Visopsys hasn't had a new release in a long time, but a big new release is basically ready to go. I've done a fair bit of work on the USB stack in the last year or so. It's not perfect at all, but when it works, it works pretty well. Usually depends on the device that's plugged in.

There's an abstraction layer that should make it pretty easy to implement other types of controllers, but only UHCI (EHCI) is currently implemented. I'd like to add OHCI.

Andy

User avatar
Asper
Posts: 6
Joined: Tue Feb 01, 2011 7:23 am
Location: Kyrgyzstan, Bishkek

Re: USB

Post by Asper » Wed Feb 02, 2011 4:06 pm

I'll be waiting for the new release. It's a very good news! :D
andymc wrote:Usually depends on the device that's plugged in.
Now I'd like to make a Host controller drivers first .
andymc wrote:There's an abstraction layer that should make it pretty easy to implement other types of controllers
Yes I know it. ;) And as I sayed I like it.

User avatar
Asper
Posts: 6
Joined: Tue Feb 01, 2011 7:23 am
Location: Kyrgyzstan, Bishkek

Re: USB

Post by Asper » Thu Feb 10, 2011 2:36 pm

I have no computer with UHCI now, my old motherboard unfortunately burned :evil: . Now I have computer and nettop that are both have EHCI+OHCI controllers. Last Friday I have printed out OHCI specification and am reading it now. So I think that there will be some difficulties to integrate OHCI support into the current USB stack, because data structures for UHCI and OHCI differes a lot. TDs have different structures, there are no QHs in OHCI instead of it there are EDs that contains much more information (some of that info is in TDs in UHCI). There is no Frame List and Frame List Register instead of it there are 3 different lists of EDs for 4 transfer types with the corresponding registers.
So I think that some changes will be done in the current hardware abstraction layer. ;)

User avatar
Asper
Posts: 6
Joined: Tue Feb 01, 2011 7:23 am
Location: Kyrgyzstan, Bishkek

Re: USB

Post by Asper » Fri Feb 11, 2011 5:52 am

Sorry, I have already forgoten the structure of USB stack. :? Yesterday I looked through it again and can say that the current HAL seems to be enough to integrate OHCI.

User avatar
andymc
Posts: 560
Joined: Tue Nov 16, 2010 7:20 pm

Re: USB

Post by andymc » Fri Feb 11, 2011 12:08 pm

That's right, yes, I think the top-level USB layer should be implementation-agnostic enough, meaning you can add other host controller types. In the current version, there's even a kernelUsbOhciDriver.c file that detects them, etc. So, implementing it would mean taking that file and expanding it by adding the usbController driver functions (reset(), interrupt(), queue(), etc).

EHCI is sort of like an expanded version of UHCI. EHCI controllers typicaly expose multiple UHCI interfaces.

Post Reply