From patchwork Wed May 6 09:31:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Kuske X-Patchwork-Id: 468644 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7EC911402C2 for ; Wed, 6 May 2015 19:33:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=UXCAQV3f; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbbEFJda (ORCPT ); Wed, 6 May 2015 05:33:30 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38250 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbbEFJcI (ORCPT ); Wed, 6 May 2015 05:32:08 -0400 Received: by wiun10 with SMTP id n10so15021290wiu.1; Wed, 06 May 2015 02:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XgnFA1/t4ueLKlIVuzLroQwvQZpYUwCgaelrsViLuD4=; b=UXCAQV3fqkG0y6z9za3fgIbZ7BQFGyoovIP6/F31RGi1Kghuc1KDU+UIvZ/QFFAS43 SqRqjeliYbaGN+gch1C746lKgYoy0c1prlqWmmXsVHSVlp6mk2k2mNefVbU4cZ7sn6pv hppyND+3ibmI1idFkKclUsoY4Jgxp4wT5Rl9cPFSjY06MuY0u5xmohd/9GpweMEWmItZ hppE/oUGsTk1v7FBAltFY30UvTNQvmxp4yB5muJssvRN4FbBXk3MbX7zM+XEnE77rg9U fYQmSnbA/RdkVcHEw1l0oJ8bb9RJ0W1rPsWt9wt4pNuQJ5y7d49kmk5G9lariProsvu8 2K5w== X-Received: by 10.195.11.202 with SMTP id ek10mr58808700wjd.12.1430904726999; Wed, 06 May 2015 02:32:06 -0700 (PDT) Received: from pc-jens.localdomain (p5B2E8999.dip0.t-ipconnect.de. [91.46.137.153]) by mx.google.com with ESMTPSA id 16sm1829669wjs.41.2015.05.06.02.32.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 May 2015 02:32:06 -0700 (PDT) From: Jens Kuske To: Maxime Ripard , =?UTF-8?q?Emilio=20L=C3=B3pez?= , Mike Turquette , Linus Walleij , Vinod Koul , Rob Herring Cc: Jens Kuske , Chen-Yu Tsai , 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 Message-Id: <1430904693-1404-5-git-send-email-jenskuske@gmail.com> X-Mailer: git-send-email 2.3.7 In-Reply-To: <1430904693-1404-1-git-send-email-jenskuske@gmail.com> References: <1430904693-1404-1-git-send-email-jenskuske@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Acked-by: Maxime Ripard --- 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 */ } };