* [PATCH V3 0/5] Add generic DMA DT binding support
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
Changes since V2:
- Add new filter function for DT case as suggested by Arnd
- Add xlate as static function
- Use newly added filter function in xlate.
- Add Acked-by for some of the patches
Changes since V1:
- Address the review comments by Arnd Bergmann as below
- Wording of the properties.
- Pass pdmac as third parameter to of_dma_controller_register
- Filter the dma channel based on channel number and dma_device
This patch set adds support for generic dma device tree bindings for
Samsung platforms and is dependent on the following patches from
Vinod Koul next branch
1)of: Add generic device tree DMA helpers
2)dmaengine: add helper function to request a slave DMA channel
This patch set is made based Mark Brown next branch
Padmavathi Venna (5):
DMA: PL330: Add new pl330 filter for DT case.
DMA: PL330: Add xlate function
DMA: PL330: Register the DMA controller with the generic DMA helpers
ARM: dts: Add #dma-cells for generic dma binding support
ARM: SAMSUNG: dma: Remove unnecessary code
.../devicetree/bindings/dma/arm-pl330.txt | 15 ++++-
arch/arm/boot/dts/exynos5250.dtsi | 4 +
arch/arm/mach-s3c24xx/include/mach/dma.h | 1 -
arch/arm/mach-s3c64xx/include/mach/dma.h | 1 -
arch/arm/plat-samsung/dma-ops.c | 10 +---
arch/arm/plat-samsung/include/plat/dma-ops.h | 1 -
arch/arm/plat-samsung/include/plat/dma-pl330.h | 1 -
drivers/dma/pl330.c | 64 +++++++++++++++----
8 files changed, 66 insertions(+), 31 deletions(-)
--
1.7.4.4
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 0/5] Add generic DMA DT binding support
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
Changes since V2:
- Add new filter function for DT case as suggested by Arnd
- Add xlate as static function
- Use newly added filter function in xlate.
- Add Acked-by for some of the patches
Changes since V1:
- Address the review comments by Arnd Bergmann as below
- Wording of the properties.
- Pass pdmac as third parameter to of_dma_controller_register
- Filter the dma channel based on channel number and dma_device
This patch set adds support for generic dma device tree bindings for
Samsung platforms and is dependent on the following patches from
Vinod Koul next branch
1)of: Add generic device tree DMA helpers
2)dmaengine: add helper function to request a slave DMA channel
This patch set is made based Mark Brown next branch
Padmavathi Venna (5):
DMA: PL330: Add new pl330 filter for DT case.
DMA: PL330: Add xlate function
DMA: PL330: Register the DMA controller with the generic DMA helpers
ARM: dts: Add #dma-cells for generic dma binding support
ARM: SAMSUNG: dma: Remove unnecessary code
.../devicetree/bindings/dma/arm-pl330.txt | 15 ++++-
arch/arm/boot/dts/exynos5250.dtsi | 4 +
arch/arm/mach-s3c24xx/include/mach/dma.h | 1 -
arch/arm/mach-s3c64xx/include/mach/dma.h | 1 -
arch/arm/plat-samsung/dma-ops.c | 10 +---
arch/arm/plat-samsung/include/plat/dma-ops.h | 1 -
arch/arm/plat-samsung/include/plat/dma-pl330.h | 1 -
drivers/dma/pl330.c | 64 +++++++++++++++----
8 files changed, 66 insertions(+), 31 deletions(-)
--
1.7.4.4
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case.
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 6:18 ` Padmavathi Venna
-1 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
This patch adds a new pl330_dt_filter for DT case to filter the
required channel based on the new filter params and modifies the
old filter only for non-DT case as suggested by Arnd Bergmann.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
drivers/dma/pl330.c | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 80680ee..87110f2 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -606,6 +606,11 @@ struct dma_pl330_desc {
struct dma_pl330_chan *pchan;
};
+struct dma_pl330_filter_args {
+ struct dma_pl330_dmac *pdmac;
+ unsigned int chan_id;
+};
+
static inline void _callback(struct pl330_req *r, enum pl330_op_err err)
{
if (r && r->xfer_cb)
@@ -2352,6 +2357,16 @@ static void dma_pl330_rqcb(void *token, enum pl330_op_err err)
tasklet_schedule(&pch->task);
}
+static bool pl330_dt_filter(struct dma_chan *chan, void *param)
+{
+ struct dma_pl330_filter_args *fargs = param;
+
+ if (chan->device != &fargs->pdmac->ddma)
+ return false;
+
+ return (chan->chan_id == fargs->chan_id);
+}
+
bool pl330_filter(struct dma_chan *chan, void *param)
{
u8 *peri_id;
@@ -2359,20 +2374,6 @@ bool pl330_filter(struct dma_chan *chan, void *param)
if (chan->device->dev->driver != &pl330_driver.drv)
return false;
-#ifdef CONFIG_OF
- if (chan->device->dev->of_node) {
- const __be32 *prop_value;
- phandle phandle;
- struct device_node *node;
-
- prop_value = ((struct property *)param)->value;
- phandle = be32_to_cpup(prop_value++);
- node = of_find_node_by_phandle(phandle);
- return ((chan->private == node) &&
- (chan->chan_id == be32_to_cpup(prop_value)));
- }
-#endif
-
peri_id = chan->private;
return *peri_id == (unsigned)param;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case.
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds a new pl330_dt_filter for DT case to filter the
required channel based on the new filter params and modifies the
old filter only for non-DT case as suggested by Arnd Bergmann.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
drivers/dma/pl330.c | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 80680ee..87110f2 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -606,6 +606,11 @@ struct dma_pl330_desc {
struct dma_pl330_chan *pchan;
};
+struct dma_pl330_filter_args {
+ struct dma_pl330_dmac *pdmac;
+ unsigned int chan_id;
+};
+
static inline void _callback(struct pl330_req *r, enum pl330_op_err err)
{
if (r && r->xfer_cb)
@@ -2352,6 +2357,16 @@ static void dma_pl330_rqcb(void *token, enum pl330_op_err err)
tasklet_schedule(&pch->task);
}
+static bool pl330_dt_filter(struct dma_chan *chan, void *param)
+{
+ struct dma_pl330_filter_args *fargs = param;
+
+ if (chan->device != &fargs->pdmac->ddma)
+ return false;
+
+ return (chan->chan_id == fargs->chan_id);
+}
+
bool pl330_filter(struct dma_chan *chan, void *param)
{
u8 *peri_id;
@@ -2359,20 +2374,6 @@ bool pl330_filter(struct dma_chan *chan, void *param)
if (chan->device->dev->driver != &pl330_driver.drv)
return false;
-#ifdef CONFIG_OF
- if (chan->device->dev->of_node) {
- const __be32 *prop_value;
- phandle phandle;
- struct device_node *node;
-
- prop_value = ((struct property *)param)->value;
- phandle = be32_to_cpup(prop_value++);
- node = of_find_node_by_phandle(phandle);
- return ((chan->private == node) &&
- (chan->chan_id == be32_to_cpup(prop_value)));
- }
-#endif
-
peri_id = chan->private;
return *peri_id == (unsigned)param;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 2/5] DMA: PL330: Add xlate function
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 6:18 ` Padmavathi Venna
-1 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
Add xlate to translate the device-tree binding information into
the appropriate format. The filter function requires the dma
controller device and dma channel number as filter_params.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/dma/pl330.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 87110f2..e68c83b 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -25,6 +25,7 @@
#include <linux/amba/pl330.h>
#include <linux/scatterlist.h>
#include <linux/of.h>
+#include <linux/of_dma.h>
#include "dmaengine.h"
#define PL330_MAX_CHAN 8
@@ -2379,6 +2380,30 @@ bool pl330_filter(struct dma_chan *chan, void *param)
}
EXPORT_SYMBOL(pl330_filter);
+static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec,
+ struct of_dma *ofdma)
+{
+ int count = dma_spec->args_count;
+ struct dma_pl330_dmac *pdmac = ofdma->of_dma_data;
+ struct dma_pl330_filter_args fargs;
+ dma_cap_mask_t cap;
+
+ if (!pdmac)
+ return NULL;
+
+ if (count != 1)
+ return NULL;
+
+ fargs.pdmac = pdmac;
+ fargs.chan_id = dma_spec->args[0];
+
+ dma_cap_zero(cap);
+ dma_cap_set(DMA_SLAVE, cap);
+ dma_cap_set(DMA_CYCLIC, cap);
+
+ return dma_request_channel(cap, pl330_dt_filter, &fargs);
+}
+
static int pl330_alloc_chan_resources(struct dma_chan *chan)
{
struct dma_pl330_chan *pch = to_pchan(chan);
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 2/5] DMA: PL330: Add xlate function
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
Add xlate to translate the device-tree binding information into
the appropriate format. The filter function requires the dma
controller device and dma channel number as filter_params.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/dma/pl330.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 87110f2..e68c83b 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -25,6 +25,7 @@
#include <linux/amba/pl330.h>
#include <linux/scatterlist.h>
#include <linux/of.h>
+#include <linux/of_dma.h>
#include "dmaengine.h"
#define PL330_MAX_CHAN 8
@@ -2379,6 +2380,30 @@ bool pl330_filter(struct dma_chan *chan, void *param)
}
EXPORT_SYMBOL(pl330_filter);
+static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec,
+ struct of_dma *ofdma)
+{
+ int count = dma_spec->args_count;
+ struct dma_pl330_dmac *pdmac = ofdma->of_dma_data;
+ struct dma_pl330_filter_args fargs;
+ dma_cap_mask_t cap;
+
+ if (!pdmac)
+ return NULL;
+
+ if (count != 1)
+ return NULL;
+
+ fargs.pdmac = pdmac;
+ fargs.chan_id = dma_spec->args[0];
+
+ dma_cap_zero(cap);
+ dma_cap_set(DMA_SLAVE, cap);
+ dma_cap_set(DMA_CYCLIC, cap);
+
+ return dma_request_channel(cap, pl330_dt_filter, &fargs);
+}
+
static int pl330_alloc_chan_resources(struct dma_chan *chan)
{
struct dma_pl330_chan *pch = to_pchan(chan);
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 3/5] DMA: PL330: Register the DMA controller with the generic DMA helpers
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 6:18 ` Padmavathi Venna
-1 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
This patch registers the pl330 dma controller driver with the generic
device tree dma helper functions.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/dma/pl330.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e68c83b..3fca247 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2999,6 +2999,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan,
pi->pcfg.num_peri, pi->pcfg.num_events);
+ ret = of_dma_controller_register(adev->dev.of_node,
+ of_dma_pl330_xlate, pdmac);
+ if (ret) {
+ dev_err(&adev->dev,
+ "unable to register DMA to the generic DT DMA helpers\n");
+ goto probe_err2;
+ }
+
return 0;
probe_err4:
@@ -3025,6 +3033,8 @@ static int pl330_remove(struct amba_device *adev)
if (!pdmac)
return 0;
+ of_dma_controller_free(adev->dev.of_node);
+
amba_set_drvdata(adev, NULL);
/* Idle the DMAC */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 3/5] DMA: PL330: Register the DMA controller with the generic DMA helpers
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
This patch registers the pl330 dma controller driver with the generic
device tree dma helper functions.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/dma/pl330.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e68c83b..3fca247 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2999,6 +2999,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan,
pi->pcfg.num_peri, pi->pcfg.num_events);
+ ret = of_dma_controller_register(adev->dev.of_node,
+ of_dma_pl330_xlate, pdmac);
+ if (ret) {
+ dev_err(&adev->dev,
+ "unable to register DMA to the generic DT DMA helpers\n");
+ goto probe_err2;
+ }
+
return 0;
probe_err4:
@@ -3025,6 +3033,8 @@ static int pl330_remove(struct amba_device *adev)
if (!pdmac)
return 0;
+ of_dma_controller_free(adev->dev.of_node);
+
amba_set_drvdata(adev, NULL);
/* Idle the DMAC */
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 6:18 ` Padmavathi Venna
-1 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
This patch adds #dma-cells property to PL330 DMA controller
nodes for supporting generic dma dt bindings on samsung
exynos5250 platform.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
.../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
index 36e27d5..1fdbff6 100644
--- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
+++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
@@ -8,6 +8,8 @@ Required properties:
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
+ - #dma-cells: must be <1>. used to represent the number of integer
+ cells in the dmas property of client device.
Optional properties:
- dma-coherent : Present if dma operations are coherent
@@ -18,16 +20,21 @@ Example:
compatible = "arm,pl330", "arm,primecell";
reg = <0x12680000 0x1000>;
interrupts = <99>;
+ #dma-cells = <1>;
};
Client drivers (device nodes requiring dma transfers from dev-to-mem or
-mem-to-dev) should specify the DMA channel numbers using a two-value pair
+mem-to-dev) should specify the DMA channel numbers and dma channel names
as shown below.
[property name] = <[phandle of the dma controller] [dma request id]>;
+ [property name] = <[dma channel name]>
where 'dma request id' is the dma request number which is connected
- to the client controller. The 'property name' is recommended to be
- of the form <name>-dma-channel.
+ to the client controller. The 'property name' 'dmas' and 'dma-names'
+ as required by the generic dma device tree binding helpers. The dma
+ names correspond 1:1 with the dma request ids in the dmas property.
- Example: tx-dma-channel = <&pdma0 12>;
+ Example: dmas = <&pdma0 12
+ &pdma1 11>;
+ dma-names = "tx", "rx";
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index f50b4e8..724f5bd 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -312,24 +312,28 @@
compatible = "arm,pl330", "arm,primecell";
reg = <0x121A0000 0x1000>;
interrupts = <0 34 0>;
+ #dma-cells = <1>;
};
pdma1: pdma@121B0000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x121B0000 0x1000>;
interrupts = <0 35 0>;
+ #dma-cells = <1>;
};
mdma0: mdma@10800000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x10800000 0x1000>;
interrupts = <0 33 0>;
+ #dma-cells = <1>;
};
mdma1: mdma@11C10000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x11C10000 0x1000>;
interrupts = <0 124 0>;
+ #dma-cells = <1>;
};
};
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds #dma-cells property to PL330 DMA controller
nodes for supporting generic dma dt bindings on samsung
exynos5250 platform.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
.../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
index 36e27d5..1fdbff6 100644
--- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
+++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
@@ -8,6 +8,8 @@ Required properties:
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: interrupt number to the cpu.
+ - #dma-cells: must be <1>. used to represent the number of integer
+ cells in the dmas property of client device.
Optional properties:
- dma-coherent : Present if dma operations are coherent
@@ -18,16 +20,21 @@ Example:
compatible = "arm,pl330", "arm,primecell";
reg = <0x12680000 0x1000>;
interrupts = <99>;
+ #dma-cells = <1>;
};
Client drivers (device nodes requiring dma transfers from dev-to-mem or
-mem-to-dev) should specify the DMA channel numbers using a two-value pair
+mem-to-dev) should specify the DMA channel numbers and dma channel names
as shown below.
[property name] = <[phandle of the dma controller] [dma request id]>;
+ [property name] = <[dma channel name]>
where 'dma request id' is the dma request number which is connected
- to the client controller. The 'property name' is recommended to be
- of the form <name>-dma-channel.
+ to the client controller. The 'property name' 'dmas' and 'dma-names'
+ as required by the generic dma device tree binding helpers. The dma
+ names correspond 1:1 with the dma request ids in the dmas property.
- Example: tx-dma-channel = <&pdma0 12>;
+ Example: dmas = <&pdma0 12
+ &pdma1 11>;
+ dma-names = "tx", "rx";
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index f50b4e8..724f5bd 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -312,24 +312,28 @@
compatible = "arm,pl330", "arm,primecell";
reg = <0x121A0000 0x1000>;
interrupts = <0 34 0>;
+ #dma-cells = <1>;
};
pdma1: pdma at 121B0000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x121B0000 0x1000>;
interrupts = <0 35 0>;
+ #dma-cells = <1>;
};
mdma0: mdma at 10800000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x10800000 0x1000>;
interrupts = <0 33 0>;
+ #dma-cells = <1>;
};
mdma1: mdma at 11C10000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x11C10000 0x1000>;
interrupts = <0 124 0>;
+ #dma-cells = <1>;
};
};
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 5/5] ARM: SAMSUNG: dma: Remove unnecessary code
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 6:18 ` Padmavathi Venna
-1 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-samsung-soc, devicetree-discuss, linux-arm-kernel, padma.v,
padma.kvr
Cc: sbkim73, broonie, kgene.kim, jassisinghbrar, arnd, vinod.koul,
grant.likely, jon-hunter, boojin.kim, thomas.abraham
This patch removes the usage of DMACH_DT_PROP and dt_dmach_prop
from dma code as the new generic dma dt binding support has been
added.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
arch/arm/mach-s3c24xx/include/mach/dma.h | 1 -
arch/arm/mach-s3c64xx/include/mach/dma.h | 1 -
arch/arm/plat-samsung/dma-ops.c | 10 +---------
arch/arm/plat-samsung/include/plat/dma-ops.h | 1 -
arch/arm/plat-samsung/include/plat/dma-pl330.h | 1 -
5 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h
index 6b72d5a..b55da1d 100644
--- a/arch/arm/mach-s3c24xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c24xx/include/mach/dma.h
@@ -24,7 +24,6 @@
*/
enum dma_ch {
- DMACH_DT_PROP = -1, /* not yet supported, do not use */
DMACH_XD0 = 0,
DMACH_XD1,
DMACH_SDI,
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c64xx/include/mach/dma.h
index 57b1ff4..fe1a98c 100644
--- a/arch/arm/mach-s3c64xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c64xx/include/mach/dma.h
@@ -21,7 +21,6 @@
*/
enum dma_ch {
/* DMA0/SDMA0 */
- DMACH_DT_PROP = -1, /* not yet supported, do not use */
DMACH_UART0 = 0,
DMACH_UART0_SRC2,
DMACH_UART1,
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c
index 71d58dd..ec0d731 100644
--- a/arch/arm/plat-samsung/dma-ops.c
+++ b/arch/arm/plat-samsung/dma-ops.c
@@ -23,23 +23,15 @@ static unsigned samsung_dmadev_request(enum dma_ch dma_ch,
struct device *dev, char *ch_name)
{
dma_cap_mask_t mask;
- void *filter_param;
dma_cap_zero(mask);
dma_cap_set(param->cap, mask);
- /*
- * If a dma channel property of a device node from device tree is
- * specified, use that as the fliter parameter.
- */
- filter_param = (dma_ch == DMACH_DT_PROP) ?
- (void *)param->dt_dmach_prop : (void *)dma_ch;
-
if (dev->of_node)
return (unsigned)dma_request_slave_channel(dev, ch_name);
else
return (unsigned)dma_request_channel(mask, pl330_filter,
- filter_param);
+ (void *)dma_ch);
}
static int samsung_dmadev_release(unsigned ch, void *param)
diff --git a/arch/arm/plat-samsung/include/plat/dma-ops.h b/arch/arm/plat-samsung/include/plat/dma-ops.h
index 1141782..ce6d763 100644
--- a/arch/arm/plat-samsung/include/plat/dma-ops.h
+++ b/arch/arm/plat-samsung/include/plat/dma-ops.h
@@ -18,7 +18,6 @@
struct samsung_dma_req {
enum dma_transaction_type cap;
- struct property *dt_dmach_prop;
struct s3c2410_dma_client *client;
};
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h b/arch/arm/plat-samsung/include/plat/dma-pl330.h
index d384a80..abe07fa 100644
--- a/arch/arm/plat-samsung/include/plat/dma-pl330.h
+++ b/arch/arm/plat-samsung/include/plat/dma-pl330.h
@@ -21,7 +21,6 @@
* use these just as IDs.
*/
enum dma_ch {
- DMACH_DT_PROP = -1,
DMACH_UART0_RX = 0,
DMACH_UART0_TX,
DMACH_UART1_RX,
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH V3 5/5] ARM: SAMSUNG: dma: Remove unnecessary code
@ 2013-02-06 6:18 ` Padmavathi Venna
0 siblings, 0 replies; 22+ messages in thread
From: Padmavathi Venna @ 2013-02-06 6:18 UTC (permalink / raw)
To: linux-arm-kernel
This patch removes the usage of DMACH_DT_PROP and dt_dmach_prop
from dma code as the new generic dma dt binding support has been
added.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
---
arch/arm/mach-s3c24xx/include/mach/dma.h | 1 -
arch/arm/mach-s3c64xx/include/mach/dma.h | 1 -
arch/arm/plat-samsung/dma-ops.c | 10 +---------
arch/arm/plat-samsung/include/plat/dma-ops.h | 1 -
arch/arm/plat-samsung/include/plat/dma-pl330.h | 1 -
5 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h
index 6b72d5a..b55da1d 100644
--- a/arch/arm/mach-s3c24xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c24xx/include/mach/dma.h
@@ -24,7 +24,6 @@
*/
enum dma_ch {
- DMACH_DT_PROP = -1, /* not yet supported, do not use */
DMACH_XD0 = 0,
DMACH_XD1,
DMACH_SDI,
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c64xx/include/mach/dma.h
index 57b1ff4..fe1a98c 100644
--- a/arch/arm/mach-s3c64xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c64xx/include/mach/dma.h
@@ -21,7 +21,6 @@
*/
enum dma_ch {
/* DMA0/SDMA0 */
- DMACH_DT_PROP = -1, /* not yet supported, do not use */
DMACH_UART0 = 0,
DMACH_UART0_SRC2,
DMACH_UART1,
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c
index 71d58dd..ec0d731 100644
--- a/arch/arm/plat-samsung/dma-ops.c
+++ b/arch/arm/plat-samsung/dma-ops.c
@@ -23,23 +23,15 @@ static unsigned samsung_dmadev_request(enum dma_ch dma_ch,
struct device *dev, char *ch_name)
{
dma_cap_mask_t mask;
- void *filter_param;
dma_cap_zero(mask);
dma_cap_set(param->cap, mask);
- /*
- * If a dma channel property of a device node from device tree is
- * specified, use that as the fliter parameter.
- */
- filter_param = (dma_ch == DMACH_DT_PROP) ?
- (void *)param->dt_dmach_prop : (void *)dma_ch;
-
if (dev->of_node)
return (unsigned)dma_request_slave_channel(dev, ch_name);
else
return (unsigned)dma_request_channel(mask, pl330_filter,
- filter_param);
+ (void *)dma_ch);
}
static int samsung_dmadev_release(unsigned ch, void *param)
diff --git a/arch/arm/plat-samsung/include/plat/dma-ops.h b/arch/arm/plat-samsung/include/plat/dma-ops.h
index 1141782..ce6d763 100644
--- a/arch/arm/plat-samsung/include/plat/dma-ops.h
+++ b/arch/arm/plat-samsung/include/plat/dma-ops.h
@@ -18,7 +18,6 @@
struct samsung_dma_req {
enum dma_transaction_type cap;
- struct property *dt_dmach_prop;
struct s3c2410_dma_client *client;
};
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h b/arch/arm/plat-samsung/include/plat/dma-pl330.h
index d384a80..abe07fa 100644
--- a/arch/arm/plat-samsung/include/plat/dma-pl330.h
+++ b/arch/arm/plat-samsung/include/plat/dma-pl330.h
@@ -21,7 +21,6 @@
* use these just as IDs.
*/
enum dma_ch {
- DMACH_DT_PROP = -1,
DMACH_UART0_RX = 0,
DMACH_UART0_TX,
DMACH_UART1_RX,
--
1.7.4.4
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case.
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 9:00 ` Arnd Bergmann
-1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2013-02-06 9:00 UTC (permalink / raw)
To: Padmavathi Venna
Cc: linux-samsung-soc, devicetree-discuss, linux-arm-kernel,
padma.kvr, sbkim73, broonie, kgene.kim, jassisinghbrar,
vinod.koul, grant.likely, jon-hunter, boojin.kim, thomas.abraham
On Wednesday 06 February 2013, Padmavathi Venna wrote:
>
> This patch adds a new pl330_dt_filter for DT case to filter the
> required channel based on the new filter params and modifies the
> old filter only for non-DT case as suggested by Arnd Bergmann.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case.
@ 2013-02-06 9:00 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2013-02-06 9:00 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 06 February 2013, Padmavathi Venna wrote:
>
> This patch adds a new pl330_dt_filter for DT case to filter the
> required channel based on the new filter params and modifies the
> old filter only for non-DT case as suggested by Arnd Bergmann.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH V3 5/5] ARM: SAMSUNG: dma: Remove unnecessary code
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 9:00 ` Arnd Bergmann
-1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2013-02-06 9:00 UTC (permalink / raw)
To: Padmavathi Venna
Cc: linux-samsung-soc, devicetree-discuss, linux-arm-kernel,
padma.kvr, sbkim73, broonie, kgene.kim, jassisinghbrar,
vinod.koul, grant.likely, jon-hunter, boojin.kim, thomas.abraham
On Wednesday 06 February 2013, Padmavathi Venna wrote:
>
> This patch removes the usage of DMACH_DT_PROP and dt_dmach_prop
> from dma code as the new generic dma dt binding support has been
> added.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 5/5] ARM: SAMSUNG: dma: Remove unnecessary code
@ 2013-02-06 9:00 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2013-02-06 9:00 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 06 February 2013, Padmavathi Venna wrote:
>
> This patch removes the usage of DMACH_DT_PROP and dt_dmach_prop
> from dma code as the new generic dma dt binding support has been
> added.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
2013-02-06 6:18 ` Padmavathi Venna
@ 2013-02-06 15:24 ` Rob Herring
-1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-02-06 15:24 UTC (permalink / raw)
To: Padmavathi Venna
Cc: linux-samsung-soc, devicetree-discuss, linux-arm-kernel,
padma.kvr, jassisinghbrar, kgene.kim, arnd, boojin.kim, sbkim73,
broonie, grant.likely, vinod.koul, thomas.abraham, jon-hunter
On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
> This patch adds #dma-cells property to PL330 DMA controller
> nodes for supporting generic dma dt bindings on samsung
> exynos5250 platform.
The subject doesn't reflect this is for pl330.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
> index 36e27d5..1fdbff6 100644
> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
> @@ -8,6 +8,8 @@ Required properties:
> - reg: physical base address of the controller and length of memory mapped
> region.
> - interrupts: interrupt number to the cpu.
> + - #dma-cells: must be <1>. used to represent the number of integer
> + cells in the dmas property of client device.
This should be optional in the case of platforms supporting only memory
to memory xfers.
Rob
>
> Optional properties:
> - dma-coherent : Present if dma operations are coherent
> @@ -18,16 +20,21 @@ Example:
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x12680000 0x1000>;
> interrupts = <99>;
> + #dma-cells = <1>;
> };
>
> Client drivers (device nodes requiring dma transfers from dev-to-mem or
> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
> +mem-to-dev) should specify the DMA channel numbers and dma channel names
> as shown below.
>
> [property name] = <[phandle of the dma controller] [dma request id]>;
> + [property name] = <[dma channel name]>
>
> where 'dma request id' is the dma request number which is connected
> - to the client controller. The 'property name' is recommended to be
> - of the form <name>-dma-channel.
> + to the client controller. The 'property name' 'dmas' and 'dma-names'
> + as required by the generic dma device tree binding helpers. The dma
> + names correspond 1:1 with the dma request ids in the dmas property.
>
> - Example: tx-dma-channel = <&pdma0 12>;
> + Example: dmas = <&pdma0 12
> + &pdma1 11>;
> + dma-names = "tx", "rx";
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index f50b4e8..724f5bd 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -312,24 +312,28 @@
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x121A0000 0x1000>;
> interrupts = <0 34 0>;
> + #dma-cells = <1>;
> };
>
> pdma1: pdma@121B0000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x121B0000 0x1000>;
> interrupts = <0 35 0>;
> + #dma-cells = <1>;
> };
>
> mdma0: mdma@10800000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x10800000 0x1000>;
> interrupts = <0 33 0>;
> + #dma-cells = <1>;
> };
>
> mdma1: mdma@11C10000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x11C10000 0x1000>;
> interrupts = <0 124 0>;
> + #dma-cells = <1>;
> };
> };
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
@ 2013-02-06 15:24 ` Rob Herring
0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-02-06 15:24 UTC (permalink / raw)
To: linux-arm-kernel
On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
> This patch adds #dma-cells property to PL330 DMA controller
> nodes for supporting generic dma dt bindings on samsung
> exynos5250 platform.
The subject doesn't reflect this is for pl330.
>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
> index 36e27d5..1fdbff6 100644
> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
> @@ -8,6 +8,8 @@ Required properties:
> - reg: physical base address of the controller and length of memory mapped
> region.
> - interrupts: interrupt number to the cpu.
> + - #dma-cells: must be <1>. used to represent the number of integer
> + cells in the dmas property of client device.
This should be optional in the case of platforms supporting only memory
to memory xfers.
Rob
>
> Optional properties:
> - dma-coherent : Present if dma operations are coherent
> @@ -18,16 +20,21 @@ Example:
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x12680000 0x1000>;
> interrupts = <99>;
> + #dma-cells = <1>;
> };
>
> Client drivers (device nodes requiring dma transfers from dev-to-mem or
> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
> +mem-to-dev) should specify the DMA channel numbers and dma channel names
> as shown below.
>
> [property name] = <[phandle of the dma controller] [dma request id]>;
> + [property name] = <[dma channel name]>
>
> where 'dma request id' is the dma request number which is connected
> - to the client controller. The 'property name' is recommended to be
> - of the form <name>-dma-channel.
> + to the client controller. The 'property name' 'dmas' and 'dma-names'
> + as required by the generic dma device tree binding helpers. The dma
> + names correspond 1:1 with the dma request ids in the dmas property.
>
> - Example: tx-dma-channel = <&pdma0 12>;
> + Example: dmas = <&pdma0 12
> + &pdma1 11>;
> + dma-names = "tx", "rx";
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index f50b4e8..724f5bd 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -312,24 +312,28 @@
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x121A0000 0x1000>;
> interrupts = <0 34 0>;
> + #dma-cells = <1>;
> };
>
> pdma1: pdma at 121B0000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x121B0000 0x1000>;
> interrupts = <0 35 0>;
> + #dma-cells = <1>;
> };
>
> mdma0: mdma at 10800000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x10800000 0x1000>;
> interrupts = <0 33 0>;
> + #dma-cells = <1>;
> };
>
> mdma1: mdma at 11C10000 {
> compatible = "arm,pl330", "arm,primecell";
> reg = <0x11C10000 0x1000>;
> interrupts = <0 124 0>;
> + #dma-cells = <1>;
> };
> };
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
2013-02-06 15:24 ` Rob Herring
@ 2013-02-08 4:20 ` Padma Venkat
-1 siblings, 0 replies; 22+ messages in thread
From: Padma Venkat @ 2013-02-08 4:20 UTC (permalink / raw)
To: Rob Herring
Cc: Padmavathi Venna, linux-samsung-soc, devicetree-discuss,
linux-arm-kernel, jassisinghbrar, kgene.kim, arnd, boojin.kim,
sbkim73, broonie, grant.likely, vinod.koul, thomas.abraham,
jon-hunter
Hi Rob,
On Wed, Feb 6, 2013 at 8:54 PM, Rob Herring <robherring2@gmail.com> wrote:
> On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
>> This patch adds #dma-cells property to PL330 DMA controller
>> nodes for supporting generic dma dt bindings on samsung
>> exynos5250 platform.
>
> The subject doesn't reflect this is for pl330.
OK. I will fix this.
>
>>
>> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
>> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
>> 2 files changed, 15 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> index 36e27d5..1fdbff6 100644
>> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> @@ -8,6 +8,8 @@ Required properties:
>> - reg: physical base address of the controller and length of memory mapped
>> region.
>> - interrupts: interrupt number to the cpu.
>> + - #dma-cells: must be <1>. used to represent the number of integer
>> + cells in the dmas property of client device.
>
> This should be optional in the case of platforms supporting only memory
> to memory xfers.
In Exynos we have support for both peripheral to peripheral and memory
to memory.
So I made it as required property. Should I make this as optional?
>
> Rob
>
>>
>> Optional properties:
>> - dma-coherent : Present if dma operations are coherent
>> @@ -18,16 +20,21 @@ Example:
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x12680000 0x1000>;
>> interrupts = <99>;
>> + #dma-cells = <1>;
>> };
>>
>> Client drivers (device nodes requiring dma transfers from dev-to-mem or
>> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
>> +mem-to-dev) should specify the DMA channel numbers and dma channel names
>> as shown below.
>>
>> [property name] = <[phandle of the dma controller] [dma request id]>;
>> + [property name] = <[dma channel name]>
>>
>> where 'dma request id' is the dma request number which is connected
>> - to the client controller. The 'property name' is recommended to be
>> - of the form <name>-dma-channel.
>> + to the client controller. The 'property name' 'dmas' and 'dma-names'
>> + as required by the generic dma device tree binding helpers. The dma
>> + names correspond 1:1 with the dma request ids in the dmas property.
>>
>> - Example: tx-dma-channel = <&pdma0 12>;
>> + Example: dmas = <&pdma0 12
>> + &pdma1 11>;
>> + dma-names = "tx", "rx";
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>> index f50b4e8..724f5bd 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -312,24 +312,28 @@
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x121A0000 0x1000>;
>> interrupts = <0 34 0>;
>> + #dma-cells = <1>;
>> };
>>
>> pdma1: pdma@121B0000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x121B0000 0x1000>;
>> interrupts = <0 35 0>;
>> + #dma-cells = <1>;
>> };
>>
>> mdma0: mdma@10800000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x10800000 0x1000>;
>> interrupts = <0 33 0>;
>> + #dma-cells = <1>;
>> };
>>
>> mdma1: mdma@11C10000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x11C10000 0x1000>;
>> interrupts = <0 124 0>;
>> + #dma-cells = <1>;
>> };
>> };
>>
>>
>
Thanks
Padma
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
@ 2013-02-08 4:20 ` Padma Venkat
0 siblings, 0 replies; 22+ messages in thread
From: Padma Venkat @ 2013-02-08 4:20 UTC (permalink / raw)
To: linux-arm-kernel
Hi Rob,
On Wed, Feb 6, 2013 at 8:54 PM, Rob Herring <robherring2@gmail.com> wrote:
> On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
>> This patch adds #dma-cells property to PL330 DMA controller
>> nodes for supporting generic dma dt bindings on samsung
>> exynos5250 platform.
>
> The subject doesn't reflect this is for pl330.
OK. I will fix this.
>
>>
>> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
>> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
>> 2 files changed, 15 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> index 36e27d5..1fdbff6 100644
>> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>> @@ -8,6 +8,8 @@ Required properties:
>> - reg: physical base address of the controller and length of memory mapped
>> region.
>> - interrupts: interrupt number to the cpu.
>> + - #dma-cells: must be <1>. used to represent the number of integer
>> + cells in the dmas property of client device.
>
> This should be optional in the case of platforms supporting only memory
> to memory xfers.
In Exynos we have support for both peripheral to peripheral and memory
to memory.
So I made it as required property. Should I make this as optional?
>
> Rob
>
>>
>> Optional properties:
>> - dma-coherent : Present if dma operations are coherent
>> @@ -18,16 +20,21 @@ Example:
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x12680000 0x1000>;
>> interrupts = <99>;
>> + #dma-cells = <1>;
>> };
>>
>> Client drivers (device nodes requiring dma transfers from dev-to-mem or
>> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
>> +mem-to-dev) should specify the DMA channel numbers and dma channel names
>> as shown below.
>>
>> [property name] = <[phandle of the dma controller] [dma request id]>;
>> + [property name] = <[dma channel name]>
>>
>> where 'dma request id' is the dma request number which is connected
>> - to the client controller. The 'property name' is recommended to be
>> - of the form <name>-dma-channel.
>> + to the client controller. The 'property name' 'dmas' and 'dma-names'
>> + as required by the generic dma device tree binding helpers. The dma
>> + names correspond 1:1 with the dma request ids in the dmas property.
>>
>> - Example: tx-dma-channel = <&pdma0 12>;
>> + Example: dmas = <&pdma0 12
>> + &pdma1 11>;
>> + dma-names = "tx", "rx";
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>> index f50b4e8..724f5bd 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -312,24 +312,28 @@
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x121A0000 0x1000>;
>> interrupts = <0 34 0>;
>> + #dma-cells = <1>;
>> };
>>
>> pdma1: pdma at 121B0000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x121B0000 0x1000>;
>> interrupts = <0 35 0>;
>> + #dma-cells = <1>;
>> };
>>
>> mdma0: mdma at 10800000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x10800000 0x1000>;
>> interrupts = <0 33 0>;
>> + #dma-cells = <1>;
>> };
>>
>> mdma1: mdma at 11C10000 {
>> compatible = "arm,pl330", "arm,primecell";
>> reg = <0x11C10000 0x1000>;
>> interrupts = <0 124 0>;
>> + #dma-cells = <1>;
>> };
>> };
>>
>>
>
Thanks
Padma
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
2013-02-08 4:20 ` Padma Venkat
@ 2013-02-08 13:12 ` Rob Herring
-1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-02-08 13:12 UTC (permalink / raw)
To: Padma Venkat
Cc: Padmavathi Venna, linux-samsung-soc, devicetree-discuss,
linux-arm-kernel, jassisinghbrar, kgene.kim, arnd, boojin.kim,
sbkim73, broonie, grant.likely, vinod.koul, thomas.abraham,
jon-hunter
On 02/07/2013 10:20 PM, Padma Venkat wrote:
> Hi Rob,
>
> On Wed, Feb 6, 2013 at 8:54 PM, Rob Herring <robherring2@gmail.com> wrote:
>> On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
>>> This patch adds #dma-cells property to PL330 DMA controller
>>> nodes for supporting generic dma dt bindings on samsung
>>> exynos5250 platform.
>>
>> The subject doesn't reflect this is for pl330.
> OK. I will fix this.
>>
>>>
>>> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
>>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>> ---
>>> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
>>> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
>>> 2 files changed, 15 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> index 36e27d5..1fdbff6 100644
>>> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> @@ -8,6 +8,8 @@ Required properties:
>>> - reg: physical base address of the controller and length of memory mapped
>>> region.
>>> - interrupts: interrupt number to the cpu.
>>> + - #dma-cells: must be <1>. used to represent the number of integer
>>> + cells in the dmas property of client device.
>>
>> This should be optional in the case of platforms supporting only memory
>> to memory xfers.
>
> In Exynos we have support for both peripheral to peripheral and memory
> to memory.
> So I made it as required property. Should I make this as optional?
I believe that is what I said. Highbank has the pl330 and only supports
mem to mem transfers.
Rob
>
>>
>> Rob
>>
>>>
>>> Optional properties:
>>> - dma-coherent : Present if dma operations are coherent
>>> @@ -18,16 +20,21 @@ Example:
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x12680000 0x1000>;
>>> interrupts = <99>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> Client drivers (device nodes requiring dma transfers from dev-to-mem or
>>> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
>>> +mem-to-dev) should specify the DMA channel numbers and dma channel names
>>> as shown below.
>>>
>>> [property name] = <[phandle of the dma controller] [dma request id]>;
>>> + [property name] = <[dma channel name]>
>>>
>>> where 'dma request id' is the dma request number which is connected
>>> - to the client controller. The 'property name' is recommended to be
>>> - of the form <name>-dma-channel.
>>> + to the client controller. The 'property name' 'dmas' and 'dma-names'
>>> + as required by the generic dma device tree binding helpers. The dma
>>> + names correspond 1:1 with the dma request ids in the dmas property.
>>>
>>> - Example: tx-dma-channel = <&pdma0 12>;
>>> + Example: dmas = <&pdma0 12
>>> + &pdma1 11>;
>>> + dma-names = "tx", "rx";
>>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>>> index f50b4e8..724f5bd 100644
>>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>>> @@ -312,24 +312,28 @@
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x121A0000 0x1000>;
>>> interrupts = <0 34 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> pdma1: pdma@121B0000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x121B0000 0x1000>;
>>> interrupts = <0 35 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> mdma0: mdma@10800000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x10800000 0x1000>;
>>> interrupts = <0 33 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> mdma1: mdma@11C10000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x11C10000 0x1000>;
>>> interrupts = <0 124 0>;
>>> + #dma-cells = <1>;
>>> };
>>> };
>>>
>>>
>>
>
> Thanks
> Padma
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support
@ 2013-02-08 13:12 ` Rob Herring
0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2013-02-08 13:12 UTC (permalink / raw)
To: linux-arm-kernel
On 02/07/2013 10:20 PM, Padma Venkat wrote:
> Hi Rob,
>
> On Wed, Feb 6, 2013 at 8:54 PM, Rob Herring <robherring2@gmail.com> wrote:
>> On 02/06/2013 12:18 AM, Padmavathi Venna wrote:
>>> This patch adds #dma-cells property to PL330 DMA controller
>>> nodes for supporting generic dma dt bindings on samsung
>>> exynos5250 platform.
>>
>> The subject doesn't reflect this is for pl330.
> OK. I will fix this.
>>
>>>
>>> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
>>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>> ---
>>> .../devicetree/bindings/dma/arm-pl330.txt | 15 +++++++++++----
>>> arch/arm/boot/dts/exynos5250.dtsi | 4 ++++
>>> 2 files changed, 15 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> index 36e27d5..1fdbff6 100644
>>> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
>>> @@ -8,6 +8,8 @@ Required properties:
>>> - reg: physical base address of the controller and length of memory mapped
>>> region.
>>> - interrupts: interrupt number to the cpu.
>>> + - #dma-cells: must be <1>. used to represent the number of integer
>>> + cells in the dmas property of client device.
>>
>> This should be optional in the case of platforms supporting only memory
>> to memory xfers.
>
> In Exynos we have support for both peripheral to peripheral and memory
> to memory.
> So I made it as required property. Should I make this as optional?
I believe that is what I said. Highbank has the pl330 and only supports
mem to mem transfers.
Rob
>
>>
>> Rob
>>
>>>
>>> Optional properties:
>>> - dma-coherent : Present if dma operations are coherent
>>> @@ -18,16 +20,21 @@ Example:
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x12680000 0x1000>;
>>> interrupts = <99>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> Client drivers (device nodes requiring dma transfers from dev-to-mem or
>>> -mem-to-dev) should specify the DMA channel numbers using a two-value pair
>>> +mem-to-dev) should specify the DMA channel numbers and dma channel names
>>> as shown below.
>>>
>>> [property name] = <[phandle of the dma controller] [dma request id]>;
>>> + [property name] = <[dma channel name]>
>>>
>>> where 'dma request id' is the dma request number which is connected
>>> - to the client controller. The 'property name' is recommended to be
>>> - of the form <name>-dma-channel.
>>> + to the client controller. The 'property name' 'dmas' and 'dma-names'
>>> + as required by the generic dma device tree binding helpers. The dma
>>> + names correspond 1:1 with the dma request ids in the dmas property.
>>>
>>> - Example: tx-dma-channel = <&pdma0 12>;
>>> + Example: dmas = <&pdma0 12
>>> + &pdma1 11>;
>>> + dma-names = "tx", "rx";
>>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>>> index f50b4e8..724f5bd 100644
>>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>>> @@ -312,24 +312,28 @@
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x121A0000 0x1000>;
>>> interrupts = <0 34 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> pdma1: pdma at 121B0000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x121B0000 0x1000>;
>>> interrupts = <0 35 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> mdma0: mdma at 10800000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x10800000 0x1000>;
>>> interrupts = <0 33 0>;
>>> + #dma-cells = <1>;
>>> };
>>>
>>> mdma1: mdma at 11C10000 {
>>> compatible = "arm,pl330", "arm,primecell";
>>> reg = <0x11C10000 0x1000>;
>>> interrupts = <0 124 0>;
>>> + #dma-cells = <1>;
>>> };
>>> };
>>>
>>>
>>
>
> Thanks
> Padma
>
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2013-02-08 13:12 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 6:18 [PATCH V3 0/5] Add generic DMA DT binding support Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 6:18 ` [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 9:00 ` Arnd Bergmann
2013-02-06 9:00 ` Arnd Bergmann
2013-02-06 6:18 ` [PATCH V3 2/5] DMA: PL330: Add xlate function Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 6:18 ` [PATCH V3 3/5] DMA: PL330: Register the DMA controller with the generic DMA helpers Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 6:18 ` [PATCH V3 4/5] ARM: dts: Add #dma-cells for generic dma binding support Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 15:24 ` Rob Herring
2013-02-06 15:24 ` Rob Herring
2013-02-08 4:20 ` Padma Venkat
2013-02-08 4:20 ` Padma Venkat
2013-02-08 13:12 ` Rob Herring
2013-02-08 13:12 ` Rob Herring
2013-02-06 6:18 ` [PATCH V3 5/5] ARM: SAMSUNG: dma: Remove unnecessary code Padmavathi Venna
2013-02-06 6:18 ` Padmavathi Venna
2013-02-06 9:00 ` Arnd Bergmann
2013-02-06 9:00 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.