From patchwork Wed Feb 6 06:18:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 2102151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 7DFC5DFE82 for ; Wed, 6 Feb 2013 06:21:28 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U2yL7-0003bN-VS; Wed, 06 Feb 2013 06:18:37 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U2yKy-0003Zm-7W for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 06:18:29 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MHS005BYC64HKN0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 15:18:25 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9E.E3.03918.1B5F1115; Wed, 06 Feb 2013 15:18:25 +0900 (KST) X-AuditID: cbfee61a-b7f7d6d000000f4e-09-5111f5b1891d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id CD.E3.03918.0B5F1115; Wed, 06 Feb 2013 15:18:24 +0900 (KST) Received: from padma-linuxpc.sisodomain.com ([107.108.83.35]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHS001KWC6CC970@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 15:18: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 Subject: [PATCH V3 1/5] DMA: PL330: Add new pl330 filter for DT case. Date: Wed, 06 Feb 2013 11:48:45 +0530 Message-id: <1360131529-2847-2-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1360131529-2847-1-git-send-email-padma.v@samsung.com> References: <1360131529-2847-1-git-send-email-padma.v@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsWyRsSkWnfjV8FAg0vXuC02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGvvd1Bef4KvZ9OcbcwPibu4uRk0NCwETizIGLzBC2mMSFe+vZ uhi5OIQEljJK3Ju6mBmm6Fr/GWaIxCJGiWVzXrGBJIQEtjJJ7Jpt3sXIwcEmoCPRctYFpEZE YA6jRPP2GYwgDrPAT0aJF32PWUEahAVcJbbc/AFmswioSly6fp8FxOYVcJLYv+k21DYFiWNT v4LVcAo4Syzr6GOEWOYk8XLtdVaQoRIC19kkHp66zQgxSEDi2+RDLCBXSAjISmw6ADVHUuLg ihssExiFFzAyrGIUTS1ILihOSs811CtOzC0uzUvXS87P3cQIDMHT/55J7WBc2WBxiFGAg1GJ h/eGnmCgEGtiWXFl7iFGCQ5mJRFe289AId6UxMqq1KL8+KLSnNTiQ4zJQMsnMkuJJucD4yOv JN7Q2MTc1NjU0sjIzNSUNGElcV7GU08ChATSE0tSs1NTC1KLYLYwcXBKNTAm/7xXU1jN/a/3 vlp0i2Wy+cXeh8/dw39cCJIIli46ve6PsMHfu8IudXmKHxotupbtfFtcraTOvt7pUs6L8y3z mAt4XgQGvHXccMuvesfn+389ilmY9m8t/nJC6/Atx/dBx/IYfRrbmbcKnHk2914C2+LmII6d sSF8j2rC5LtDD3eYzVt9OlCJpTgj0VCLuag4EQAxiJZEhQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t9jAd0NXwUDDS5us7TY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhDWMGfve1xWc46vY9+UYcwPj b+4uRk4OCQETiWv9Z5ghbDGJC/fWs3UxcnEICSxilFg25xUbSEJIYCuTxK7Z5l2MHBxsAjoS LWddQGpEBOYwSjRvn8EI4jAL/GSUeNH3mBWkQVjAVWLLzR9gNouAqsSl6/dZQGxeASeJ/Ztu Q21TkDg29StYDaeAs8Syjj5GiGVOEi/XXmedwMi7gJFhFaNoakFyQXFSeq6hXnFibnFpXrpe cn7uJkZwgD+T2sG4ssHiEKMAB6MSD+8NPcFAIdbEsuLK3EOMEhzMSiK8tp+BQrwpiZVVqUX5 8UWlOanFhxiTga6ayCwlmpwPjL68knhDYxNzU2NTSxMLEzNL0oSVxHkZTz0JEBJITyxJzU5N LUgtgtnCxMEp1cCoVrdLy+Vps9v7uG/Hv5r+v8vIfjnh263W1L8S1fWdPAdVP8/Pe2Lt/pFr 61HrTT+8WxOs5Lf8/HKwfKLXPp2z8bv/bQhQXhZraP3J86bYh+mP2Qq8N3je8dNlqq0teKFQ zDHvzZ331X0sj178O/7iFS+PMO/ETRN+bFaN7y/bVfxpRXe7r8kuJZbijERDLeai4kQApZjG 0LQCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130206_011828_533311_93234981 X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: jassisinghbrar@gmail.com, kgene.kim@samsung.com, arnd@arndb.de, boojin.kim@samsung.com, sbkim73@samsung.com, broonie@opensource.wolfsonmicro.com, grant.likely@secretlab.ca, vinod.koul@intel.com, thomas.abraham@linaro.org, jon-hunter@ti.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds a new pl330_dt_filter for DT case to filter the required channel based on the new filter params and modifies the old filter only for non-DT case as suggested by Arnd Bergmann. Signed-off-by: Padmavathi Venna Acked-by: Arnd Bergmann --- drivers/dma/pl330.c | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 80680ee..87110f2 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -606,6 +606,11 @@ struct dma_pl330_desc { struct dma_pl330_chan *pchan; }; +struct dma_pl330_filter_args { + struct dma_pl330_dmac *pdmac; + unsigned int chan_id; +}; + static inline void _callback(struct pl330_req *r, enum pl330_op_err err) { if (r && r->xfer_cb) @@ -2352,6 +2357,16 @@ static void dma_pl330_rqcb(void *token, enum pl330_op_err err) tasklet_schedule(&pch->task); } +static bool pl330_dt_filter(struct dma_chan *chan, void *param) +{ + struct dma_pl330_filter_args *fargs = param; + + if (chan->device != &fargs->pdmac->ddma) + return false; + + return (chan->chan_id == fargs->chan_id); +} + bool pl330_filter(struct dma_chan *chan, void *param) { u8 *peri_id; @@ -2359,20 +2374,6 @@ bool pl330_filter(struct dma_chan *chan, void *param) if (chan->device->dev->driver != &pl330_driver.drv) return false; -#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))); - } -#endif - peri_id = chan->private; return *peri_id == (unsigned)param; }