From patchwork Tue Jan 24 09:27:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92304 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1624088qgi; Tue, 24 Jan 2017 01:28:01 -0800 (PST) X-Received: by 10.84.140.133 with SMTP id 5mr49172148plt.178.1485250081557; Tue, 24 Jan 2017 01:28:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si18461620plj.322.2017.01.24.01.28.01; Tue, 24 Jan 2017 01:28:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750766AbdAXJ17 (ORCPT + 4 others); Tue, 24 Jan 2017 04:27:59 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:52359 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbdAXJ1z (ORCPT ); Tue, 24 Jan 2017 04:27:55 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKA00B3D2AGCA80@mailout3.w1.samsung.com>; Tue, 24 Jan 2017 09:27:52 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170124092751eucas1p19db0699e907b1747c104d63ea069be92~cqxIZl5OP1386413864eucas1p1C; Tue, 24 Jan 2017 09:27:51 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 20.F4.16908.91E17885; Tue, 24 Jan 2017 09:27:53 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170124092750eucas1p1127947314c9ad7eed297c1b6739110cb~cqxHw852g1384113841eucas1p18; Tue, 24 Jan 2017 09:27:50 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-9c-58871e19f311 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5E.06.06687.45E17885; Tue, 24 Jan 2017 09:28:52 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OKA00L222A11G70@eusync1.samsung.com>; Tue, 24 Jan 2017 09:27:50 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Vinod Koul , Ulf Hansson , "Rafael J. Wysocki" , Inki Dae Subject: [PATCH v6 1/4] dmaengine: pl330: remove pdata based initialization Date: Tue, 24 Jan 2017 10:27:32 +0100 Message-id: <1485250055-22137-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485250055-22137-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsWy7djPc7qScu0RBq3fdCw2zljParF66l9W i0n3J7BYnD+/gd1i0+NrrBafe48wWsw4v4/JYu2Ru+wWZ05fYrU4vjbc4mXffhYHbo/Fe14y eWxa1cnmcefaHjaPzUvqPbZcbWfx6NuyitHj8ya5APYoLpuU1JzMst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ITMJToetvF BmKLCDQxShz85QFSxCywnEliy/QL7CAJYQFviXl/roPZLAKqEjvWzQdr4BXwkJgz4zArxDo5 iZPHJoPZnAKeElufNzGC2EJANWuWHGSbwMi7gJFhFaNIamlxbnpusaFecWJucWleul5yfu4m RmAMbDv2c/MOxksbgw8xCnAwKvHwnpBpixBiTSwrrsw9xCjBwawkwvtFvD1CiDclsbIqtSg/ vqg0J7X4EKMp0FETmaVEk/OB8ZlXEm9oYmhuaWhkbGFhbmSkJM5b8uFKuJBAemJJanZqakFq EUwfEwenVAPjghmM712OZ/HHtB7luLo/ZsqZs9PlZdun93lxcYjMkmb7FvP8f+zLDL6VIa5l 094+51R+MqXO5UcQD/dSVat9EgnPbbxazAsNZffdvGZ061ron7+7vvClz/vcPdl8XYDFXK5D s2zsUu13Njc5X1i2naH+3VqeF8I5PmE/ti/mEG2XNt/8TH6JEktxRqKhFnNRcSIAT+ClJpcC AAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170124092750eucas1p1127947314c9ad7eed297c1b6739110cb X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170124092750eucas1p1127947314c9ad7eed297c1b6739110cb X-RootMTR: 20170124092750eucas1p1127947314c9ad7eed297c1b6739110cb References: <1485250055-22137-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This driver is now used only on platforms which support device tree, so it is safe to remove legacy platform data based initialization code. Signed-off-by: Marek Szyprowski Acked-by: Arnd Bergmann For plat-samsung: Acked-by: Krzysztof Kozlowski --- arch/arm/plat-samsung/devs.c | 1 - drivers/dma/pl330.c | 42 ++++++++---------------------------------- include/linux/amba/pl330.h | 35 ----------------------------------- 3 files changed, 8 insertions(+), 70 deletions(-) delete mode 100644 include/linux/amba/pl330.h -- 1.9.1 -- 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 diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 03fac123676d..dc269d9143bc 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -10,7 +10,6 @@ * published by the Free Software Foundation. */ -#include #include #include #include diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7539f73df9e0..78be12b45a45 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -2076,18 +2075,6 @@ static void pl330_tasklet(unsigned long data) } } -bool pl330_filter(struct dma_chan *chan, void *param) -{ - u8 *peri_id; - - if (chan->device->dev->driver != &pl330_driver.drv) - return false; - - peri_id = chan->private; - return *peri_id == (unsigned long)param; -} -EXPORT_SYMBOL(pl330_filter); - static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec, struct of_dma *ofdma) { @@ -2832,7 +2819,6 @@ static int __maybe_unused pl330_resume(struct device *dev) static int pl330_probe(struct amba_device *adev, const struct amba_id *id) { - struct dma_pl330_platdata *pdat; struct pl330_config *pcfg; struct pl330_dmac *pl330; struct dma_pl330_chan *pch, *_p; @@ -2842,8 +2828,6 @@ static int __maybe_unused pl330_resume(struct device *dev) int num_chan; struct device_node *np = adev->dev.of_node; - pdat = dev_get_platdata(&adev->dev); - ret = dma_set_mask_and_coherent(&adev->dev, DMA_BIT_MASK(32)); if (ret) return ret; @@ -2856,7 +2840,7 @@ static int __maybe_unused pl330_resume(struct device *dev) pd = &pl330->ddma; pd->dev = &adev->dev; - pl330->mcbufsz = pdat ? pdat->mcbuf_sz : 0; + pl330->mcbufsz = 0; /* get quirk */ for (i = 0; i < ARRAY_SIZE(of_quirks); i++) @@ -2900,10 +2884,7 @@ static int __maybe_unused pl330_resume(struct device *dev) INIT_LIST_HEAD(&pd->channels); /* Initialize channel parameters */ - if (pdat) - num_chan = max_t(int, pdat->nr_valid_peri, pcfg->num_chan); - else - num_chan = max_t(int, pcfg->num_peri, pcfg->num_chan); + num_chan = max_t(int, pcfg->num_peri, pcfg->num_chan); pl330->num_peripherals = num_chan; @@ -2915,11 +2896,8 @@ static int __maybe_unused pl330_resume(struct device *dev) for (i = 0; i < num_chan; i++) { pch = &pl330->peripherals[i]; - if (!adev->dev.of_node) - pch->chan.private = pdat ? &pdat->peri_id[i] : NULL; - else - pch->chan.private = adev->dev.of_node; + pch->chan.private = adev->dev.of_node; INIT_LIST_HEAD(&pch->submitted_list); INIT_LIST_HEAD(&pch->work_list); INIT_LIST_HEAD(&pch->completed_list); @@ -2932,15 +2910,11 @@ static int __maybe_unused pl330_resume(struct device *dev) list_add_tail(&pch->chan.device_node, &pd->channels); } - if (pdat) { - pd->cap_mask = pdat->cap_mask; - } else { - dma_cap_set(DMA_MEMCPY, pd->cap_mask); - if (pcfg->num_peri) { - dma_cap_set(DMA_SLAVE, pd->cap_mask); - dma_cap_set(DMA_CYCLIC, pd->cap_mask); - dma_cap_set(DMA_PRIVATE, pd->cap_mask); - } + dma_cap_set(DMA_MEMCPY, pd->cap_mask); + if (pcfg->num_peri) { + dma_cap_set(DMA_SLAVE, pd->cap_mask); + dma_cap_set(DMA_CYCLIC, pd->cap_mask); + dma_cap_set(DMA_PRIVATE, pd->cap_mask); } pd->device_alloc_chan_resources = pl330_alloc_chan_resources; diff --git a/include/linux/amba/pl330.h b/include/linux/amba/pl330.h deleted file mode 100644 index fe93758e8403..000000000000 --- a/include/linux/amba/pl330.h +++ /dev/null @@ -1,35 +0,0 @@ -/* linux/include/linux/amba/pl330.h - * - * Copyright (C) 2010 Samsung Electronics Co. Ltd. - * Jaswinder Singh - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#ifndef __AMBA_PL330_H_ -#define __AMBA_PL330_H_ - -#include - -struct dma_pl330_platdata { - /* - * Number of valid peripherals connected to DMAC. - * This may be different from the value read from - * CR0, as the PL330 implementation might have 'holes' - * in the peri list or the peri could also be reached - * from another DMAC which the platform prefers. - */ - u8 nr_valid_peri; - /* Array of valid peripherals */ - u8 *peri_id; - /* Operational capabilities */ - dma_cap_mask_t cap_mask; - /* Bytes to allocate for MC buffer */ - unsigned mcbuf_sz; -}; - -extern bool pl330_filter(struct dma_chan *chan, void *param); -#endif /* __AMBA_PL330_H_ */