1/* 2 * Copyright (c) 2012-2022 Huawei Technologies Co., Ltd. 3 * Description: memory init, register for mailbox pool. 4 * 5 * This software is licensed under the terms of the GNU General Public 6 * License version 2, as published by the Free Software Foundation, and 7 * may be copied, distributed, and modified under those terms. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 */ 14 15#ifndef STATIC_ION_MEM_H 16#define STATIC_ION_MEM_H 17#include <linux/types.h> 18 19#define ION_MEM_MAX_SIZE 10 20 21struct register_ion_mem_tag { 22 uint32_t size; 23 uint64_t memaddr[ION_MEM_MAX_SIZE]; 24 uint32_t memsize[ION_MEM_MAX_SIZE]; 25 uint32_t memtag[ION_MEM_MAX_SIZE]; 26}; 27 28enum static_mem_tag { 29 MEM_TAG_MIN = 0, 30 PP_MEM_TAG = 1, 31 PRI_PP_MEM_TAG = 2, 32 PT_MEM_TAG = 3, 33 MEM_TAG_MAX, 34}; 35 36#ifdef CONFIG_STATIC_ION 37int tc_ns_register_ion_mem(void); 38#else 39static inline int tc_ns_register_ion_mem(void) 40{ 41 return 0; 42} 43#endif 44 45#endif