1 /* 2 * Copyright (c) 2022, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef __BOOT_DMA_H__ 9 #define __BOOT_DMA_H__ 10 11 #include <stdint.h> 12 #include "tfm_plat_defs.h" 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 /*! 19 * \brief Executes DMA memory copy service in irq mode. 20 * 21 * \param[in] src_addr Source address of the data to be copied. 22 * \param[in] dest_addr Destination address of the data to be copied. 23 * \param[in] size Size of the data to be copied in bytes copied. 24 * \param[in] channel_idx DMA channel index to be used for copy service. 25 * 26 * \return Returns 0 on success else -1 27 * 28 */ 29 int32_t boot_dma_memcpy(uint32_t src_addr, 30 uint32_t dest_addr, 31 uint32_t size, 32 uint32_t channel_idx); 33 34 /** 35 * \brief Initialise the DMA devices and channels. 36 * 37 * \return Returns values as specified by the \ref tfm_plat_err_t 38 */ 39 enum tfm_plat_err_t boot_dma_init_cfg(void); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif /* __BOOT_DMA_H__ */ 46