From patchwork Wed Aug 30 23:36:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Br=C3=BCns?= X-Patchwork-Id: 9930995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8D536032A for ; Wed, 30 Aug 2017 23:46:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC320287E8 for ; Wed, 30 Aug 2017 23:46:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A13BF287EA; Wed, 30 Aug 2017 23:46:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 550F7287E8 for ; Wed, 30 Aug 2017 23:46:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751286AbdH3XqJ (ORCPT ); Wed, 30 Aug 2017 19:46:09 -0400 Received: from mail-out-2.itc.rwth-aachen.de ([134.130.5.47]:27139 "EHLO mail-out-2.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbdH3XqI (ORCPT ); Wed, 30 Aug 2017 19:46:08 -0400 X-IronPort-AV: E=Sophos;i="5.41,450,1498514400"; d="scan'208";a="11030977" Received: from rwthex-w2-b.rwth-ad.de ([134.130.26.159]) by mail-in-2.itc.rwth-aachen.de with ESMTP; 31 Aug 2017 01:36:19 +0200 Received: from pebbles.fritz.box (77.182.248.91) by rwthex-w2-b.rwth-ad.de (2002:8682:1a9f::8682:1a9f) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 31 Aug 2017 01:36:18 +0200 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= To: CC: , , Vinod Koul , , , Maxime Ripard , Chen-Yu Tsai , Rob Herring Subject: [PATCH 3/3] dmaengine: sun6i: Add support for Allwinner A64 Date: Thu, 31 Aug 2017 01:36:09 +0200 Message-ID: <20170830233609.13855-4-stefan.bruens@rwth-aachen.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170830233609.13855-1-stefan.bruens@rwth-aachen.de> References: <20170830233609.13855-1-stefan.bruens@rwth-aachen.de> MIME-Version: 1.0 X-Originating-IP: [77.182.248.91] X-ClientProxiedBy: rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) To rwthex-w2-b.rwth-ad.de (2002:8682:1a9f::8682:1a9f) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The A64 SoC has the same dma engine as the H3 (sun8i), with a reduced amount of physical channels. Add the proper config data and compatible string to support it. Signed-off-by: Stefan BrĂ¼ns --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++++ drivers/dma/sun6i-dma.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index f96287d3043a..b86019238b77 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -494,6 +494,8 @@ interrupts = ; clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; resets = <&ccu RST_BUS_SPI0>; @@ -509,6 +511,8 @@ interrupts = ; clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>; clock-names = "ahb", "mod"; + dmas = <&dma 24>, <&dma 24>; + dma-names = "rx", "tx"; pinctrl-names = "default"; pinctrl-0 = <&spi1_pins>; resets = <&ccu RST_BUS_SPI1>; diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 5f4eee4513e5..6a17c5d63582 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c @@ -1068,6 +1068,12 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = { .nr_max_vchans = 34, .dmac_variant = DMAC_VARIANT_H3, }; + +static struct sun6i_dma_config sun50i_a64_dma_cfg = { + .nr_max_channels = 8, + .nr_max_requests = 27, + .nr_max_vchans = 38, + .dmac_variant = DMAC_VARIANT_H3, }; static const struct of_device_id sun6i_dma_match[] = { @@ -1075,6 +1081,7 @@ static const struct of_device_id sun6i_dma_match[] = { { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg }, { .compatible = "allwinner,sun8i-a83t-dma", .data = &sun8i_a83t_dma_cfg }, { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg }, + { .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun6i_dma_match);