From patchwork Thu Dec 22 12:11:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9484717 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 7D9D1601D9 for ; Thu, 22 Dec 2016 12:11:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6170128113 for ; Thu, 22 Dec 2016 12:11:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5648028174; Thu, 22 Dec 2016 12:11:59 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 E2D3B28427 for ; Thu, 22 Dec 2016 12:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938782AbcLVML5 (ORCPT ); Thu, 22 Dec 2016 07:11:57 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:36269 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938739AbcLVMLz (ORCPT ); Thu, 22 Dec 2016 07:11:55 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIL01D8I5VT1YD0@mailout3.samsung.com>; Thu, 22 Dec 2016 21:11:53 +0900 (KST) Received: from epsmges1p1.samsung.com (unknown [182.195.42.53]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20161222121152epcas1p1eca22b241db5a4a619df979132b5b7f0~Skt6e1htO2492224922epcas1p1T; Thu, 22 Dec 2016 12:11:52 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id BD.F1.05883.803CB585; Thu, 22 Dec 2016 21:11:52 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20161222121151epcas1p298f81862fc4370f3cbf2b10e4da5344a~Skt6LaQgq1834818348epcas1p2_; Thu, 22 Dec 2016 12:11:51 +0000 (GMT) X-AuditID: b6c32a35-f799b6d0000016fb-3c-585bc308c584 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 76.A8.28252.703CB585; Thu, 22 Dec 2016 21:11:51 +0900 (KST) Received: from AMDC2765.digital.local ([106.116.147.25]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OIL007QI5VFOVA0@mmp2.samsung.com>; Thu, 22 Dec 2016 21:11:51 +0900 (KST) 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 1/3] dmaengine: pl330: remove pdata based initialization Date: Thu, 22 Dec 2016 13:11:27 +0100 Message-id: <1482408689-21971-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1482408689-21971-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7bCmri7H4egIgzMzuCw2zljParF66l9W i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pmXrqtUmiI m66FkkJeYm6qrVKErm9IkJJCWWJOKZBnZIAGHJwD3IOV9O0S3DI2tN5kKTimXHFw9mnGBsal sl2MnBwSAiYS0/bsY4GwxSQu3FvP1sXIxSEkMItRYsHal8wgCSGBX4wSr/qjQWw2AUOJrrdd bCC2iEATo8TBXx4gDcwCy5kktky/wA6SEBbwkLh98x0riM0ioCrxoL2DCcTmBYp/+v2fEWKb nMTJY5OBajg4OAU8JRZ9V4LY5SGxdOccxgmMvAsYGVYxSqQWJBcUJ6XnGuallusVJ+YWl+al 6yXn525iBMfCM6kdjAd3uR9iFOBgVOLh/fEqKkKINbGsuDL3EKMEB7OSCG/ugegIId6UxMqq 1KL8+KLSnNTiQ4ymQHdNZJYSTc4HxmleSbyhibmJubGBhbmlpYmRkjhv4+xn4UIC6Yklqdmp qQWpRTB9TBycUg2M/jM5rUK3np/t8+b9ZC5B+5srG+7Zrvu2Mslhk9ab1tRgjRqu1Z5nRRfE 8x6atOy5R36I875D1a/3XBKU23GkwMPxwIQZp2azRe8Xdub8Pt22+FPocjaLVzMaOQ7+iow8 NCez4IVh8kH5z9HvjuZu81Q3MXdJWP3p9M3apwmbBVV6zkrPT1t4WomlOCPRUIu5qDgRALGG oACbAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161222121151epcas1p298f81862fc4370f3cbf2b10e4da5344a X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 101P X-HopCount: 7 X-CMS-RootMailID: 20161222121151epcas1p298f81862fc4370f3cbf2b10e4da5344a X-RootMTR: 20161222121151epcas1p298f81862fc4370f3cbf2b10e4da5344a References: <1482408689-21971-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 X-Virus-Scanned: ClamAV using ClamSMTP This driver is now used only on platforms which supports device tree, so it is safe to remove legacy platform data based initialization code. Signed-off-by: Marek Szyprowski --- drivers/dma/pl330.c | 30 ++++++++---------------------- include/linux/amba/pl330.h | 35 ----------------------------------- 2 files changed, 8 insertions(+), 57 deletions(-) delete mode 100644 include/linux/amba/pl330.h diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 740bbb9..27cc5d2 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -2839,7 +2838,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; @@ -2849,8 +2847,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; @@ -2863,7 +2859,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++) @@ -2907,10 +2903,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; @@ -2922,11 +2915,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); @@ -2939,15 +2929,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 fe93758..0000000 --- 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_ */