lkml.org 
[lkml]   [2010]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 1/7] DMAENGINE: add generic PrimeCell interface to COH 901 318 v6
    From
    On Wed, May 12, 2010 at 12:39 AM, Linus WALLEIJ
    <linus.walleij@stericsson.com> wrote:
    > [Dan]
    >
    >> >> +void dma_set_ambaconfig(struct dma_chan *chan,
    >> >> +                       struct amba_dma_channel_config *config)
    >> >
    >> > What happens when two primecell dma devices are present on one soc?
    >> > Can that happen?  In that case we'll have conflicting providers of
    >> > dma_set_ambaconfig().
    >> >
    >>
    >> ...the ->device_control() method is already approaching an ioctl()
    >> let's just add the argument parameter to complete the capability,
    >> i.e.:
    >>
    >> int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
    >> unsigned long arg);
    >
    > So the unsigned long arg is to match an ioctl? Okidoki...
    >
    > If it was only for in-kernel use a void* would be preferred
    > I believe since assuming unsigned long to be == bus width
    > is ... well, disturbing, since we'll be casting this into
    > a struct pointer.

    It's safe to assume that Linux does not run on any architecture where
    sizeof(unsigned long) < sizeof(void *).

    > So this should also be used for the AMBA configuration stuff
    > then, so I have to make first a patch to convert all the
    > device_control functions and then a patch on top of that to
    > implement the AMBA call as a device_control() thingie?
    >
    > (Should work out...)
    >
    > Just a bit of work, so will take some more hours :-)

    Apologies for not discovering this earlier in the review process, but
    it gets rid of the last bit of 'specialness' of the Primecell api and
    I can see it allowing other weird commands to be implemented
    generically down the road. Just let me know if you want to run any
    compile tests for you.

    > I will just have to make a proof-of-concept for the AMBA config
    > interface for Russell first, then I'll be on the ioctl-like API.

    Ok, I really appreciate your patience, I'll see what I can do to push
    this post-rc1 if things turn out that way.

    Regards,
    Dan
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-05-12 20:37    [W:4.026 / U:16.740 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site