All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: viresh kumar <viresh.kumar@linaro.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org,
	spear-devel <spear-devel@list.st.com>
Subject: Re: [PATCH] dw_dmac: absence of pdata isn't critical when autocfg is set
Date: Mon, 12 Nov 2012 15:58:32 +0200	[thread overview]
Message-ID: <1352728712.11158.291.camel@smile> (raw)
In-Reply-To: <CAOh2x=m9TyMOhh=nCD0nznEBy6jN7eUddp7hLT7TnCf0xM07dA@mail.gmail.com>

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

  reply	other threads:[~2012-11-12 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 11:23 [PATCH] dw_dmac: absence of pdata isn't critical when autocfg is set Andy Shevchenko
2012-11-12 13:54 ` viresh kumar
2012-11-12 13:58   ` Andy Shevchenko [this message]
2012-11-12 14:00     ` Viresh Kumar
2012-11-12 14:03 ` viresh kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352728712.11158.291.camel@smile \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spear-devel@list.st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.