diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-12-23 13:04:44 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-01-21 11:06:12 +0530 |
commit | 4db8fd32ed2be7cc510e51e43ec3349aa64074a9 (patch) | |
tree | 451a8039198e855d3ede4cc127950d0c6f14e809 /Makefile | |
parent | 7d083ae983573de16e3ab0bfd47486996d211417 (diff) | |
download | lwn-4db8fd32ed2be7cc510e51e43ec3349aa64074a9.tar.gz lwn-4db8fd32ed2be7cc510e51e43ec3349aa64074a9.zip |
dmaengine: Add metadata_ops for dma_async_tx_descriptor
The metadata is best described as side band data or parameters traveling
alongside the data DMAd by the DMA engine. It is data
which is understood by the peripheral and the peripheral driver only, the
DMA engine see it only as data block and it is not interpreting it in any
way.
The metadata can be different per descriptor as it is a parameter for the
data being transferred.
If the DMA supports per descriptor metadata it can implement the attach,
get_ptr/set_len callbacks.
Client drivers must only use either attach or get_ptr/set_len to avoid
misconfiguration.
Client driver can check if a given metadata mode is supported by the
channel during probe time with
dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_CLIENT);
dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_ENGINE);
and based on this information can use either mode.
Wrappers are also added for the metadata_ops.
To be used in DESC_METADATA_CLIENT mode:
dmaengine_desc_attach_metadata()
To be used in DESC_METADATA_ENGINE mode:
dmaengine_desc_get_metadata_ptr()
dmaengine_desc_set_metadata_len()
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Link: https://lore.kernel.org/r/20191223110458.30766-5-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions