[EMAIL PROTECTED] wrote:
> 
> > I solved  a problem with the pci_alloc_consistent function for my
> > architecture. Now the pci_alloc_consistent function allocates uncachable
> > memory (from a region starting from b7000000 address as you can see from
> > the following debug messages pci_alloc_consistent: ).
> >
> > When I run I get a timeout:  [ ... deletia ... ]
> >
> > Could you give me any helps about this problem please?
> 
> Did you provide solutions for pci_{map,unmap}_single() too?
> As I understand, SH is like MIPS ... you should be able to
> steal a lot of code from there (that b7000000 address is much
> like what the MIPS folk use, I seem to recall).
> 
> - Dave

What kind of solutions should I support for pci_{map,unmap}_single()?

Why could  these functions give problems about timeout?

Now I have these functions:

/* Map a single buffer of the indicated size for DMA in streaming mode.
 * The 32-bit bus address to use is returned.
 *
 * Once the device is given the dma address, the device owns this memory
 * until either pci_unmap_single or pci_dma_sync_single is performed.
 */
static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void
*ptr,
                                        size_t size,int directoin)
{
  
        flush_cache_all();
        return virt_to_bus(ptr);
}

/* Unmap a single streaming mode DMA translation.  The dma_addr and size
 * must match what was provided for in a previous pci_map_single call. 
All
 * other usages are undefined.
 *
 * After this call, reads by the cpu to the buffer are guarenteed to see
 * whatever the device wrote there.
 */
static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t
dma_addr,
                                    size_t size,int direction)
{
        /* Nothing to do */
}


Thanks for your help.

Best regards

Orazio.

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to