Re: [PATCH 4/8] dmaengine: ste_dma40: Do not configure channelsduring an channel allocation

From: Rabin Vincent
Date: Sun Apr 14 2013 - 12:35:40 EST


2013/4/12 Lee Jones <lee.jones@xxxxxxxxxx>:
> So I need to devise another way, as this function cannot be called
> here either. Using the dmaengine API, allocating a channel and
> configuring it are to be completed using different calls. Using the
> API correctly, there is no way the driver can setup the channel
> with all of the relevant information during allocation time.
>
> The steps are as follows:
>
> dma_request_channel() - here we only allot a channel number and
> allocate the appropriate resources for the
> channel.
>
> dma_slave_config() - this is where we're meant to configure the
> channel, so d40_config_write() needs to be
> called here, as only dma_slave_config() will
> carry the information required so as
> d40_*_cfg() can make the correct decisions.

The choice between whether a physical or a logical channel is used is
not something that is configurable via dma_slave_config(). And
d40_config_write() only needs that information, and that information is
available in dma_request_channel(). Therefore no more information
relevant to d40_config_write() will be obtained in dma_slave_config().
Hence d40_config_write() can be called in dma_request_channel().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/