On Thursday 13 April 2006 1:32 am, Jan Veldeman wrote: > The CY7C67300 has 2 SIE's with each 2 ports. The ports can (with some > restrictions) be configured to be either host, peripheral or OTG.
That seems to be a common design in new non-PC hardware. The host side driver may then need a lot of request scheduling code corresponding to stuff done in hardware with {E,O,U}HCI on PCs. > The structure I'll be using is 1 platform driver which controls the > hardware and shared pieces, with on top of that a host and gadget > driver. And one puzzle would be the Kconfig ... that's a lot of code to get working right (do the host side on 2.6.recent!), so I suggest you have an explicit "Driver Mode" choice saying whether the board serves in host role, peripheral role, or as an OTG device. A three-component structure seems essential; the core should manage fifos and DMA (and eventually OTG role management, in conjunction with usbcore), and two c67300_{host,gadget}.c modules to handle the host and peripheral side APIs. It might work well to have different developers working in parallel on the host and peripheral sides, for all the non-core-code. > Are there already drivers with a similar interface/structure, or will > this be the first one? There's one for Mentor's HDRC RTL as used in certain chips; that driver isn't quite ready for circulation yet. You could of course look at the evolved-part-way-from-2.4 code Mentor provided[1] but that version is especially nasty ... you'd want the one that's about 1/4 the size and actually passes most Linux 2.6 tests. - Dave [1] http://www.mentor.com/products/ip/usb/usb20otg/usb-otg-driver.cfm ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel