From patchwork Fri Nov 4 16:14:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9412797 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 DD93B60723 for ; Fri, 4 Nov 2016 16:17:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D00D42B1C0 for ; Fri, 4 Nov 2016 16:17:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4DA32B1C5; Fri, 4 Nov 2016 16:17:13 +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 75AD72B1C2 for ; Fri, 4 Nov 2016 16:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936189AbcKDQRM (ORCPT ); Fri, 4 Nov 2016 12:17:12 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:49297 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934706AbcKDQRM (ORCPT ); Fri, 4 Nov 2016 12:17:12 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG4029TNL8HZJ50@mailout4.samsung.com>; Sat, 05 Nov 2016 01:17:10 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-ff-581cb486736e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 53.12.16530.684BC185; Sat, 5 Nov 2016 01:17:10 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG400JDIL52T940@mmp2.samsung.com>; Sat, 05 Nov 2016 01:17:10 +0900 (KST) From: Sylwester Nawrocki To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Cc: vinod.koul@intel.com, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com, ym0914@gmail.com, arnd@arndb.de, kgene@kernel.org, javier@osg.samsung.com, andi.shyti@samsung.com, sbkim73@samsung.com, Sylwester Nawrocki Subject: [PATCH RFC 2/7] ARM: S3C64XX: Add DMA slave maps for PL080 devices Date: Fri, 04 Nov 2016 17:14:49 +0100 Message-id: <1478276094-19135-4-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478276094-19135-1-git-send-email-s.nawrocki@samsung.com> References: <1478276094-19135-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRmVeSWpSXmKPExsVy+t9jQd22LTIRBtN+C1hsP/KM1eLvpGPs FlMfPmGz+DflBrvF6ql/WS3evF3DZNH/+DWzxabH11gtZpzfx2Rx+E07q8XFFV+YLF727Wex 6Nnwn9WB1+P3r0mMHjtn3WX3WLznJZPHplWdbB6bl9R7vJz4m81jSz9QvG/LKkaPz5vkAjij 3GwyUhNTUosUUvOS81My89JtlUJD3HQtlBTyEnNTbZUidH1DgpQUyhJzSoE8IwM04OAc4B6s pG+X4JZx7+UGpoJ14hUHLm9ja2C8LtzFyMkhIWAi8edXNxOELSZx4d56ti5GLg4hgVmMEpN/ tbCBJIQEfjFK3P4VAmKzCRhK9B7tYwSxRQQyJG53nmEHaWAW+MMoceBHNztIQljAW2LmvvVg U1kEVCVWXP7FCmLzCrhJbOucwAixTU7i5LHJYHFOAXeJq/tWQC1zk5j18hfLBEbeBYwMqxgl UguSC4qT0nON8lLL9YoTc4tL89L1kvNzNzGC4+aZ9A7Gw7vcDzEKcDAq8fAmTpGJEGJNLCuu zD3EKMHBrCTCW78eKMSbklhZlVqUH19UmpNafIjRFOiwicxSosn5wJjOK4k3NDE3MTc2sDC3 tDQxUhLnbZz9LFxIID2xJDU7NbUgtQimj4mDU6qBMa4gYfVM6cD1V5+eK9J6pn3CoZq/ub39 1fYD/fOtWQXcXxb51dlMmZp2rqO8/e/6spyuLYoGKT21sUl29UE1SXxTGj7YXhL5HJjocfFR 97TtcvbxG5Y8SVFitpcV4TrgsX6BrenHc7uOVdzfkKol/TP4ReKz/Z79s+esm9NgZX72Tv/7 LdumK7EUZyQaajEXFScCAKR087CxAgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds DMA slave map tables to the pl080 devices's platform_data in order to support the new channel request API. A few devices for which there was no DMA support with current code are omitted from the tables. Signed-off-by: Sylwester Nawrocki --- arch/arm/mach-s3c64xx/pl080.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/mach-s3c64xx/pl080.c b/arch/arm/mach-s3c64xx/pl080.c index 89c5a62..8c88680 100644 --- a/arch/arm/mach-s3c64xx/pl080.c +++ b/arch/arm/mach-s3c64xx/pl080.c @@ -117,6 +117,25 @@ static void pl08x_put_xfer_signal(const struct pl08x_channel_data *cd, int ch) } }; +static const struct dma_slave_map s3c64xx_dma0_slave_map[] = { + { "s3c6400-uart.0", "tx", (void *)"uart0_tx" }, + { "s3c6400-uart.0", "rx", (void *)"uart0_rx" }, + { "s3c6400-uart.1", "tx", (void *)"uart1_tx" }, + { "s3c6400-uart.1", "rx", (void *)"uart1_rx" }, + { "s3c6400-uart.2", "tx", (void *)"uart2_tx" }, + { "s3c6400-uart.2", "rx", (void *)"uart2_rx" }, + { "s3c6400-uart.3", "tx", (void *)"uart3_tx" }, + { "s3c6400-uart.3", "rx", (void *)"uart3_rx" }, + { "samsung-pcm.0", "tx", (void *)"pcm0_tx" }, + { "samsung-pcm.0", "rx", (void *)"pcm0_rx" }, + { "samsung-i2s.0", "tx", (void *)"i2s0_tx" }, + { "samsung-i2s.0", "rx", (void *)"i2s0_rx" }, + { "s3c6410-spi.0", "tx", (void *)"spi0_tx" }, + { "s3c6410-spi.0", "rx", (void *)"spi0_rx" }, + { "samsung-i2s.2", "tx", (void *)"i2s2_tx" }, + { "samsung-i2s.2", "rx", (void *)"i2s2_rx" }, +}; + struct pl08x_platform_data s3c64xx_dma0_plat_data = { .memcpy_channel = { .bus_id = "memcpy", @@ -134,6 +153,8 @@ struct pl08x_platform_data s3c64xx_dma0_plat_data = { .put_xfer_signal = pl08x_put_xfer_signal, .slave_channels = s3c64xx_dma0_info, .num_slave_channels = ARRAY_SIZE(s3c64xx_dma0_info), + .slave_map = s3c64xx_dma0_slave_map, + .slavecnt = ARRAY_SIZE(s3c64xx_dma0_slave_map), }; static AMBA_AHB_DEVICE(s3c64xx_dma0, "dma-pl080s.0", 0, @@ -207,6 +228,15 @@ static AMBA_AHB_DEVICE(s3c64xx_dma0, "dma-pl080s.0", 0, }, }; +static const struct dma_slave_map s3c64xx_dma1_slave_map[] = { + { "samsung-pcm.1", "tx", (void *)"pcm1_tx" }, + { "samsung-pcm.1", "rx", (void *)"pcm1_rx" }, + { "samsung-i2s.1", "tx", (void *)"i2s1_tx" }, + { "samsung-i2s.1", "rx", (void *)"i2s1_rx" }, + { "s3c6410-spi.1", "tx", (void *)"spi1_tx" }, + { "s3c6410-spi.1", "rx", (void *)"spi1_rx" }, +}; + struct pl08x_platform_data s3c64xx_dma1_plat_data = { .memcpy_channel = { .bus_id = "memcpy", @@ -224,6 +254,8 @@ struct pl08x_platform_data s3c64xx_dma1_plat_data = { .put_xfer_signal = pl08x_put_xfer_signal, .slave_channels = s3c64xx_dma1_info, .num_slave_channels = ARRAY_SIZE(s3c64xx_dma1_info), + .slave_map = s3c64xx_dma1_slave_map, + .slavecnt = ARRAY_SIZE(s3c64xx_dma1_slave_map), }; static AMBA_AHB_DEVICE(s3c64xx_dma1, "dma-pl080s.1", 0,