From patchwork Thu Nov 10 15:17:51 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: 9421245 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 29A1460484 for ; Thu, 10 Nov 2016 15:22:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FFCE292F6 for ; Thu, 10 Nov 2016 15:22:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14985295CE; Thu, 10 Nov 2016 15:22: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=-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 9F44A292F6 for ; Thu, 10 Nov 2016 15:22:47 +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 1c4r9W-0001pI-FZ; Thu, 10 Nov 2016 15:20:34 +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 1c4r8P-00086c-Do for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2016 15:19:29 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGF016S7MJQVX70@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2016 00:19:02 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-38-58248fe63120 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 6B.CC.25310.6EF84285; Fri, 11 Nov 2016 00:19:02 +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:19:02 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org, vinod.koul@intel.com, kgene@kernel.org Subject: [PATCH 3/8] spi: s3c64xx: Do not use platform_data for DMA parameters Date: Thu, 10 Nov 2016 16:17:51 +0100 Message-id: <1478791076-19528-4-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+NgFlrEIsWRmVeSWpSXmKPExsVy+t9jQd1n/SoRBnNmGVpsP/KM1eLvpGPs FlMfPmGz+DflBrvF6ql/WS3evF3DZNH/+DWzxfnzG9gtNj2+xmox4/w+JovDb9pZLS6u+MJk 8bJvP4tFz4b/rA58Hr9/TWL02DnrLrvH4j0vmTw2repk89i8pN7j5cTfbB5b+oHifVtWMXp8 3iQXwBnlZpORmpiSWqSQmpecn5KZl26rFBripmuhpJCXmJtqqxSh6xsSpKRQlphTCuQZGaAB B+cA92AlfbsEt4zjZ6oKjolWfNrRz9LA2CXUxcjJISFgItF55h07hC0mceHeejYQW0hgFqPE k2kKXYxcQPYvRomNP6eCFbEJGEr0Hu1jBLFFBKwlem7dYQIpYhbYxSSxbXM/E0hCWMBP4t+X 9WA2i4CqxM+1l8Cm8gq4Sax4u4oRYpucxMljk1lBbE4Bd4m9O7awQmx2k/i9bCXLBEbeBYwM qxglUguSC4qT0nMN81LL9YoTc4tL89L1kvNzNzGC4+eZ1A7Gg7vcDzEKcDAq8fBKdKpECLEm lhVX5h5ilOBgVhLhPdALFOJNSaysSi3Kjy8qzUktPsRoCnTYRGYp0eR8YGznlcQbmpibmBsb WJhbWpoYKYnzNs5+Fi4kkJ5YkpqdmlqQWgTTx8TBKdXAmPeiaPVRv4U1D5kmJRw62MueHJ+p Pf9hxvIXP368muN4VuH7XA+TTQtlzNdMm84SO+/QfH9Wg8z9TbW3nidOqPDtLNvovUqixWLu vxu8RrymzDcWeu0RubXDjnnZ2qAlv72e8F688WD7HKaIhL3HXNM3zT8U0t5nHKtwVuyZWUut dseT0KtpP5VYijMSDbWYi4oTAQBhLMe1AgAA X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161110_071925_893990_4D81E50F X-CRM114-Status: GOOD ( 12.88 ) 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 All related platforms use either devicetree or the DMA slave map API for mapping DMA channels to DMA slaves so we can now stop using platform_data for passing DMA details. Signed-off-by: Sylwester Nawrocki Tested-by: Andi Shyti Tested-by: Charles Keepax Acked-by: Mark Brown --- drivers/spi/spi-s3c64xx.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 3c09e94..28dfdce 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -341,27 +341,20 @@ static void s3c64xx_spi_set_cs(struct spi_device *spi, bool enable) static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) { struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi); - dma_filter_fn filter = sdd->cntrlr_info->filter; struct device *dev = &sdd->pdev->dev; - dma_cap_mask_t mask; if (is_polling(sdd)) return 0; - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - /* Acquire DMA channels */ - sdd->rx_dma.ch = dma_request_slave_channel_compat(mask, filter, - sdd->cntrlr_info->dma_rx, dev, "rx"); + sdd->rx_dma.ch = dma_request_slave_channel(dev, "rx"); if (!sdd->rx_dma.ch) { dev_err(dev, "Failed to get RX DMA channel\n"); return -EBUSY; } spi->dma_rx = sdd->rx_dma.ch; - sdd->tx_dma.ch = dma_request_slave_channel_compat(mask, filter, - sdd->cntrlr_info->dma_tx, dev, "tx"); + sdd->tx_dma.ch = dma_request_slave_channel(dev, "tx"); if (!sdd->tx_dma.ch) { dev_err(dev, "Failed to get TX DMA channel\n"); dma_release_channel(sdd->rx_dma.ch); @@ -1091,11 +1084,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) sdd->cur_bpw = 8; - if (!sdd->pdev->dev.of_node && (!sci->dma_tx || !sci->dma_rx)) { - dev_warn(&pdev->dev, "Unable to get SPI tx/rx DMA data. Switching to poll mode\n"); - sdd->port_conf->quirks = S3C64XX_SPI_QUIRK_POLL; - } - sdd->tx_dma.direction = DMA_MEM_TO_DEV; sdd->rx_dma.direction = DMA_DEV_TO_MEM; @@ -1205,9 +1193,8 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Samsung SoC SPI Driver loaded for Bus SPI-%d with %d Slaves attached\n", sdd->port_id, master->num_chipselect); - dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\tDMA=[Rx-%p, Tx-%p]\n", - mem_res, (FIFO_LVL_MASK(sdd) >> 1) + 1, - sci->dma_rx, sci->dma_tx); + dev_dbg(&pdev->dev, "\tIOmem=[%pR]\tFIFO %dbytes\n", + mem_res, (FIFO_LVL_MASK(sdd) >> 1) + 1); pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev);