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: 9412821 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 649FC60585 for ; Fri, 4 Nov 2016 16:19:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 557C42B1C0 for ; Fri, 4 Nov 2016 16:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 496EE2B1C5; Fri, 4 Nov 2016 16:19:20 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA9962B1C0 for ; Fri, 4 Nov 2016 16:19:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2hBf-0007NN-5O; Fri, 04 Nov 2016 16:17:51 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2hBJ-00075i-1y for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2016 16:17:30 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161104_091729_390475_22145398 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, vinod.koul@intel.com, sbkim73@samsung.com, andi.shyti@samsung.com, javier@osg.samsung.com, broonie@kernel.org, kgene@kernel.org, Sylwester Nawrocki , ckeepax@opensource.wolfsonmicro.com, ym0914@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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,