1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 /* Copyright (c) 2025 Rockchip Electronics Co., Ltd. */ 4 5 #ifndef __RKCE_BUF_H__ 6 #define __RKCE_BUF_H__ 7 8 #include <malloc.h> 9 #include <linux/types.h> 10 11 #define RKCE_BUF_ALIGN_SIZE 16 12 13 #define rkce_cma_init(device) 14 #define rkce_cma_deinit(device) 15 16 #define rkce_cma_alloc(size) memalign(RKCE_BUF_ALIGN_SIZE, size) 17 #define rkce_cma_free(buf) free(buf) 18 19 #define rkce_cma_virt2phys(buf) (((unsigned long)buf) & 0xffffffff) 20 #define rkce_cma_phys2virt(phys) ((unsigned long)phys) 21 22 #endif 23