linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add Ingenic JZ4755 DMA support
@ 2022-10-18 18:12 Siarhei Volkau
  2022-10-18 18:12 ` [PATCH v3 1/2] dt-bindings: ingenic: Add support for the JZ4755 dmaengine Siarhei Volkau
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Siarhei Volkau @ 2022-10-18 18:12 UTC (permalink / raw)
  Cc: Siarhei Volkau, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Paul Cercueil, dmaengine, devicetree, linux-kernel, linux-mips

This patch serie adds JZ4755 SoC DMA support.

Diffs from 2-nd patchset:
 - tested JZ_SOC_DATA_BREAK_LINKS flag
 - fixed commit msg in the first patch

Diffs from 1-st patchset:
 - DMA patches splitted into its own patchset
 - acks collected

Siarhei Volkau (2):
  dt-bindings: ingenic: Add support for the JZ4755 dmaengine
  dmaengine: JZ4780: Add support for the JZ4755.

 Documentation/devicetree/bindings/dma/ingenic,dma.yaml | 1 +
 drivers/dma/dma-jz4780.c                               | 8 ++++++++
 2 files changed, 9 insertions(+)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] dt-bindings: ingenic: Add support for the JZ4755 dmaengine
  2022-10-18 18:12 [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Siarhei Volkau
@ 2022-10-18 18:12 ` Siarhei Volkau
  2022-10-18 18:12 ` [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755 Siarhei Volkau
  2022-10-19 13:43 ` [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Siarhei Volkau @ 2022-10-18 18:12 UTC (permalink / raw)
  Cc: Siarhei Volkau, Krzysztof Kozlowski, Vinod Koul, Rob Herring,
	Krzysztof Kozlowski, Paul Cercueil, dmaengine, devicetree,
	linux-kernel, linux-mips

Update documentation prior to adding driver changes.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
---
 Documentation/devicetree/bindings/dma/ingenic,dma.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/dma/ingenic,dma.yaml b/Documentation/devicetree/bindings/dma/ingenic,dma.yaml
index 3b0b3b919..e42b8ce94 100644
--- a/Documentation/devicetree/bindings/dma/ingenic,dma.yaml
+++ b/Documentation/devicetree/bindings/dma/ingenic,dma.yaml
@@ -18,6 +18,7 @@ properties:
       - enum:
           - ingenic,jz4740-dma
           - ingenic,jz4725b-dma
+          - ingenic,jz4755-dma
           - ingenic,jz4760-dma
           - ingenic,jz4760-bdma
           - ingenic,jz4760-mdma
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755.
  2022-10-18 18:12 [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Siarhei Volkau
  2022-10-18 18:12 ` [PATCH v3 1/2] dt-bindings: ingenic: Add support for the JZ4755 dmaengine Siarhei Volkau
@ 2022-10-18 18:12 ` Siarhei Volkau
  2022-10-18 21:02   ` Paul Cercueil
  2022-10-19 13:43 ` [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Vinod Koul
  2 siblings, 1 reply; 5+ messages in thread
From: Siarhei Volkau @ 2022-10-18 18:12 UTC (permalink / raw)
  Cc: Siarhei Volkau, Vinod Koul, Rob Herring, Krzysztof Kozlowski,
	Paul Cercueil, dmaengine, devicetree, linux-kernel, linux-mips

The JZ4755 has 4 DMA channels per DMA unit, two idential DMA units.

The JZ4755 has the similar DMA engine to JZ4725b and it has the
same bug as JZ4725b, see commit a40c94be2336.
At least the JZ_SOC_DATA_BREAK_LINKS flag make it work much better,
although not ideal.

Tested-by: Siarhei Volkau <lis8215@gmail.com>
Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
---
 drivers/dma/dma-jz4780.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index 2a483802d..9c1a6e9a9 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -1038,6 +1038,13 @@ static const struct jz4780_dma_soc_data jz4725b_dma_soc_data = {
 		 JZ_SOC_DATA_BREAK_LINKS,
 };
 
+static const struct jz4780_dma_soc_data jz4755_dma_soc_data = {
+	.nb_channels = 4,
+	.transfer_ord_max = 5,
+	.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC |
+		 JZ_SOC_DATA_BREAK_LINKS,
+};
+
 static const struct jz4780_dma_soc_data jz4760_dma_soc_data = {
 	.nb_channels = 5,
 	.transfer_ord_max = 6,
@@ -1101,6 +1108,7 @@ static const struct jz4780_dma_soc_data x1830_dma_soc_data = {
 static const struct of_device_id jz4780_dma_dt_match[] = {
 	{ .compatible = "ingenic,jz4740-dma", .data = &jz4740_dma_soc_data },
 	{ .compatible = "ingenic,jz4725b-dma", .data = &jz4725b_dma_soc_data },
+	{ .compatible = "ingenic,jz4755-dma", .data = &jz4755_dma_soc_data },
 	{ .compatible = "ingenic,jz4760-dma", .data = &jz4760_dma_soc_data },
 	{ .compatible = "ingenic,jz4760-mdma", .data = &jz4760_mdma_soc_data },
 	{ .compatible = "ingenic,jz4760-bdma", .data = &jz4760_bdma_soc_data },
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755.
  2022-10-18 18:12 ` [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755 Siarhei Volkau
@ 2022-10-18 21:02   ` Paul Cercueil
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2022-10-18 21:02 UTC (permalink / raw)
  To: Siarhei Volkau
  Cc: Vinod Koul, Rob Herring, Krzysztof Kozlowski, dmaengine,
	devicetree, linux-kernel, linux-mips

Hi Siarhei,

Le mar., oct. 18 2022 at 21:12:19 +0300, Siarhei Volkau 
<lis8215@gmail.com> a écrit :
> The JZ4755 has 4 DMA channels per DMA unit, two idential DMA units.
> 
> The JZ4755 has the similar DMA engine to JZ4725b and it has the
> same bug as JZ4725b, see commit a40c94be2336.
> At least the JZ_SOC_DATA_BREAK_LINKS flag make it work much better,
> although not ideal.
> 
> Tested-by: Siarhei Volkau <lis8215@gmail.com>
> Signed-off-by: Siarhei Volkau <lis8215@gmail.com>

You forgot my tag that I added on your V2.

Reviewed-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
>  drivers/dma/dma-jz4780.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
> index 2a483802d..9c1a6e9a9 100644
> --- a/drivers/dma/dma-jz4780.c
> +++ b/drivers/dma/dma-jz4780.c
> @@ -1038,6 +1038,13 @@ static const struct jz4780_dma_soc_data 
> jz4725b_dma_soc_data = {
>  		 JZ_SOC_DATA_BREAK_LINKS,
>  };
> 
> +static const struct jz4780_dma_soc_data jz4755_dma_soc_data = {
> +	.nb_channels = 4,
> +	.transfer_ord_max = 5,
> +	.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC |
> +		 JZ_SOC_DATA_BREAK_LINKS,
> +};
> +
>  static const struct jz4780_dma_soc_data jz4760_dma_soc_data = {
>  	.nb_channels = 5,
>  	.transfer_ord_max = 6,
> @@ -1101,6 +1108,7 @@ static const struct jz4780_dma_soc_data 
> x1830_dma_soc_data = {
>  static const struct of_device_id jz4780_dma_dt_match[] = {
>  	{ .compatible = "ingenic,jz4740-dma", .data = &jz4740_dma_soc_data 
> },
>  	{ .compatible = "ingenic,jz4725b-dma", .data = 
> &jz4725b_dma_soc_data },
> +	{ .compatible = "ingenic,jz4755-dma", .data = &jz4755_dma_soc_data 
> },
>  	{ .compatible = "ingenic,jz4760-dma", .data = &jz4760_dma_soc_data 
> },
>  	{ .compatible = "ingenic,jz4760-mdma", .data = 
> &jz4760_mdma_soc_data },
>  	{ .compatible = "ingenic,jz4760-bdma", .data = 
> &jz4760_bdma_soc_data },
> --
> 2.36.1
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/2] Add Ingenic JZ4755 DMA support
  2022-10-18 18:12 [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Siarhei Volkau
  2022-10-18 18:12 ` [PATCH v3 1/2] dt-bindings: ingenic: Add support for the JZ4755 dmaengine Siarhei Volkau
  2022-10-18 18:12 ` [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755 Siarhei Volkau
@ 2022-10-19 13:43 ` Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2022-10-19 13:43 UTC (permalink / raw)
  To: Siarhei Volkau
  Cc: Rob Herring, Krzysztof Kozlowski, Paul Cercueil, dmaengine,
	devicetree, linux-kernel, linux-mips

On 18-10-22, 21:12, Siarhei Volkau wrote:
> This patch serie adds JZ4755 SoC DMA support.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-19 14:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 18:12 [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Siarhei Volkau
2022-10-18 18:12 ` [PATCH v3 1/2] dt-bindings: ingenic: Add support for the JZ4755 dmaengine Siarhei Volkau
2022-10-18 18:12 ` [PATCH v3 2/2] dmaengine: JZ4780: Add support for the JZ4755 Siarhei Volkau
2022-10-18 21:02   ` Paul Cercueil
2022-10-19 13:43 ` [PATCH v3 0/2] Add Ingenic JZ4755 DMA support Vinod Koul

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).