linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi/pxa2xx-pci: Enable DMA binding through device name
Date: Mon, 28 Jul 2014 16:02:47 +0200	[thread overview]
Message-ID: <120751941.rzCjA94qJu@wuerfel> (raw)
In-Reply-To: <1406554444.8530.45.camel@smile.fi.intel.com>

On Monday 28 July 2014 16:34:04 Andy Shevchenko wrote:
> On Mon, 2014-07-28 at 14:47 +0200, Arnd Bergmann wrote:
> > On Monday 28 July 2014 14:06:20 Andy Shevchenko wrote:
> > static bool atmci_filter(struct dma_chan *chan, void *pdata)
> > {
> >         struct mci_platform_data *sl_pdata = pdata;
> >         struct mci_dma_data *sl;
> > 
> >         if (!sl_pdata)
> >                 return false;
> > 
> >         sl = sl_pdata->dma_slave;
> >         if (sl && find_slave_dev(sl) == chan->device->dev) {
> >                 chan->private = slave_data_ptr(sl);
> >                 return true;
> >         } else {
> >                 return false;
> >         }
> > }
> > 
> > It sets the dw_dma_slave information from  slave_data_ptr(sl) here,
> > and does not attempt to set a slave_id at all, the slave_config
> > call only sets the required fields.
> > 
> > Do you still see a problem here?
> 
> Sorry, I was talking about master defaults regarding to your patch that
> proposes to remove that part from dw_dmac. I mean it should be set in
> function mentioned early.

Ok. So atmci_filter is still correct because chan->private contains
a pointer to a structure with both request and master settings, right?

> > c) request line and masters are all configured from avr32/arm32
> >    platform data.
> > d) request line and masters are all configured from Bay Trail
> >    PCI ID (Implemented by Mika's patch)
> 
> Actually here I just recall the case when we might have different number
> of masters and use the same IP block [of SPI controller], how could you
> distinguish that case? How to provide proper masters?
> 
> It's luckily not a problem right now, but still potential one in some
> cases.

Do you mean case d? I think for each PCI ID, you will have to add the
correct settings to some table that is used in the filter function.

Are there any cases you know where we can't hardcode them?

	Arnd

  reply	other threads:[~2014-07-28 14:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 10:01 [PATCH] spi/pxa2xx-pci: Enable DMA binding through device name Kweh Hock Leong
2014-07-24 11:18 ` Andy Shevchenko
2014-07-24 11:42 ` Arnd Bergmann
2014-07-24 14:06   ` Mika Westerberg
2014-07-25  7:11     ` Mika Westerberg
2014-07-25  7:58       ` Arnd Bergmann
2014-07-25  8:22         ` Mika Westerberg
2014-07-25  8:38           ` Arnd Bergmann
2014-07-25  9:07             ` Mika Westerberg
2014-07-25  9:55               ` Mika Westerberg
2014-07-25 10:19                 ` Arnd Bergmann
2014-07-25 10:45                   ` Andy Shevchenko
2014-07-25 15:55                     ` Arnd Bergmann
2014-07-25 21:45                       ` One Thousand Gnomes
2014-07-28 11:06                       ` Andy Shevchenko
2014-07-28 11:56                         ` Shevchenko, Andriy
2014-07-28 12:47                         ` Arnd Bergmann
2014-07-28 13:34                           ` Andy Shevchenko
2014-07-28 14:02                             ` Arnd Bergmann [this message]
2014-07-28  9:28                   ` Mika Westerberg

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=120751941.rzCjA94qJu@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).