Devicetree
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Icenowy Zheng <icenowy@aosc.xyz>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Vinod Koul <vinod.koul@intel.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
	Rob Herring <robh+dt@kernel.org>,
	dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant
Date: Mon, 27 Feb 2017 08:50:21 +0100	[thread overview]
Message-ID: <20170227075021.e7e43o54s23jzfto@lukather> (raw)
In-Reply-To: <20170225123029.55939-5-icenowy@aosc.xyz>


[-- Attachment #1.1: Type: text/plain, Size: 2576 bytes --]

On Sat, Feb 25, 2017 at 08:30:25PM +0800, Icenowy Zheng wrote:
> Allwinner V3s has a DMA engine similar to the ones from A31, but with
> fewer channels and DRQs.
> 
> Add support for it.
> 
> As it also needs the special gate bit, make the gate bit generic.

That should be part of a separate patch.

> 
> According to BSP source code, SUN8IW6 (A83T) also needs the bit, so it
> have also been specified gate_needed property.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
>  Documentation/devicetree/bindings/dma/sun6i-dma.txt |  1 +
>  drivers/dma/sun6i-dma.c                             | 17 ++++++++++++++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> index 6b267045f522..98fbe1a5c6dd 100644
> --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> @@ -9,6 +9,7 @@ Required properties:
>  		  "allwinner,sun8i-a23-dma"
>  		  "allwinner,sun8i-a83t-dma"
>  		  "allwinner,sun8i-h3-dma"
> +		  "allwinner,sun8i-v3s-dma"
>  - reg:		Should contain the registers base address and length
>  - interrupts:	Should contain a reference to the interrupt used by this device
>  - clocks:	Should contain a reference to the parent AHB clock
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index a2358780ab2c..1f38424c1b14 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -101,6 +101,7 @@ struct sun6i_dma_config {
>  	u32 nr_max_channels;
>  	u32 nr_max_requests;
>  	u32 nr_max_vchans;
> +	bool gate_needed;
>  };
>  
>  /*
> @@ -1009,12 +1010,14 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
>  	.nr_max_channels = 8,
>  	.nr_max_requests = 24,
>  	.nr_max_vchans   = 37,
> +	.gate_needed	 = true,
>  };
>  
>  static struct sun6i_dma_config sun8i_a83t_dma_cfg = {
>  	.nr_max_channels = 8,
>  	.nr_max_requests = 28,
>  	.nr_max_vchans   = 39,
> +	.gate_needed	 = true,
>  };
>  
>  /*
> @@ -1028,11 +1031,19 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
>  	.nr_max_vchans   = 34,
>  };
>  
> +static struct sun6i_dma_config sun8i_v3s_dma_cfg = {
> +	.nr_max_channels = 8,
> +	.nr_max_requests = 23,
> +	.nr_max_vchans   = 24,

This one is suspicious. There's just a single endpoint that can be
used in both directions?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2017-02-27  7:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 12:30 [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Icenowy Zheng
2017-02-25 12:30 ` [PATCH 2/9] ASoC: sun8i-codec-analog: split out linein and mic2 Icenowy Zheng
2017-02-26  6:06   ` Chen-Yu Tsai
2017-02-25 12:30 ` [PATCH 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Icenowy Zheng
2017-02-26  6:16   ` Chen-Yu Tsai
2017-02-26  7:08     ` Icenowy Zheng
2017-02-25 12:30 ` [PATCH 4/9] ASoC: sun4i-codec: Add support for V3s codec Icenowy Zheng
2017-02-25 12:30 ` [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant Icenowy Zheng
2017-02-27  7:50   ` Maxime Ripard [this message]
2017-02-27 10:48     ` Icenowy Zheng
2017-02-28 17:56       ` Maxime Ripard
2017-02-28 17:58         ` Icenowy Zheng
2017-03-01  9:32           ` Maxime Ripard
2017-02-25 12:30 ` [PATCH 6/9] ARM: dts: sun8i: restore the inclusion of ccu headers in V3s DTSI Icenowy Zheng
2017-02-25 12:30 ` [PATCH 7/9] ARM: dts: sun8i: add DMA engine " Icenowy Zheng
2017-02-25 12:30 ` [PATCH 8/9] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
2017-02-25 12:30 ` [PATCH 9/9] ARM: dts: sun8i: enable audio on Lichee Pi Zero Dock Icenowy Zheng
2017-02-27  7:49 ` [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Maxime Ripard
2017-02-28 23:02 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170227075021.e7e43o54s23jzfto@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=icenowy@aosc.xyz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vinod.koul@intel.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox