lkml.org 
[lkml]   [2012]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] dw_dmac: absence of pdata isn't critical when autocfg is set
From
Date
On Mon, 2012-11-12 at 19:24 +0530, viresh kumar wrote: 
> On Mon, Nov 12, 2012 at 4:53 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
>
> > static int __devinit dw_probe(struct platform_device *pdev)
> > {
> > struct dw_dma_platform_data *pdata;
> > @@ -1604,9 +1610,6 @@ static int __devinit dw_probe(struct platform_device *pdev)
> > if (!pdata)
> > pdata = dw_dma_parse_dt(pdev);
> >
> > - if (!pdata || pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS)
> > - return -EINVAL;
> > -
> > io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > if (!io)
> > return -EINVAL;
> > @@ -1622,6 +1625,12 @@ static int __devinit dw_probe(struct platform_device *pdev)
> > dw_params = dma_read_byaddr(regs, DW_PARAMS);
> > autocfg = dw_params >> DW_PARAMS_EN & 0x1;
> >
> > + if (!pdata && autocfg)
> > + pdata = &dw_dma_pdata;
>
> Allocate it dynamically to support multiple controllers with different
> configuration
> in a SoC.

Like you did for device tree? No problem, but here is the question: what
the default values should be and where we can get them?


--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy


\
 
 \ /
  Last update: 2012-11-12 15:41    [W:0.086 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site