aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/dma/snps-dma.txt17
-rw-r--r--drivers/dma/dw_dmac.c10
2 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt
new file mode 100644
index 000000000000..c0d85dbcada5
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/snps-dma.txt
@@ -0,0 +1,17 @@
1* Synopsys Designware DMA Controller
2
3Required properties:
4- compatible: "snps,dma-spear1340"
5- reg: Address range of the DMAC registers
6- interrupt-parent: Should be the phandle for the interrupt controller
7 that services interrupts for this device
8- interrupt: Should contain the DMAC interrupt number
9
10Example:
11
12 dma@fc000000 {
13 compatible = "snps,dma-spear1340";
14 reg = <0xfc000000 0x1000>;
15 interrupt-parent = <&vic1>;
16 interrupts = <12>;
17 };
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 300d976b6661..13b92983b241 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/of.h>
20#include <linux/mm.h> 21#include <linux/mm.h>
21#include <linux/module.h> 22#include <linux/module.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
@@ -1592,12 +1593,21 @@ static const struct dev_pm_ops dw_dev_pm_ops = {
1592 .poweroff_noirq = dw_suspend_noirq, 1593 .poweroff_noirq = dw_suspend_noirq,
1593}; 1594};
1594 1595
1596#ifdef CONFIG_OF
1597static const struct of_device_id dw_dma_id_table[] = {
1598 { .compatible = "snps,dma-spear1340" },
1599 {}
1600};
1601MODULE_DEVICE_TABLE(of, dw_dma_id_table);
1602#endif
1603
1595static struct platform_driver dw_driver = { 1604static struct platform_driver dw_driver = {
1596 .remove = __exit_p(dw_remove), 1605 .remove = __exit_p(dw_remove),
1597 .shutdown = dw_shutdown, 1606 .shutdown = dw_shutdown,
1598 .driver = { 1607 .driver = {
1599 .name = "dw_dmac", 1608 .name = "dw_dmac",
1600 .pm = &dw_dev_pm_ops, 1609 .pm = &dw_dev_pm_ops,
1610 .of_match_table = of_match_ptr(dw_dma_id_table),
1601 }, 1611 },
1602}; 1612};
1603 1613