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: 9412819 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 418C160585 for ; Fri, 4 Nov 2016 16:18:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 309FC2B1C0 for ; Fri, 4 Nov 2016 16:18:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 215C72B1C5; Fri, 4 Nov 2016 16:18:56 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE4262B1C0 for ; Fri, 4 Nov 2016 16:18:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2hBM-0007Ff-NN; Fri, 04 Nov 2016 16:17:32 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2hBH-00075i-M6 for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2016 16:17:28 +0000 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> for linux-arm-kernel@lists.infradead.org; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161104_091727_933250_567A643E X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd@arndb.de, vinod.koul@intel.com, sbkim73@samsung.com, andi.shyti@samsung.com, javier@osg.samsung.com, broonie@kernel.org, kgene@kernel.org, Sylwester Nawrocki , ckeepax@opensource.wolfsonmicro.com, ym0914@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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