Merge tag 'u-boot-stm32-20200619' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
[oweals/u-boot.git] / include / dma-uclass.h
index 31b43fb4b98ec8e9853518c01c62950539bef409..340437acc134a078a3610b5f8aea90769321babe 100644 (file)
@@ -58,14 +58,14 @@ struct dma_ops {
         */
        int (*request)(struct dma *dma);
        /**
-        * free - Free a previously requested dma.
+        * rfree - Free a previously requested dma.
         *
         * This is the implementation of the client dma_free() API.
         *
         * @dma: The DMA to free.
         * @return 0 if OK, or a negative error code.
         */
-       int (*free)(struct dma *dma);
+       int (*rfree)(struct dma *dma);
        /**
         * enable() - Enable a DMA Channel.
         *
@@ -108,6 +108,17 @@ struct dma_ops {
         * @return zero on success, or -ve error code.
         */
        int (*send)(struct dma *dma, void *src, size_t len, void *metadata);
+       /**
+        * get_cfg() - Get DMA channel configuration for client's use
+        *
+        * @dma:    The DMA Channel to manipulate
+        * @cfg_id: DMA provider specific ID to identify what
+        *          configuration data client needs
+        * @data:   Pointer to store pointer to DMA driver specific
+        *          configuration data for the given cfg_id (output param)
+        * @return zero on success, or -ve error code.
+        */
+       int (*get_cfg)(struct dma *dma, u32 cfg_id, void **data);
 #endif /* CONFIG_DMA_CHANNELS */
        /**
         * transfer() - Issue a DMA transfer. The implementation must