* [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware
@ 2018-12-28 6:36 h00249924
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: h00249924 @ 2018-12-28 6:36 UTC (permalink / raw)
To: dmaengine, devicetree, linux-kernel, linux-arm-kernel
Cc: suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
Dan Williams, Vinod Koul
From: Youlin Wang <wwx575822@notesmail.huawei.com>
There is an new "hisi-pcm-asp-dma-1.0" device added in
"arch/arm64/boot/dts/hisilicon/hi3660.dtsi".
So we have to add a matching id in the driver file:
"{ .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", }"
And also hisi-pcm-asp dma device needs no setting to the clock.
So we skip this by "if" sentence on id string matching:
"if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0)"
After above this driver will support both k3 and hisi_asp dma hardware.
Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
Signed-off-by: Tanglei Han <hantanglei@huawei.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
---
drivers/dma/k3dma.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index fdec2b6..10eecc2 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -792,6 +792,7 @@ static int k3_dma_transfer_resume(struct dma_chan *chan)
static const struct of_device_id k3_pdma_dt_ids[] = {
{ .compatible = "hisilicon,k3-dma-1.0", },
+ { .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", },
{}
};
MODULE_DEVICE_TABLE(of, k3_pdma_dt_ids);
@@ -835,10 +836,12 @@ static int k3_dma_probe(struct platform_device *op)
"dma-requests", &d->dma_requests);
}
- d->clk = devm_clk_get(&op->dev, NULL);
- if (IS_ERR(d->clk)) {
- dev_err(&op->dev, "no dma clk\n");
- return PTR_ERR(d->clk);
+ if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0) {
+ d->clk = devm_clk_get(&op->dev, NULL);
+ if (IS_ERR(d->clk)) {
+ dev_err(&op->dev, "no dma clk\n");
+ return PTR_ERR(d->clk);
+ }
}
irq = platform_get_irq(op, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] dmaengine: Extend the k3dma driver binding
2018-12-28 6:36 [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware h00249924
@ 2018-12-28 6:36 ` h00249924
2019-01-02 18:00 ` John Stultz
2019-01-03 23:21 ` Rob Herring
2018-12-28 6:36 ` [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device h00249924
2019-01-04 17:24 ` [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware Vinod Koul
2 siblings, 2 replies; 8+ messages in thread
From: h00249924 @ 2018-12-28 6:36 UTC (permalink / raw)
To: dmaengine, devicetree, linux-kernel, linux-arm-kernel
Cc: suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
Vinod Koul, Rob Herring, Mark Rutland
From: Youlin Wang <wwx575822@notesmail.huawei.com>
Extend the k3dma driver binding to support hisi-asp hardware variants.
Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
Signed-off-by: Tanglei Han <hantanglei@huawei.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
---
Documentation/devicetree/bindings/dma/k3dma.txt | 33 ++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt
index 4945aea..cd21b82 100644
--- a/Documentation/devicetree/bindings/dma/k3dma.txt
+++ b/Documentation/devicetree/bindings/dma/k3dma.txt
@@ -3,7 +3,9 @@
See dma.txt first
Required properties:
-- compatible: Should be "hisilicon,k3-dma-1.0"
+- compatible: Must be one of
+- "hisilicon,k3-dma-1.0"
+- "hisilicon,hisi-pcm-asp-dma-1.0"
- reg: Should contain DMA registers location and length.
- interrupts: Should contain one interrupt shared by all channel
- #dma-cells: see dma.txt, should be 1, para number
@@ -43,3 +45,32 @@ For example, i2c0 read channel request line is 18, while write channel use 19
dma-names = "rx", "tx";
};
+
+
+
+Controller:
+ asp_dmac: asp_dmac@E804B000 {
+ compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
+ reg = <0x0 0xe804b000 0x0 0x1000>;
+ #dma-cells = <1>;
+ dma-channels = <16>;
+ dma-requests = <32>;
+ dma-min-chan = <0>;
+ dma-used-chans = <0xFFFE>;
+ dma-share;
+ interrupts = <0 216 4>;
+ interrupt-names = "asp_dma_irq";
+ status = "ok";
+ };
+
+Client:
+ i2s2: hisi_i2s {
+ compatible = "hisilicon,hisi-i2s";
+ reg = <0x0 0xe804f800 0x0 0x400>,
+ <0x0 0xe804e000 0x0 0x400>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s2_pmx_func &i2s2_cfg_func>;
+ dmas = <&asp_dmac 18 &asp_dmac 19>;
+ dma-names = "rx", "tx";
+ #sound-dai-cells = <0>;
+ };
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device
2018-12-28 6:36 [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware h00249924
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
@ 2018-12-28 6:36 ` h00249924
2019-01-04 2:44 ` Rob Herring
2019-01-04 17:24 ` [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware Vinod Koul
2 siblings, 1 reply; 8+ messages in thread
From: h00249924 @ 2018-12-28 6:36 UTC (permalink / raw)
To: dmaengine, devicetree, linux-kernel, linux-arm-kernel
Cc: suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
John Stultz, Wei Xu, Rob Herring, Mark Rutland
From: Youlin Wang <wwx575822@notesmail.huawei.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
Signed-off-by: Tanglei Han <hantanglei@huawei.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
---
arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index f432b0a..5223e36 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -1122,5 +1122,19 @@
};
};
};
+
+ asp_dmac: asp_dmac@E804B000 {
+ compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
+ reg = <0x0 0xe804b000 0x0 0x1000>;
+ #dma-cells = <1>;
+ dma-channels = <16>;
+ dma-requests = <32>;
+ dma-min-chan = <0>;
+ dma-used-chans = <0xFFFE>;
+ dma-share;
+ interrupts = <0 216 4>;
+ interrupt-names = "asp_dma_irq";
+ status = "ok";
+ };
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] dmaengine: Extend the k3dma driver binding
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
@ 2019-01-02 18:00 ` John Stultz
2019-01-03 23:21 ` Rob Herring
1 sibling, 0 replies; 8+ messages in thread
From: John Stultz @ 2019-01-02 18:00 UTC (permalink / raw)
To: h00249924
Cc: dmaengine,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, lkml,
linux-arm-kernel, Mark Rutland, wwx575822, hanxiaolong3,
Zhuangluan Su, Hantanglei, Kongfei, ninggaoyu, Vinod Koul,
Rob Herring, Liyuequan, huangli (I), wangyoulin, Qianli (A)
On Thu, Dec 27, 2018 at 10:39 PM h00249924 <hutenghui@huawei.com> wrote:
>
> From: Youlin Wang <wwx575822@notesmail.huawei.com>
>
> Extend the k3dma driver binding to support hisi-asp hardware variants.
>
> Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
> Signed-off-by: Tanglei Han <hantanglei@huawei.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> ---
> Documentation/devicetree/bindings/dma/k3dma.txt | 33 ++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt
> index 4945aea..cd21b82 100644
> --- a/Documentation/devicetree/bindings/dma/k3dma.txt
> +++ b/Documentation/devicetree/bindings/dma/k3dma.txt
> @@ -3,7 +3,9 @@
> See dma.txt first
>
> Required properties:
> -- compatible: Should be "hisilicon,k3-dma-1.0"
> +- compatible: Must be one of
> +- "hisilicon,k3-dma-1.0"
> +- "hisilicon,hisi-pcm-asp-dma-1.0"
> - reg: Should contain DMA registers location and length.
> - interrupts: Should contain one interrupt shared by all channel
> - #dma-cells: see dma.txt, should be 1, para number
> @@ -43,3 +45,32 @@ For example, i2c0 read channel request line is 18, while write channel use 19
> dma-names = "rx", "tx";
> };
>
> +
> +
> +
> +Controller:
> + asp_dmac: asp_dmac@E804B000 {
> + compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
> + reg = <0x0 0xe804b000 0x0 0x1000>;
> + #dma-cells = <1>;
> + dma-channels = <16>;
> + dma-requests = <32>;
> + dma-min-chan = <0>;
> + dma-used-chans = <0xFFFE>;
> + dma-share;
Thanks for sending this out!
So min-chan, used-chans and dma-share aren't in the existing binding
document. So they probably should be removed from this example, or the
binding document needs to be updated first.
thanks
-john
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] dmaengine: Extend the k3dma driver binding
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
2019-01-02 18:00 ` John Stultz
@ 2019-01-03 23:21 ` Rob Herring
1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-01-03 23:21 UTC (permalink / raw)
To: h00249924
Cc: dmaengine, devicetree, linux-kernel, linux-arm-kernel,
suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
Vinod Koul, Mark Rutland
On Fri, Dec 28, 2018 at 02:36:22PM +0800, h00249924 wrote:
> From: Youlin Wang <wwx575822@notesmail.huawei.com>
>
> Extend the k3dma driver binding to support hisi-asp hardware variants.
>
> Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
> Signed-off-by: Tanglei Han <hantanglei@huawei.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> ---
> Documentation/devicetree/bindings/dma/k3dma.txt | 33 ++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/k3dma.txt b/Documentation/devicetree/bindings/dma/k3dma.txt
> index 4945aea..cd21b82 100644
> --- a/Documentation/devicetree/bindings/dma/k3dma.txt
> +++ b/Documentation/devicetree/bindings/dma/k3dma.txt
> @@ -3,7 +3,9 @@
> See dma.txt first
>
> Required properties:
> -- compatible: Should be "hisilicon,k3-dma-1.0"
> +- compatible: Must be one of
> +- "hisilicon,k3-dma-1.0"
> +- "hisilicon,hisi-pcm-asp-dma-1.0"
> - reg: Should contain DMA registers location and length.
> - interrupts: Should contain one interrupt shared by all channel
> - #dma-cells: see dma.txt, should be 1, para number
> @@ -43,3 +45,32 @@ For example, i2c0 read channel request line is 18, while write channel use 19
> dma-names = "rx", "tx";
> };
>
> +
> +
> +
> +Controller:
Why is a new example needed just for a new compatible string?
> + asp_dmac: asp_dmac@E804B000 {
> + compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
> + reg = <0x0 0xe804b000 0x0 0x1000>;
> + #dma-cells = <1>;
> + dma-channels = <16>;
> + dma-requests = <32>;
> + dma-min-chan = <0>;
> + dma-used-chans = <0xFFFE>;
> + dma-share;
> + interrupts = <0 216 4>;
> + interrupt-names = "asp_dma_irq";
> + status = "ok";
> + };
> +
> +Client:
> + i2s2: hisi_i2s {
> + compatible = "hisilicon,hisi-i2s";
> + reg = <0x0 0xe804f800 0x0 0x400>,
> + <0x0 0xe804e000 0x0 0x400>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2s2_pmx_func &i2s2_cfg_func>;
> + dmas = <&asp_dmac 18 &asp_dmac 19>;
> + dma-names = "rx", "tx";
> + #sound-dai-cells = <0>;
> + };
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device
2018-12-28 6:36 ` [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device h00249924
@ 2019-01-04 2:44 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-01-04 2:44 UTC (permalink / raw)
To: h00249924
Cc: dmaengine, devicetree, linux-kernel, linux-arm-kernel,
suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
John Stultz, Wei Xu, Mark Rutland
On Fri, Dec 28, 2018 at 02:36:23PM +0800, h00249924 wrote:
> From: Youlin Wang <wwx575822@notesmail.huawei.com>
>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
> Signed-off-by: Tanglei Han <hantanglei@huawei.com>
> Cc: Wei Xu <xuwei5@hisilicon.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> ---
> arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> index f432b0a..5223e36 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
> @@ -1122,5 +1122,19 @@
> };
> };
> };
> +
> + asp_dmac: asp_dmac@E804B000 {
dma-controller@e804b000
> + compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
> + reg = <0x0 0xe804b000 0x0 0x1000>;
> + #dma-cells = <1>;
> + dma-channels = <16>;
> + dma-requests = <32>;
> + dma-min-chan = <0>;
> + dma-used-chans = <0xFFFE>;
Use lowercase hex.
But more importantly, as John mentioned, this and other properties
aren't documented.
> + dma-share;
> + interrupts = <0 216 4>;
> + interrupt-names = "asp_dma_irq";
> + status = "ok";
Don't need this.
> + };
> };
> };
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware
2018-12-28 6:36 [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware h00249924
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
2018-12-28 6:36 ` [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device h00249924
@ 2019-01-04 17:24 ` Vinod Koul
2019-01-04 17:32 ` John Stultz
2 siblings, 1 reply; 8+ messages in thread
From: Vinod Koul @ 2019-01-04 17:24 UTC (permalink / raw)
To: h00249924
Cc: dmaengine, devicetree, linux-kernel, linux-arm-kernel,
suzhuangluan, kongfei, liyuequan, cash.qianli, huangli295,
hantanglei, wangyoulin1, ninggaoyu, hanxiaolong3, Youlin Wang,
Dan Williams
On 28-12-18, 14:36, h00249924 wrote:
> From: Youlin Wang <wwx575822@notesmail.huawei.com>
>
> There is an new "hisi-pcm-asp-dma-1.0" device added in
> "arch/arm64/boot/dts/hisilicon/hi3660.dtsi".
> So we have to add a matching id in the driver file:
> "{ .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", }"
>
> And also hisi-pcm-asp dma device needs no setting to the clock.
> So we skip this by "if" sentence on id string matching:
> "if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0)"
>
> After above this driver will support both k3 and hisi_asp dma hardware.
>
> Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
> Signed-off-by: Tanglei Han <hantanglei@huawei.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> ---
> drivers/dma/k3dma.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
> index fdec2b6..10eecc2 100644
> --- a/drivers/dma/k3dma.c
> +++ b/drivers/dma/k3dma.c
> @@ -792,6 +792,7 @@ static int k3_dma_transfer_resume(struct dma_chan *chan)
>
> static const struct of_device_id k3_pdma_dt_ids[] = {
> { .compatible = "hisilicon,k3-dma-1.0", },
> + { .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", },
The binding doc patch should precede this..
> {}
> };
> MODULE_DEVICE_TABLE(of, k3_pdma_dt_ids);
> @@ -835,10 +836,12 @@ static int k3_dma_probe(struct platform_device *op)
> "dma-requests", &d->dma_requests);
> }
>
> - d->clk = devm_clk_get(&op->dev, NULL);
> - if (IS_ERR(d->clk)) {
> - dev_err(&op->dev, "no dma clk\n");
> - return PTR_ERR(d->clk);
> + if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0) {
> + d->clk = devm_clk_get(&op->dev, NULL);
who provides clk in this case? how does this scale if you have another
compatible in future for newer version of controller?
> + if (IS_ERR(d->clk)) {
> + dev_err(&op->dev, "no dma clk\n");
> + return PTR_ERR(d->clk);
> + }
> }
>
> irq = platform_get_irq(op, 0);
> --
> 1.9.1
--
~Vinod
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware
2019-01-04 17:24 ` [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware Vinod Koul
@ 2019-01-04 17:32 ` John Stultz
0 siblings, 0 replies; 8+ messages in thread
From: John Stultz @ 2019-01-04 17:32 UTC (permalink / raw)
To: Vinod Koul
Cc: h00249924,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Youlin Wang, hanxiaolong3, Zhuangluan Su, Hantanglei, lkml,
Kongfei, ninggaoyu, Liyuequan, dmaengine, Dan Williams,
huangli (I), wangyoulin, linux-arm-kernel, Qianli (A)
On Fri, Jan 4, 2019 at 9:25 AM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 28-12-18, 14:36, h00249924 wrote:
> > From: Youlin Wang <wwx575822@notesmail.huawei.com>
> >
> > There is an new "hisi-pcm-asp-dma-1.0" device added in
> > "arch/arm64/boot/dts/hisilicon/hi3660.dtsi".
> > So we have to add a matching id in the driver file:
> > "{ .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", }"
> >
> > And also hisi-pcm-asp dma device needs no setting to the clock.
> > So we skip this by "if" sentence on id string matching:
> > "if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0)"
> >
> > After above this driver will support both k3 and hisi_asp dma hardware.
> >
> > Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
> > Signed-off-by: Tanglei Han <hantanglei@huawei.com>
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Cc: Vinod Koul <vkoul@kernel.org>
> > ---
> > drivers/dma/k3dma.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
> > index fdec2b6..10eecc2 100644
> > --- a/drivers/dma/k3dma.c
> > +++ b/drivers/dma/k3dma.c
> > @@ -792,6 +792,7 @@ static int k3_dma_transfer_resume(struct dma_chan *chan)
> >
> > static const struct of_device_id k3_pdma_dt_ids[] = {
> > { .compatible = "hisilicon,k3-dma-1.0", },
> > + { .compatible = "hisilicon,hisi-pcm-asp-dma-1.0", },
>
> The binding doc patch should precede this..
>
> > {}
> > };
> > MODULE_DEVICE_TABLE(of, k3_pdma_dt_ids);
> > @@ -835,10 +836,12 @@ static int k3_dma_probe(struct platform_device *op)
> > "dma-requests", &d->dma_requests);
> > }
> >
> > - d->clk = devm_clk_get(&op->dev, NULL);
> > - if (IS_ERR(d->clk)) {
> > - dev_err(&op->dev, "no dma clk\n");
> > - return PTR_ERR(d->clk);
> > + if (strcasecmp((of_id->compatible), (k3_pdma_dt_ids[0].compatible)) == 0) {
> > + d->clk = devm_clk_get(&op->dev, NULL);
>
> who provides clk in this case? how does this scale if you have another
> compatible in future for newer version of controller?
Yea, I've pushed a few times in internal review to use match_data() here.
Tanglei Han: If its ok, I've spent some time integrating these changes
with some other pending k3dma changes. So I'll rework and integrate
some of the review feedback on this and resend it so we can get this
moving a little faster.
I'll leave the i2s feedback to you, so please continue reworking and
resubmitting those, but I'll handle upstreaming the k3dma changes
(keeping you on cc of course).
thanks
-john
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-04 17:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 6:36 [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware h00249924
2018-12-28 6:36 ` [PATCH 2/3] dmaengine: Extend the k3dma driver binding h00249924
2019-01-02 18:00 ` John Stultz
2019-01-03 23:21 ` Rob Herring
2018-12-28 6:36 ` [PATCH 3/3] arm64: dts: hi3660: Add hisi asp dma device h00249924
2019-01-04 2:44 ` Rob Herring
2019-01-04 17:24 ` [PATCH 1/3] k3dma: Upgrade k3dma drever to support hisi_asp_dma hardware Vinod Koul
2019-01-04 17:32 ` John Stultz
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).