From patchwork Thu Nov 10 15:17:50 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: 9421199 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 14B3A60720 for ; Thu, 10 Nov 2016 15:18:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0793629685 for ; Thu, 10 Nov 2016 15:18:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F08942976C; Thu, 10 Nov 2016 15:18:48 +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 9F0EF2976B for ; Thu, 10 Nov 2016 15:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934008AbcKJPSr (ORCPT ); Thu, 10 Nov 2016 10:18:47 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:38537 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933884AbcKJPSq (ORCPT ); Thu, 10 Nov 2016 10:18:46 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGF02BU9MJ8X680@mailout2.samsung.com>; Fri, 11 Nov 2016 00:18:44 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-cc-58248fd4e4b1 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 30.6D.16530.4DF84285; Fri, 11 Nov 2016 00:18:44 +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 <0OGF00HZZMI40A50@mmp2.samsung.com>; Fri, 11 Nov 2016 00:18:44 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org, vinod.koul@intel.com, kgene@kernel.org Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com, ym0914@gmail.com, arnd@arndb.de, javier@osg.samsung.com, andi.shyti@samsung.com, sbkim73@samsung.com, Sylwester Nawrocki Subject: [PATCH 2/8] ARM: s3c64xx: Add DMA slave maps for PL080 devices Date: Thu, 10 Nov 2016 16:17:50 +0100 Message-id: <1478791076-19528-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478791076-19528-1-git-send-email-s.nawrocki@samsung.com> References: <1478791076-19528-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsVy+t9jQd0r/SoRBt/eSltsP/KM1eLvpGPs FlMfPmGz+DflBrvF6ql/WS3evF3DZNH/+DWzxfnzG9gtNj2+xmox4/w+JovDb9pZLS6u+MJk 8bJvP4tFz4b/rA58Hr9/TWL02DnrLrvH4j0vmTw2repk89i8pN7j5cTfbB5b+oHifVtWMXp8 3iQXwBnlZpORmpiSWqSQmpecn5KZl26rFBripmuhpJCXmJtqqxSh6xsSpKRQlphTCuQZGaAB B+cA92AlfbsEt4xZsz4wFfRIVHz9OoW1gfG0SBcjB4eEgInEkZ+CXYycQKaYxIV769m6GLk4 hARmMUqcb7jLBOH8YpSYuH8lC0gVm4ChRO/RPkYQW0TAWqLn1h2wImaBXUwS2zb3M4EkhAXc JVZtuMMMYrMIqErMWXuJDcTmFXCT2HjyDRvEOjmJk8cms4LYnED1e3dsAbOFgGp+L1vJMoGR dwEjwypGidSC5ILipPRco7zUcr3ixNzi0rx0veT83E2M4Ah6Jr2D8fAu90OMAhyMSjy8Ep0q EUKsiWXFlbmHGCU4mJVEeA/0AoV4UxIrq1KL8uOLSnNSiw8xmgIdNpFZSjQ5HxjdeSXxhibm JubGBhbmlpYmRkrivI2zn4ULCaQnlqRmp6YWpBbB9DFxcEo1MO79JP8spVn8aMTbDx8c2Qs/ Vvcqbp5z7aSfwq6b0WtsCxMapeb0Ly8oecTWdTykPDx14pJHj6cLlm1dOf3b6Z77OfzbwrOr M16cvq/FVLnr6PWVfj/VPl2N+nn4lVxRuJtFrGMJg1elydRSf664VmP/lv8hWyrMa2YJFUXc Wfeqf9O+t0kmwkosxRmJhlrMRcWJANP40XG2AgAA 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 in the tables. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski --- 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..261820a 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", &s3c64xx_dma0_info[0] }, + { "s3c6400-uart.0", "rx", &s3c64xx_dma0_info[1] }, + { "s3c6400-uart.1", "tx", &s3c64xx_dma0_info[2] }, + { "s3c6400-uart.1", "rx", &s3c64xx_dma0_info[3] }, + { "s3c6400-uart.2", "tx", &s3c64xx_dma0_info[4] }, + { "s3c6400-uart.2", "rx", &s3c64xx_dma0_info[5] }, + { "s3c6400-uart.3", "tx", &s3c64xx_dma0_info[6] }, + { "s3c6400-uart.3", "rx", &s3c64xx_dma0_info[7] }, + { "samsung-pcm.0", "tx", &s3c64xx_dma0_info[8] }, + { "samsung-pcm.0", "rx", &s3c64xx_dma0_info[9] }, + { "samsung-i2s.0", "tx", &s3c64xx_dma0_info[10] }, + { "samsung-i2s.0", "rx", &s3c64xx_dma0_info[11] }, + { "s3c6410-spi.0", "tx", &s3c64xx_dma0_info[12] }, + { "s3c6410-spi.0", "rx", &s3c64xx_dma0_info[13] }, + { "samsung-i2s.2", "tx", &s3c64xx_dma0_info[14] }, + { "samsung-i2s.2", "rx", &s3c64xx_dma0_info[15] }, +}; + 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, + .slave_map_len = 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", &s3c64xx_dma1_info[0] }, + { "samsung-pcm.1", "rx", &s3c64xx_dma1_info[1] }, + { "samsung-i2s.1", "tx", &s3c64xx_dma1_info[2] }, + { "samsung-i2s.1", "rx", &s3c64xx_dma1_info[3] }, + { "s3c6410-spi.1", "tx", &s3c64xx_dma1_info[4] }, + { "s3c6410-spi.1", "rx", &s3c64xx_dma1_info[5] }, +}; + 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, + .slave_map_len = ARRAY_SIZE(s3c64xx_dma1_slave_map), }; static AMBA_AHB_DEVICE(s3c64xx_dma1, "dma-pl080s.1", 0,