From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753467AbcAVLKH (ORCPT ); Fri, 22 Jan 2016 06:10:07 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34686 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbcAVLIM (ORCPT ); Fri, 22 Jan 2016 06:08:12 -0500 From: Caesar Wang To: Heiko Stuebner , Vinod Koul Cc: Sonny Rao , shawn.lin@rock-chips.com, dianders@chromium.org, linux-rockchip@lists.infradead.org, Caesar Wang , Dan Williams , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 7/9] dmaengine: core: expose max burst capability to clients Date: Fri, 22 Jan 2016 19:06:50 +0800 Message-Id: <1453460812-8498-8-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453460812-8498-1-git-send-email-wxt@rock-chips.com> References: <1453460812-8498-1-git-send-email-wxt@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shawn Lin This patch add max_burst to dma_get_slave_caps for clients to get the burst capability of slave dma controller. Signed-off-by: Shawn Lin Signed-off-by: Caesar Wang --- Changes in v7: - fix the subject. Changes in v6: - remove expose quirk and add dma max_burst caps for clients Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None Changes in v1: None drivers/dma/dmaengine.c | 1 + include/linux/dmaengine.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index c50a247..0cb259c 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -496,6 +496,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps) caps->src_addr_widths = device->src_addr_widths; caps->dst_addr_widths = device->dst_addr_widths; caps->directions = device->directions; + caps->max_burst = device->max_burst; caps->residue_granularity = device->residue_granularity; caps->descriptor_reuse = device->descriptor_reuse; diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 16a1cad..0a9a0ba 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -401,6 +401,7 @@ enum dma_residue_granularity { * since the enum dma_transfer_direction is not defined as bits for each * type of direction, the dma controller should fill (1 << ) and same * should be checked by controller as well + * @max_burst: max burst capability per-transfer * @cmd_pause: true, if pause and thereby resume is supported * @cmd_terminate: true, if terminate cmd is supported * @residue_granularity: granularity of the reported transfer residue @@ -411,6 +412,7 @@ struct dma_slave_caps { u32 src_addr_widths; u32 dst_addr_widths; u32 directions; + u32 max_burst; bool cmd_pause; bool cmd_terminate; enum dma_residue_granularity residue_granularity; @@ -654,6 +656,7 @@ struct dma_filter { * the enum dma_transfer_direction is not defined as bits for * each type of direction, the dma controller should fill (1 << * ) and same should be checked by controller as well + * @max_burst: max burst capability per-transfer * @residue_granularity: granularity of the transfer residue reported * by tx_status * @device_alloc_chan_resources: allocate resources and return the @@ -712,6 +715,7 @@ struct dma_device { u32 src_addr_widths; u32 dst_addr_widths; u32 directions; + u32 max_burst; bool descriptor_reuse; enum dma_residue_granularity residue_granularity; -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Caesar Wang Subject: [PATCH v7 7/9] dmaengine: core: expose max burst capability to clients Date: Fri, 22 Jan 2016 19:06:50 +0800 Message-ID: <1453460812-8498-8-git-send-email-wxt@rock-chips.com> References: <1453460812-8498-1-git-send-email-wxt@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1453460812-8498-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Heiko Stuebner , Vinod Koul Cc: shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org, dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Dan Williams , Sonny Rao , Caesar Wang List-Id: linux-rockchip.vger.kernel.org From: Shawn Lin This patch add max_burst to dma_get_slave_caps for clients to get the burst capability of slave dma controller. Signed-off-by: Shawn Lin Signed-off-by: Caesar Wang --- Changes in v7: - fix the subject. Changes in v6: - remove expose quirk and add dma max_burst caps for clients Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None Changes in v1: None drivers/dma/dmaengine.c | 1 + include/linux/dmaengine.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index c50a247..0cb259c 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -496,6 +496,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps) caps->src_addr_widths = device->src_addr_widths; caps->dst_addr_widths = device->dst_addr_widths; caps->directions = device->directions; + caps->max_burst = device->max_burst; caps->residue_granularity = device->residue_granularity; caps->descriptor_reuse = device->descriptor_reuse; diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 16a1cad..0a9a0ba 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -401,6 +401,7 @@ enum dma_residue_granularity { * since the enum dma_transfer_direction is not defined as bits for each * type of direction, the dma controller should fill (1 << ) and same * should be checked by controller as well + * @max_burst: max burst capability per-transfer * @cmd_pause: true, if pause and thereby resume is supported * @cmd_terminate: true, if terminate cmd is supported * @residue_granularity: granularity of the reported transfer residue @@ -411,6 +412,7 @@ struct dma_slave_caps { u32 src_addr_widths; u32 dst_addr_widths; u32 directions; + u32 max_burst; bool cmd_pause; bool cmd_terminate; enum dma_residue_granularity residue_granularity; @@ -654,6 +656,7 @@ struct dma_filter { * the enum dma_transfer_direction is not defined as bits for * each type of direction, the dma controller should fill (1 << * ) and same should be checked by controller as well + * @max_burst: max burst capability per-transfer * @residue_granularity: granularity of the transfer residue reported * by tx_status * @device_alloc_chan_resources: allocate resources and return the @@ -712,6 +715,7 @@ struct dma_device { u32 src_addr_widths; u32 dst_addr_widths; u32 directions; + u32 max_burst; bool descriptor_reuse; enum dma_residue_granularity residue_granularity; -- 1.9.1