From patchwork Thu Sep 15 09:26:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9333005 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 42A4F6077A for ; Thu, 15 Sep 2016 09:27:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A91D29414 for ; Thu, 15 Sep 2016 09:27:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A70429457; Thu, 15 Sep 2016 09:27:14 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham 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 2E20529414 for ; Thu, 15 Sep 2016 09:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755261AbcIOJ1K (ORCPT ); Thu, 15 Sep 2016 05:27:10 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:65172 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753427AbcIOJ1I (ORCPT ); Thu, 15 Sep 2016 05:27:08 -0400 Received: from wuerfel.localnet ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0LnBmv-1b6C2m3GhB-00hOzP; Thu, 15 Sep 2016 11:26:25 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Sam Van Den Berge , vinod.koul@intel.com, dmaengine@vger.kernel.org, k.kozlowski@samsung.com, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, kgene@kernel.org Subject: Re: [PATCH] ARM: s3c24xx: Add dma_slave_map for s3c2440 devices Date: Thu, 15 Sep 2016 11:26:22 +0200 Message-ID: <9078781.4yTPDTPaPN@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <1473877775-7537-1-git-send-email-sam.van.den.berge@telenet.be> References: <1473877775-7537-1-git-send-email-sam.van.den.berge@telenet.be> MIME-Version: 1.0 X-Provags-ID: V03:K0:rRvxKGRUjPyoLoOR6Kwbr2am6yccM60XO3G/Bfm4PhWLwvxlFjf 5Nyfl6muK7nvy9dfVozmg9gnBVPo2hm/kbe5uwonRSpDBEz5LRp3B3K8SH9SoSl0ed8gDvU O8PUf6K/75daL8VBXoOpgSuPTGTS0WKZy8zrcocoIkkH8GGry6QTg9pNziH4qh7MCaV/VFK MCzMwwvQUEheOOzxQdwaA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Sm4yxkALuCU=:Ww+rrUQ+rCDiuvrkeZdylI qQIurdKDaOdzfxhlHHeaLMvyqyLwtsLtwYkyrKYDnJJFqP1kPjlrz8WSmH4n1R0ck01eOUf8D nkXWNMFBNZdm/Ns/i6QtK5oBSfO5ZJHAYJ+85Nn5hhwGWGfPaN0zXVDC2GwYx0bKUgKsn6XiM ZKCIb634jU3qdBP2YmxQATpqfh7JRlSY8iDw9HXRurq96BZ1SJM/oy15gjDfXWM7IXJMjNyKz alSsZ4xfyMFF36uu5EAp/UM/lobBifLAVxyuHIgkV0v1vWbj7w/BDstyltrYptE/RYpCfKpNM sNloV09GKkoJKEM1GGc2VN3uUxMNzXCkyHqflN6TIYW0YNyBoSYDCzDZD6ZkX5rFSNv/bzEAj TJ/GxBmdC+fsoGKPbNd0d0wGBdh55q3pXwgCNDh2R6NMTyXHu3ukBXFi0xTMnh/cLTNrHPbtX +kdgw54lqMcfu8360QdHlRxo4KNuHQotqXY7TDPsBpA34fMOVivqHcf6m61WoJXBPQZCtjGUh 6Fi6siEQ4InxfCjNtO52cDpG1dnNLYipPE+ZeqfJvwSFNuOj3MpUvZPtYK4fbHlRcx8S01KGM URlsBiM2LoctYuA4uLRo9ZY/DH0rkVSciwDiaWmgWKKL6APCdJLmupWijhdyD5cTDRbyUVmyb OyJoU7sQbzOCt1JU/P8crogVh2NOsmICpV+yFJRiAJLP1OcKPfih30q1/GrMSXW5Qd1pj1Hvp xb5iwrc6ni7mM6pM 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 On Wednesday, September 14, 2016 8:29:35 PM CEST Sam Van Den Berge wrote: > This patch updates the s3c24xx dma driver to be able to pass a > dma_slave_map array via the platform data. This is needed to > be able to use the new, simpler dmaengine API [1]. > I used the virtual DMA channels as a parameter for the dma_filter > function. By doing that, I could reuse the existing filter function in > drivers/dma/s3c24xx-dma.c. > > I have tested this on my mini2440 board with the audio driver. > (I first applied the audio fixes from Sylwester Nawrocki [2]) > According to my observations, dma_request_slave_channel in the > function dmaengine_pcm_new in the file > sound/soc/soc-generic-dmaengine-pcm.c now returns a valid DMA channel > whereas before no DMA channel was returned at that point. > > Entries for DMACH_XD0, DMACH_XD1 and DMACH_TIMER are missing because I > don't realy know which driver to use for these. > > [1] > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/393635.html > [2] http://www.spinics.net/lists/arm-kernel/msg521918.html > > Signed-off-by: Sam Van Den Berge > Thanks for doing this, once this is merged we should be able to change all the drivers that currently use this DMA support (I think just spi, mmc and audio) over to the new dma_request_chan function. The logical follow-up after that would be to unify the slave_map with the s3c24xx_dma_channel tables, along the lines of --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c @@ -475,28 +475,14 @@ static struct resource s3c2443_dma_resource[] = { [6] = DEFINE_RES_IRQ(IRQ_S3C2443_DMA5), }; -static struct s3c24xx_dma_channel s3c2443_dma_channels[DMACH_MAX] = { +static struct dma_slave_map s3c2443_dma_channels[] = { - [DMACH_XD0] = { S3C24XX_DMA_AHB, true, 17 }, - [DMACH_XD1] = { S3C24XX_DMA_AHB, true, 18 }, - [DMACH_SDI] = { S3C24XX_DMA_APB, false, 10 }, - [DMACH_SPI0_RX] = { S3C24XX_DMA_APB, true, 1 }, - [DMACH_SPI0_TX] = { S3C24XX_DMA_APB, true, 0 }, - [DMACH_SPI1_RX] = { S3C24XX_DMA_APB, true, 3 }, - [DMACH_SPI1_TX] = { S3C24XX_DMA_APB, true, 2 }, + { "xd0", "data", S3C_DMA_SLAVE(S3C24XX_DMA_AHB, true, 17) }, + { "xd1", "data", S3C_DMA_SLAVE(S3C24XX_DMA_AHB, true, 18) }, + { "3c2440-sdi", "data", S3C_DMA_SLAVE(S3C24XX_DMA_APB, false, 10) }, + { "s3c2410-spi.0", "rx", S3C_DMA_SLAVE(S3C24XX_DMA_APB, true, 1) }, + { "s3c2410-spi.0", "tx", S3C_DMA_SLAVE(S3C24XX_DMA_APB, true, 0) }, + { "s3c2410-spi.1", "rx", S3C_DMA_SLAVE(S3C24XX_DMA_APB, true, 3) }, + { "s3c2410-spi.1", "tx", S3C_DMA_SLAVE(S3C24XX_DMA_APB, true, 2) }, ... }; static struct s3c24xx_dma_platdata s3c2443_dma_platdata = { For this patch: Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html