summaryrefslogtreecommitdiff
path: root/drivers/amba
diff options
context:
space:
mode:
authorNipun Gupta <nipun.gupta@nxp.com>2018-04-28 08:21:58 +0530
committerChristoph Hellwig <hch@lst.de>2018-05-03 16:22:18 +0200
commit07397df29e57cde5799af16e8f148ae10ed75285 (patch)
tree7f4e2606ec8d6a26a5433cb4dac32338178092fd /drivers/amba
parent892a0be43edd63e1cd228af3453a064e9e94f08e (diff)
dma-mapping: move dma configuration to bus infrastructure
ACPI/OF support for configuration of DMA is a bus specific aspect, and thus should be configured by the bus. Introduces a 'dma_configure' bus method so that busses can control their DMA capabilities. Also update the PCI, Platform, ACPI and host1x buses to use the new method. Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # PCI parts Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [hch: simplified host1x_dma_configure based on a comment from Thierry, rewrote changelog] Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/amba')
-rw-r--r--drivers/amba/bus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 4a3ac31c07d0..b1f41f7d8eeb 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -20,6 +20,7 @@
#include <linux/sizes.h>
#include <linux/limits.h>
#include <linux/clk/clk-conf.h>
+#include <linux/platform_device.h>
#include <asm/irq.h>
@@ -193,12 +194,15 @@ static const struct dev_pm_ops amba_pm = {
/*
* Primecells are part of the Advanced Microcontroller Bus Architecture,
* so we call the bus "amba".
+ * DMA configuration for platform and AMBA bus is same. So here we reuse
+ * platform's DMA config routine.
*/
struct bus_type amba_bustype = {
.name = "amba",
.dev_groups = amba_dev_groups,
.match = amba_match,
.uevent = amba_uevent,
+ .dma_configure = platform_dma_configure,
.pm = &amba_pm,
.force_dma = true,
};