1f525bb2cSGuo Ren /* SPDX-License-Identifier: GPL-2.0 */ 2f525bb2cSGuo Ren 3f525bb2cSGuo Ren #ifndef __ASM_CSKY_TCM_H 4f525bb2cSGuo Ren #define __ASM_CSKY_TCM_H 5f525bb2cSGuo Ren 6f525bb2cSGuo Ren #ifndef CONFIG_HAVE_TCM 7f525bb2cSGuo Ren #error "You should not be including tcm.h unless you have a TCM!" 8f525bb2cSGuo Ren #endif 9f525bb2cSGuo Ren 10f525bb2cSGuo Ren #include <linux/compiler.h> 11f525bb2cSGuo Ren 12f525bb2cSGuo Ren /* Tag variables with this */ 1333def849SJoe Perches #define __tcmdata __section(".tcm.data") 14f525bb2cSGuo Ren /* Tag constants with this */ 1533def849SJoe Perches #define __tcmconst __section(".tcm.rodata") 16f525bb2cSGuo Ren /* Tag functions inside TCM called from outside TCM with this */ 1733def849SJoe Perches #define __tcmfunc __section(".tcm.text") noinline 18f525bb2cSGuo Ren /* Tag function inside TCM called from inside TCM with this */ 1933def849SJoe Perches #define __tcmlocalfunc __section(".tcm.text") 20f525bb2cSGuo Ren 21f525bb2cSGuo Ren void *tcm_alloc(size_t len); 22f525bb2cSGuo Ren void tcm_free(void *addr, size_t len); 23f525bb2cSGuo Ren 24f525bb2cSGuo Ren #endif 25