ARM: SAMSUNG: Make dma request compatible to generic dma bindings.
This patch make the dma dev request operation compatible for both DT and non-DT cases. It takes the all the arguments required for dma_request_slave_channel and dma_request_channel. If the driver is initiated via DT or non-DT the corresponding call will be made. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Родитель
40476f6189
Коммит
e7ba5f1d0f
|
@ -19,7 +19,8 @@
|
|||
#include <mach/dma.h>
|
||||
|
||||
static unsigned samsung_dmadev_request(enum dma_ch dma_ch,
|
||||
struct samsung_dma_req *param)
|
||||
struct samsung_dma_req *param,
|
||||
struct device *dev, char *ch_name)
|
||||
{
|
||||
dma_cap_mask_t mask;
|
||||
void *filter_param;
|
||||
|
@ -33,7 +34,12 @@ static unsigned samsung_dmadev_request(enum dma_ch dma_ch,
|
|||
*/
|
||||
filter_param = (dma_ch == DMACH_DT_PROP) ?
|
||||
(void *)param->dt_dmach_prop : (void *)dma_ch;
|
||||
return (unsigned)dma_request_channel(mask, pl330_filter, filter_param);
|
||||
|
||||
if (dev->of_node)
|
||||
return (unsigned)dma_request_slave_channel(dev, ch_name);
|
||||
else
|
||||
return (unsigned)dma_request_channel(mask, pl330_filter,
|
||||
filter_param);
|
||||
}
|
||||
|
||||
static int samsung_dmadev_release(unsigned ch, void *param)
|
||||
|
|
|
@ -39,7 +39,8 @@ struct samsung_dma_config {
|
|||
};
|
||||
|
||||
struct samsung_dma_ops {
|
||||
unsigned (*request)(enum dma_ch ch, struct samsung_dma_req *param);
|
||||
unsigned (*request)(enum dma_ch ch, struct samsung_dma_req *param,
|
||||
struct device *dev, char *ch_name);
|
||||
int (*release)(unsigned ch, void *param);
|
||||
int (*config)(unsigned ch, struct samsung_dma_config *param);
|
||||
int (*prepare)(unsigned ch, struct samsung_dma_prep *param);
|
||||
|
|
|
@ -36,7 +36,8 @@ static void s3c_dma_cb(struct s3c2410_dma_chan *channel, void *param,
|
|||
}
|
||||
|
||||
static unsigned s3c_dma_request(enum dma_ch dma_ch,
|
||||
struct samsung_dma_req *param)
|
||||
struct samsung_dma_req *param,
|
||||
struct device *dev, char *ch_name)
|
||||
{
|
||||
struct cb_data *data;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче