lkml.org 
[lkml]   [2011]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCHv2] DMAEngine: Define generic transfer request api
    On Thu, Sep 15, 2011 at 01:16:29PM +0530, Jassi Brar wrote:
    > +/**
    > + * struct dmaxfer_template - Template to convey DMAC the transfer pattern
    > + * and attributes.
    > + * @src_start: Bus address of source for the first chunk.
    > + * @dst_start: Bus address of destination for the first chunk.
    > + * @src_inc: If the source address increments after reading from it.
    > + * @dst_inc: If the destination address increments after writing to it.
    > + * @src_sgl: If the 'icg' of sgl[] applies to Source (scattered read).
    > + * Otherwise, source is read contiguously (icg ignored).
    > + * Ignored if src_inc is false.
    > + * @dst_sgl: If the 'icg' of sgl[] applies to Destination (scattered write).
    > + * Otherwise, destination is filled contiguously (icg ignored).
    > + * Ignored if dst_inc is false.
    > + * @frm_irq: If the client expects DMAC driver to do callback after each frame.
    > + * @numf: Number of frames in this template.
    > + * @frame_size: Number of chunks in a frame i.e, size of sgl[].
    > + * @sgl: Array of {chunk,icg} pairs that make up a frame.
    > + */
    > +struct dmaxfer_template {
    > + dma_addr_t src_start;
    > + dma_addr_t dst_start;
    > + bool src_inc;
    > + bool dst_inc;
    > + bool src_sgl;
    > + bool dst_sgl;
    > + bool frm_irq;

    I'll ask again. How does this deal with the XOR operation, where you have
    two sources and one destination? Unless you sort that out, I don't see
    how your idea of collapsing all the prepare functions can possibly work.

    --
    Russell King
    Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
    maintainer of:


    \
     
     \ /
      Last update: 2011-09-15 10:25    [W:3.971 / U:0.764 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site