1 /* 2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _CC_PAL_DMA_PLAT_H 8 #define _CC_PAL_DMA_PLAT_H 9 10 #include <stdint.h> 11 12 #ifdef __cplusplus 13 extern "C" 14 { 15 #endif 16 17 #include "cc_address_defs.h" 18 19 /** 20 * @brief Initializes contiguous memory pool required for CC_PalDmaContigBufferAllocate() and CC_PalDmaContigBufferFree(). Our 21 * example implementation is to mmap 0x30000000 and call to bpool(), for use of bget() in CC_PalDmaContigBufferAllocate(), 22 * and brel() in CC_PalDmaContigBufferFree(). 23 * 24 * @return A non-zero value in case of failure. 25 */ 26 extern uint32_t CC_PalDmaInit(uint32_t buffSize, /*!< [in] Buffer size in Bytes. */ 27 CCDmaAddr_t physBuffAddr /*!< [in] Physical start address of the memory to map. */); 28 29 /** 30 * @brief free system resources created in CC_PalDmaInit() 31 * 32 * @param[in] buffSize - buffer size in Bytes 33 * 34 * @return void 35 */ 36 extern void CC_PalDmaTerminate(void); 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42 43 44