From: Shawn Lin <shawn.lin@rock-chips.com>
To: Vinod Koul <vinod.koul@intel.com>,
Heiko Stuebner <heiko@sntech.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Mark Brown <broonie@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Doug Anderson <dianders@chromium.org>,
Olof Johansson <olof@lixom.net>,
Sonny Rao <sonnyrao@chromium.org>,
Addy Ke <addy.ke@rock-chips.com>,
Boojin Kim <boojin.kim@samsung.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org,
linux-spi@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH v6 06/10] DMA: dmaengine: expose max burst capability to clients
Date: Thu, 15 Oct 2015 09:36:04 +0800 [thread overview]
Message-ID: <1444872964-2425-1-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1444872865-2169-1-git-send-email-shawn.lin@rock-chips.com>
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 <shawn.lin@rock-chips.com>
---
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 3ecec14..1ccf64b 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -492,6 +492,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;
/*
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 7ea9184..b6bc79e 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 << <TYPE>) 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;
@@ -627,6 +629,7 @@ enum dmaengine_alignment {
* the enum dma_transfer_direction is not defined as bits for
* each type of direction, the dma controller should fill (1 <<
* <TYPE>) 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
@@ -680,6 +683,7 @@ struct dma_device {
u32 src_addr_widths;
u32 dst_addr_widths;
u32 directions;
+ u32 max_burst;
enum dma_residue_granularity residue_granularity;
int (*device_alloc_chan_resources)(struct dma_chan *chan);
--
2.3.7
next prev parent reply other threads:[~2015-10-15 1:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 1:34 [PATCH v6 0/10] Fix broken DMAFLUSHP on Rockchips platform Shawn Lin
2015-10-15 1:35 ` [PATCH v6 01/10] DMA: pl330: support burst mode for dev-to-mem and mem-to-dev transmit Shawn Lin
[not found] ` <1444872912-2215-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-10-15 4:08 ` Vinod Koul
2015-10-15 6:51 ` Shawn Lin
2015-10-15 1:35 ` [PATCH v6 02/10] Documentation: arm-pl330: add description of arm,pl330-broken-no-flushp Shawn Lin
2015-10-15 1:35 ` [PATCH v6 03/10] DMA: pl330: add quirk for broken no flushp Shawn Lin
2015-10-15 1:35 ` [PATCH v6 04/10] ARM: dts: Add arm,pl330-broken-no-flushp quirk for rk3288 platform Shawn Lin
2015-10-15 1:36 ` Shawn Lin [this message]
[not found] ` <1444872865-2169-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-10-15 1:35 ` [PATCH v6 05/10] ARM: dts: Add arm, pl330-broken-no-flushp quirk for rk3xxx platform Shawn Lin
2015-10-15 1:36 ` [PATCH v6 07/10] DMA: pl330: add max burst for dmaengine Shawn Lin
2015-10-15 1:36 ` [PATCH v6 08/10] spi: rockchip: modify DMA max burst to 1 Shawn Lin
2015-10-15 1:36 ` [PATCH v6 09/10] snd: dmaengine-pcm: add snd_dmaengine_pcm_get_caps interface Shawn Lin
2015-10-15 3:07 ` [alsa-devel] " kbuild test robot
[not found] ` <1444872998-2548-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-10-15 4:05 ` Vinod Koul
2015-10-15 6:50 ` Shawn Lin
2015-10-15 1:36 ` [PATCH v6 10/10] ASoC: rockchip_i2s: modify DMA max burst to 1 Shawn Lin
[not found] ` <1444873008-2589-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-10-15 3:20 ` kbuild test robot
2015-10-15 8:53 ` Lars-Peter Clausen
[not found] ` <561F6990.7080809-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2015-10-15 10:47 ` Jianqun Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444872964-2425-1-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=addy.ke@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=boojin.kim@samsung.com \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=dmaengine@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=olof@lixom.net \
--cc=perex@perex.cz \
--cc=sonnyrao@chromium.org \
--cc=tiwai@suse.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).