From: Mika Westerberg <mika.westerberg@intel.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.jf.intel.com>,
linux-kernel@vger.kernel.org,
spear-devel <spear-devel@list.st.com>,
Mika Westerberg <mika.westerberg@linux.jf.intel.com>
Subject: Re: [PATCH] dw_dmac: adjust slave_id accordingly to request line base
Date: Tue, 12 Feb 2013 18:43:51 +0200 [thread overview]
Message-ID: <20130212164351.GA20771@intel.com> (raw)
In-Reply-To: <20130212155334.GK3789@intel.com>
On Tue, Feb 12, 2013 at 07:53:34AM -0800, Vinod Koul wrote:
> On Tue, Jan 29, 2013 at 10:29:43AM +0530, Viresh Kumar wrote:
> > Next time, please direct these mails to my Linaro id :)
> >
> > On Mon, Jan 28, 2013 at 4:34 PM, Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On some hardware configurations we have got the request line with the offset.
> > > The patch introduces convert_slave_id() helper for that cases. The request line
> > > base is got from the platform device resources provided by the IORESOURCE_DMA
> > > type.
> >
> > @Vinod: Is IORESOURCE_DMA suitable for this purpose?
> Looks unlikely...
>
> But why do we need this in first place?
>
> I know this is due to common platform probe. Clearly one size not fitting all.
> If you had dedicated PCI probe you wouldnt worrry right?
This is all related to new ACPI 5.0 features for devices enumerated from
ACPI namespace, such as SPI controller.
ACPI 5.0 allows BIOS to specify DMA request lines and channels used by a
slave device with FixedDMA() descriptors, such as:
FixedDMA (0x0010, 0x0000, Width32bit,) // TX
FixedDMA (0x0011, 0x0001, Width32bit,) // RX
The first field (0x10, 0x11) is the request line assigned to the device. In
this particular case it is the SPI controller.
Now there is only one DMA controller in this platform but the request lines
still start from 0x10 (16).
Then there is another ACPI table called CSRT (Core System Resources Table)
that assings request line range to the DMA controller itself. This range
starts from 0x10 (16) for this platform.
So what we do is that we parse this CSRT table, create platform device for
the DMA controller of found and pass the request line range as
IORESOURCE_DMA resource with the platform device.
In this patch then Andy uses that resource to map the FixedDMA() request
line to the actual hardware request line, which is for the SPI case:
0x10 -> 0
0x11 -> 1
Unfortunately we didn't find any better way to pass this information than
IORESOURCE_DMA. However, if you have better solution we certainly can
change that :)
next prev parent reply other threads:[~2013-02-12 16:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 11:04 [PATCH] dw_dmac: adjust slave_id accordingly to request line base Andy Shevchenko
2013-01-29 4:59 ` Viresh Kumar
2013-01-29 5:22 ` Mika Westerberg
2013-01-29 15:27 ` Viresh Kumar
2013-01-30 7:32 ` Andy Shevchenko
2013-01-30 8:01 ` Viresh Kumar
2013-01-30 8:07 ` Andy Shevchenko
2013-02-07 13:22 ` Shevchenko, Andriy
2013-02-12 15:56 ` Vinod Koul
2013-02-12 16:34 ` Andy Shevchenko
2013-02-12 15:53 ` Vinod Koul
2013-02-12 16:43 ` Mika Westerberg [this message]
2013-02-12 17:34 ` Vinod Koul
2013-02-12 19:02 ` Mika Westerberg
2013-02-14 9:57 ` Vinod Koul
2013-02-14 10:17 ` Mika Westerberg
2013-02-07 13:28 ` Viresh Kumar
2013-02-19 9:02 ` Andy Shevchenko
2013-02-19 22:17 ` Rafael J. Wysocki
2013-02-20 6:04 ` Vinod Koul
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=20130212164351.GA20771@intel.com \
--to=mika.westerberg@intel.com \
--cc=andriy.shevchenko@linux.jf.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.jf.intel.com \
--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 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).