Re: [PATCH 2/5] arm: davinci: Allow EVENTQ_0 as a default queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, Jul 08, 2011 at 02:25:23PM +0400, Sergei Shtylyov wrote:
> On 08-07-2011 1:33, Ido Yariv wrote:
> 
> >Davinci platforms may define a default queue for each channel
> >controller. If one is not defined, the default queue is set to EVENTQ_1.
> >However, there's no way to distinguish between an unset default queue to
> >one that is set to EVENTQ_0, as EVENTQ_0 = 0.
> 
> >In order to keep existing behaviour on platforms which don't specify a
> >default_queue member, the default_queue member was modified to be a
> >pointer to enum dma_event_q. A NULL value means that this member was not
> >specified.
> 
>    Mmm, perhaps it's better to drop the default EVENTQ_1 concept and
> explicitly initilaize that field for every SoC. It's also possible
> to offset the event queue number by 1. I don't like the pointer
> solution.

Dropping the default EVENTQ_1 is probably the best solution, but doing
so has the potential of breaking some Davinci platforms (not currently
in mainline) which don't specify this member.

The second option was also considered - modifying the dma_event_q enum,
incrementing all EVENTQ_X constants, and decrementing the value back in
map_dmach_queue. This approach has two minor drawbacks:

* There are other users of this enum, besides the default queue.
  However, AFAIK, there's only one function (map_dmach_queue) that
  actually cares about the numerical values.
* If someone currently defines a queue numerically, this code could
  break. Obviously, defining a queue numerically is not something that
  should be done.

If there aren't any objections, we could go for the first option.

Thanks for your review,
Ido.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux