linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-kernel@vger.kernel.org,
	spear-devel <spear-devel@list.st.com>,
	Vinod Koul <vinod.koul@intel.com>,
	linux-acpi@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH 2/6] dmaengine: call acpi_dma_request_slave_channel as well
Date: Wed, 27 Mar 2013 10:57:58 +0200	[thread overview]
Message-ID: <1364374682-8547-3-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1364374682-8547-1-git-send-email-andriy.shevchenko@linux.intel.com>

The slave device could be enumerated by ACPI. In that case the
dma_request_slave_channel should use the acpi_dma_request_slave_channel()
helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/dma/dmaengine.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 2cbfefe..8bbd6aa 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -62,6 +62,8 @@
 #include <linux/rculist.h>
 #include <linux/idr.h>
 #include <linux/slab.h>
+#include <linux/acpi.h>
+#include <linux/acpi_dma.h>
 #include <linux/of_dma.h>
 
 static DEFINE_MUTEX(dma_list_mutex);
@@ -561,6 +563,10 @@ struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name)
 	if (dev->of_node)
 		return of_dma_request_slave_channel(dev->of_node, name);
 
+	/* If device was enumerated by ACPI get slave info from here */
+	if (ACPI_HANDLE(dev))
+		return acpi_dma_request_slave_chan_by_name(dev, name);
+
 	return NULL;
 }
 EXPORT_SYMBOL_GPL(dma_request_slave_channel);
-- 
1.8.2.rc0.22.gb3600c3


  parent reply	other threads:[~2013-03-27  8:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27  8:57 [PATCH 0/6] dmaengine: add ACPI DMA helpers and use them in dw_dmac Andy Shevchenko
2013-03-27  8:57 ` [PATCH 1/6] dma: acpi-dma: introduce ACPI DMA helpers Andy Shevchenko
2013-03-29 20:35   ` Vinod Koul
2013-03-30  6:53     ` Mika Westerberg
2013-03-27  8:57 ` Andy Shevchenko [this message]
2013-03-27  8:57 ` [PATCH 3/6] dma: acpi-dma: parse CSRT to extract additional resources Andy Shevchenko
2013-03-29 21:33   ` Vinod Koul
2013-03-30  7:04     ` Mika Westerberg
2013-04-08 13:01     ` Andy Shevchenko
2013-03-27  8:58 ` [PATCH 4/6] dw_dmac: add ACPI support Andy Shevchenko
2013-03-27  8:58 ` [PATCH 5/6] ACPI / LPSS: return no error from register_device_clock in special cases Andy Shevchenko
2013-03-29 22:26   ` Rafael J. Wysocki
2013-03-27  8:58 ` [PATCH 6/6] ACPI / LPSS: add Lynxpoint DMA controller to the list Andy Shevchenko
2013-03-29 22:27   ` Rafael J. Wysocki

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=1364374682-8547-3-git-send-email-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@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).