> From: "Andy Chuo" <[EMAIL PROTECTED]> > Date: Mon, 29 Aug 2005 09:47:32 +0800 > > ... > > The development platform is running Linux 2.4.21-rmk2 and as far as I > understand this version (not till 2.4.23) doesn't support USB Gadget driver.
That is, it doesn't bundle support for that framework. If you hunt around a bit, you'll probably find patches for the PXA 25x UDC that run on that kernel ... even including the RNDIS support. Pengutronix, maybe? Or maybe 2.4.19-rmk7. > Therefore, in order to make my kernel to support it, should I patch the > 2.4.31 Gadget code against my kernel? Or could I just copy whatever under > drivers/usb/gadget/ from kernels (from 2.4.23 to 2.4.31) that has USB Gadget > support to my current 2.4.21.rmk2 kernel and edit the Config.in and Makefile > myself? And so I can start working on it. That should be about it. Take the latest 2.4 gadget code; important framework changes tend to get backported. There are /usr/include/usb_*.h files too. > As I know that most of the development is based on 2.6 kernels and the > driver model infrastructure is different from 2.4. So what's the 2.4 > backport actually involved? or even from 2.4.31 to my kernel 2.4.21? If there's a 2.6 driver? Minimally, ripping out the driver model stuff and replacing it with whatever nonstandard solution was in use before. (You can probably make 2.4 work with the platform_data used in 2.6, but there's probably no good way to pass that in 2.4 kernels.) In one case, also providing wrappers for the DMA functions (changed in 2.6). If there's a 2.4.later driver, I can't speculate about API changes. Ideally there weren't many, especially after 2.4.21 hatched. > There are two example codes of PCI-based USB device controller card (net2260 > and goku) I found under the /usb/gadget folder (from kernel 2.4.31). Since > the UDC I am working on is not PCI-based so what kind of device should I > create first and then bind to the gadget driver later? The 2.6 answer -- and is it _really_ true you can't work on 2.6?? -- is that SOC devices use the platform bus. Board setup code creates those devices, and passes platform_data with driver-specific information like how the code reflects wiring. For 2.4 code, drivers like that often don't have "devices" at the hardware level at all. Just in /dev or in the network interface namespace, etc. > These are the initial questions for now and I really need some help on this. > I hope someone can enlighten me and point me to the right direction thanks. The right direction involves 2.6 soonest ... :) But I hope that helps. - Dave ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel