Linux USB HC Driver Code portability
Firstly, I would want to clarify that this is not a post related to any issue with Linux kernel per se.
I am currently working on an academic project to write USB driver for a small operating system called XINU. XINU is a very light-weight, minimal and simplified operating system.
My aim is to write a USB driver for XINU.
Linux USB subsystem, as I have read, is divided into layers, the lowest layer being the Host Controller Driver (HCD) which directly talks with the Host Controller (UHCI/OHCI/EHCI ...)
So, what I was thinking was if maybe I could directly port the HCD, as is, from linux kernel to XINU, so that I will not have to concern myself with the hardware details. That is exactly what is expected from me out of the course, since with the time that I have available, it is simply not possible to write my own HCD from scratch. I know such "code reuse" (to put in nice terms) is frowned upon by the community, but I don't really have any other option.
So, can any one give me any tips as to how I can go about using any existing code (only the HCD part, which direcltly talks with the hardware) into XINU.
Thanking you all in anticipation.