[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTins=SXOf_aeokFWwXX0KU1mhUBnPtbznb9xj+4v@mail.gmail.com>
Date: Thu, 30 Sep 2010 00:36:48 +0200
From: Linus Walleij <linus.ml.walleij@...il.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] DMAENGINE: define a dummy filter function for coh901318
2010/9/29 Dan Williams <dan.j.williams@...el.com>:
> On Tue, Sep 28, 2010 at 12:03 AM, Linus Walleij <linus.walleij@...ricsson.com> wrote:
>> All platform data has to be made conditional on
>> as to avoid cluttering the code with other #ifdef:s.
>>
>
> The filter id function assumes that the channel passed in is a
> coh901318 which requires that you are in a mach-u300 build and that no
> other dma driver will ever appear on this platform. Which may be
> true,
It is... I promise, the platform only has COH901318 and is not being
refined into future derivates with any multi-DMA-engine variants.
Feels a bit over-engineered to take that aspect into account.
Can't we handle it the day we have a platform available with
two or more diverse DMA controllers?
> but it would be safer to look at
> chan->device->dev->platform_data and deduce that it is indeed a
> coh901318 channel before de-referencing private fields.
I read it like you want a patch also patching the filter function to
do this check or am I misreading it?
Right now it atleast has the other theoretical upside (as compared to
having another totally different DMA block): it can support
multiple instances of COH901318:s, handling each a subset of
channels. In this case the filter function will locate the right channel
on the right instance -> elegant.
> Taken further
> if you rewrite the filter_id function in terms of platform_data then
> it could live purely in the arch code and not depend on the driver.
> ...or did you already try this route and hit a snag?
Nah can probably be done, it just feels more elegant to check
the channel ID (in this case a simple number) against the thing
that's actually registered in the driver.
It will be a bigger patch fixing a sort of different problem though,
this will just fix my problem of compiling the platform without
DMA support, which is currently not possible without a lot of
#ifdefs in the platform code.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists