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: 9421231 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 7BDD760512 for ; Thu, 10 Nov 2016 15:21:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7204329780 for ; Thu, 10 Nov 2016 15:21:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66EC229783; Thu, 10 Nov 2016 15:21:29 +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 CF46A29780 for ; Thu, 10 Nov 2016 15:21:28 +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 1c4r8l-0000DF-Bs; Thu, 10 Nov 2016 15:19:47 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c4r87-00080S-52 for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2016 15:19:10 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161110_071907_517416_6FC8B72B X-CRM114-Status: GOOD ( 12.63 ) 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: linux-samsung-soc@vger.kernel.org, arnd@arndb.de, sbkim73@samsung.com, andi.shyti@samsung.com, javier@osg.samsung.com, broonie@kernel.org, Sylwester Nawrocki , dmaengine@vger.kernel.org, ckeepax@opensource.wolfsonmicro.com, linux-arm-kernel@lists.infradead.org, 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 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,