linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Kuske <jenskuske@gmail.com>
To: "Maxime Ripard" <maxime.ripard@free-electrons.com>,
	"Emilio López" <emilio@elopez.com.ar>,
	"Mike Turquette" <mturquette@linaro.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Vinod Koul" <vinod.koul@intel.com>,
	"Rob Herring" <robh+dt@kernel.org>
Cc: Jens Kuske <jenskuske@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com
Subject: [PATCH 4/6] dmaengine: sun6i: Add support for Allwinner H3 (sun8i) variant
Date: Wed,  6 May 2015 11:31:31 +0200	[thread overview]
Message-ID: <1430904693-1404-5-git-send-email-jenskuske@gmail.com> (raw)
In-Reply-To: <1430904693-1404-1-git-send-email-jenskuske@gmail.com>

The H3 SoC has the same dma engine as the A31 (sun6i), with a
reduced amount of endpoints and physical channels. Add the proper
config data and compatible string to support it.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
---
 Documentation/devicetree/bindings/dma/sun6i-dma.txt |  5 ++++-
 drivers/dma/sun6i-dma.c                             | 12 ++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
index 9cdcba24d..d13c136 100644
--- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
+++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
@@ -4,7 +4,10 @@ This driver follows the generic DMA bindings defined in dma.txt.
 
 Required properties:
 
-- compatible:	Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma"
+- compatible:	Must be one of
+		  "allwinner,sun6i-a31-dma"
+		  "allwinner,sun8i-a23-dma"
+		  "allwinner,sun8i-h3-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 11e5365..842ff97 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -891,9 +891,21 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
 	.nr_max_vchans   = 37,
 };
 
+/*
+ * The H3 has 12 physical channels, a maximum DRQ port id of 27,
+ * and a total of 34 usable source and destination endpoints.
+ */
+
+static struct sun6i_dma_config sun8i_h3_dma_cfg = {
+	.nr_max_channels = 12,
+	.nr_max_requests = 27,
+	.nr_max_vchans   = 34,
+};
+
 static const struct of_device_id sun6i_dma_match[] = {
 	{ .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg },
 	{ .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg },
+	{ .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
 	{ /* sentinel */ }
 };
 
-- 
2.3.7


  parent reply	other threads:[~2015-05-06  9:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  9:31 [PATCH 0/6] ARM: sunxi: Introduce Allwinner H3 support Jens Kuske
2015-05-06  9:31 ` [PATCH 1/6] " Jens Kuske
2015-05-06 10:04   ` Maxime Ripard
2015-05-06 10:23     ` Jens Kuske
2015-05-06 12:22       ` Maxime Ripard
2015-05-06  9:31 ` [PATCH 2/6] clk: sunxi: Add H3 clocks support Jens Kuske
2015-05-06  9:47   ` Chen-Yu Tsai
2015-05-06 10:18     ` Jens Kuske
2015-05-09 11:29       ` Maxime Ripard
2015-05-09 11:27   ` Maxime Ripard
2015-05-10 10:54     ` Jens Kuske
2015-05-12 14:44       ` Maxime Ripard
2015-05-14  5:14         ` Chen-Yu Tsai
2015-05-15 12:49           ` Maxime Ripard
2015-05-06  9:31 ` [PATCH 3/6] pinctrl: sunxi: Add H3 PIO controller support Jens Kuske
2015-05-06 10:11   ` Maxime Ripard
2015-05-06 10:34     ` Jens Kuske
2015-05-06 12:23       ` Maxime Ripard
2015-05-07  8:10   ` Paul Bolle
2015-05-09  9:17     ` Jens Kuske
2015-05-09 12:19       ` Maxime Ripard
2015-05-06  9:31 ` Jens Kuske [this message]
2015-05-06 10:13   ` [PATCH 4/6] dmaengine: sun6i: Add support for Allwinner H3 (sun8i) variant Maxime Ripard
2015-05-08  3:44     ` Vinod Koul
2015-05-08  7:19       ` Maxime Ripard
2015-05-08  9:26   ` Vinod Koul
2015-05-06  9:31 ` [PATCH 5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI Jens Kuske
2015-05-06 12:19   ` Maxime Ripard
2015-05-06 20:47     ` Jens Kuske
2015-05-09 11:44       ` Maxime Ripard
2015-05-11  8:11         ` Chen-Yu Tsai
2015-05-06  9:31 ` [PATCH 6/6] ARM: dts: sun8i: Add Orange Pi Plus support Jens Kuske
2015-05-09 15:58 ` [linux-sunxi] [PATCH 0/6] ARM: sunxi: Introduce Allwinner H3 support Hans de Goede

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=1430904693-1404-5-git-send-email-jenskuske@gmail.com \
    --to=jenskuske@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=emilio@elopez.com.ar \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@linaro.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;
as well as URLs for NNTP newsgroup(s).