Mikael Starvik wrote:
Hi,

I'm porting the host controller driver for the CRIS based SoCs from 2.4. The host controller in the SoCs is not connected to a PCI bus. Most of it is straightforward but usb/core/buffer.c makes extensive use ot pci related functions.

The "buffer.c" functions can be characterized as providing dma-coherent kmalloc() ... the relationship to PCI is just that only PCI has dma-coherent memory allocators which work with less than one page: pci_pool ~= kmem_cache_t, while dma_alloc_coherent ~= __get_free_page.

There should be no requirement to use those functions for
HCDs without PCI.  The problem is what to use instead; the
"generic" DMA infrastructure is less functional than the
PCI DMA infrastructure.

On systems where DMA is cache-coherent, HCDs can implement
those functions using kmalloc().  If it's OK to waste memory,
or just to get things started, try dma_alloc_coherent().


Is my best choice to provide my own versions of the pci_* functions (i.e. make a modified copy of drivers/pci/pool.c etc) or can I expect that the USB
framework will support non PCI host controllers in the future?

The usbcore framework will have better infrastructure for non-PCI HCDs as soon as someone contributes it! It'd be a good thing to have. But you might be able to solve this in a CRIS-specific way, and that'd also be OK (for a CRIS-specific controller).

- Dave






------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to