From patchwork Fri Nov 4 16:14:48 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: 9412793 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 4467E60585 for ; Fri, 4 Nov 2016 16:17:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36C3A2B1C0 for ; Fri, 4 Nov 2016 16:17:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21D372B1C5; Fri, 4 Nov 2016 16:17:11 +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=ham 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 E14AE2B1C2 for ; Fri, 4 Nov 2016 16:17:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936176AbcKDQRI (ORCPT ); Fri, 4 Nov 2016 12:17:08 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:60794 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934706AbcKDQRH (ORCPT ); Fri, 4 Nov 2016 12:17:07 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG4029TNL8HZJ50@mailout4.samsung.com>; Sat, 05 Nov 2016 01:17:05 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-dd-581cb4814bae Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 9E.02.16530.184BC185; Sat, 5 Nov 2016 01:17:05 +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 <0OG400JDIL52T940@mmp2.samsung.com>; Sat, 05 Nov 2016 01:17:05 +0900 (KST) From: Sylwester Nawrocki To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org Cc: vinod.koul@intel.com, broonie@kernel.org, ckeepax@opensource.wolfsonmicro.com, ym0914@gmail.com, arnd@arndb.de, kgene@kernel.org, javier@osg.samsung.com, andi.shyti@samsung.com, sbkim73@samsung.com, Sylwester Nawrocki Subject: [PATCH RFC 1/7] dma: pl08x: Add support for the DMA slave map Date: Fri, 04 Nov 2016 17:14:48 +0100 Message-id: <1478276094-19135-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1478276094-19135-1-git-send-email-s.nawrocki@samsung.com> References: <1478276094-19135-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRmVeSWpSXmKPExsVy+t9jQd3GLTIRBmt/ClhsP/KM1eLvpGPs FlMfPmGz+DflBrvF6ql/WS3evF3DZNH/+DWzxabH11gtZpzfx2Rx+E07q8XFFV+YLF727Wex 6Nnwn9WB1+P3r0mMHjtn3WX3WLznJZPHplWdbB6bl9R7vJz4m81jSz9QvG/LKkaPz5vkAjij 3GwyUhNTUosUUvOS81My89JtlUJD3HQtlBTyEnNTbZUidH1DgpQUyhJzSoE8IwM04OAc4B6s pG+X4JZxbM0BxoIrvBXvuqwbGFdxdzFyckgImEjsPryZEcIWk7hwbz1bFyMXh5DALEaJ3aev M0M4vxglLq7/xApSxSZgKNF7tA+sQ0QgQ+J25xl2kCJmgT+MEgd+dLODJIQF3CTuHnoI1sAi oCpxe90HFhCbFyi+buICFoh1chInj00Gq+EUcJe4um8FG4gtBFQz6+UvlgmMvAsYGVYxSqQW JBcUJ6XnGuWllusVJ+YWl+al6yXn525iBMfNM+kdjId3uR9iFOBgVOLhTZwiEyHEmlhWXJl7 iFGCg1lJhLd+PVCINyWxsiq1KD++qDQntfgQoynQYROZpUST84ExnVcSb2hibmJubGBhbmlp YqQkzts4+1m4kEB6YklqdmpqQWoRTB8TB6dUA+O+6c37Fyzs2Sq8dEHC82WZs4JDbknP7NSY slVJsqTg06aiLyoPT8wwvzAzUiyLw+LCV9t3su3PZrUtuWlj1xoUtWTujur/XMFzH8+vsvQS co2rDVAVtf+3ZFfLTfvaCrblWxy/PcyLFjDdZ8r6ps06WP6O0O/OC8mi80rapOX4Zmxsusdh wK7EUpyRaKjFXFScCACjps3usQIAAA== X-MTR: 20000000000000000@CPGS 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 patch add support for the new channel request API introduced in commit a8135d0d79e9d0ad3a4ff494fceeaae83 "dmaengine: core: Introduce new, universal API to request a channel" Signed-off-by: Sylwester Nawrocki --- drivers/dma/amba-pl08x.c | 3 +++ include/linux/amba/pl08x.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 939a7c3..d5c75c8 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -2307,6 +2307,9 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id) ret = -EINVAL; goto out_no_platdata; } + } else { + pl08x->slave.filter.map = pl08x->pd->slave_map; + pl08x->slave.filter.mapcnt = pl08x->pd->slave_map_len; } /* By default, AHB1 only. If dualmaster, from platform */ diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 27e9ec8..5308eae 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h @@ -84,6 +84,8 @@ struct pl08x_channel_data { * running any DMA transfer and multiplexing can be recycled * @lli_buses: buses which LLIs can be fetched from: PL08X_AHB1 | PL08X_AHB2 * @mem_buses: buses which memory can be accessed from: PL08X_AHB1 | PL08X_AHB2 + * @slave_map: DMA slave matching table + * @slave_map_len: number of elements in @slave_map */ struct pl08x_platform_data { struct pl08x_channel_data *slave_channels; @@ -93,6 +95,8 @@ struct pl08x_platform_data { void (*put_xfer_signal)(const struct pl08x_channel_data *, int); u8 lli_buses; u8 mem_buses; + const struct dma_slave_map *slave_map; + int slave_map_len; }; #ifdef CONFIG_AMBA_PL08X