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