From patchwork Fri Feb 1 12:51:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 2079761 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BAD1F40E3D for ; Fri, 1 Feb 2013 12:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756603Ab3BAMzd (ORCPT ); Fri, 1 Feb 2013 07:55:33 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:9459 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755900Ab3BAMzZ (ORCPT ); Fri, 1 Feb 2013 07:55:25 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MHJ00CXLL88AT01@mailout1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Feb 2013 21:55:24 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 31.3D.03880.C3BBB015; Fri, 01 Feb 2013 21:55:24 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-35-510bbb3c9e40 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 10.3D.03880.C3BBB015; Fri, 01 Feb 2013 21:55:24 +0900 (KST) Received: from padma-linuxpc.sisodomain.com ([107.108.83.35]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHJ00DM6L1HSU70@mmp2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 01 Feb 2013 21:55:24 +0900 (KST) From: Padmavathi Venna To: linux-samsung-soc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, padma.v@samsung.com, padma.kvr@gmail.com Cc: sbkim73@samsung.com, broonie@opensource.wolfsonmicro.com, kgene.kim@samsung.com, jassisinghbrar@gmail.com, arnd@arndb.de, vinod.koul@intel.com, grant.likely@secretlab.ca, jon-hunter@ti.com, boojin.kim@samsung.com, thomas.abraham@linaro.org Subject: [PATCH V2 4/4] DMA: PL330: Modify pl330 filter based on new generic dma dt bindings. Date: Fri, 01 Feb 2013 18:21:56 +0530 Message-id: <1359723116-18173-5-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1359723116-18173-1-git-send-email-padma.v@samsung.com> References: <1359723116-18173-1-git-send-email-padma.v@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRmVeSWpSXmKPExsWyRsSkRtdmN3egwdcXehYzzu9jcmD0+LxJ LoAxissmJTUnsyy1SN8ugSvjybV1LAWzOCp+9mxhbmC8y9bFyMkhIWAisfn8GkYIW0ziwr31 QHEuDiGBpYwSjzZPZoQperL4JyNEYjqjxJvbD5ghnE1MEvP6zwA5HBxsAjoSLWddQOIiAnMY JZq3zwDrYBb4ySjxou8xK8goYYF4ibvHmsB2swioSsxsm8gMYvMKOEscOzyVFWKdgsSxqV/B bE4BF4n73+eD1QgB1RyfuJ4dZKiEwHU2if0/l0INEpD4NvkQC8gVEgKyEpsOMEPMkZQ4uOIG ywRG4QWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxAsPw9L9n0jsYVzVYHGIU4GBU4uE9 8ZMrUIg1say4MvcQowQHs5IIr20td6AQb0piZVVqUX58UWlOavEhxmSg5ROZpUST84ExklcS b2hsYm5qbGppZGRmakqasJI4L+OpJwFCAumJJanZqakFqUUwW5g4OKUaGE0/JFyfl73KvLj+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ung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch modify the filter function to filter the required channel based on new filter params. Signed-off-by: Padmavathi Venna --- drivers/dma/pl330.c | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index ddf4dd0..14d84a4 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2392,15 +2392,12 @@ bool pl330_filter(struct dma_chan *chan, void *param) #ifdef CONFIG_OF if (chan->device->dev->of_node) { - const __be32 *prop_value; - phandle phandle; - struct device_node *node; - - prop_value = ((struct property *)param)->value; - phandle = be32_to_cpup(prop_value++); - node = of_find_node_by_phandle(phandle); - return ((chan->private == node) && - (chan->chan_id == be32_to_cpup(prop_value))); + struct dma_pl330_filter_args *fargs = param; + + if (chan->device != &fargs->pdmac->ddma) + return false; + + return (chan->chan_id == fargs->chan_id); } #endif