Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *
0004  * Copyright (C) 2008-2009 ST-Ericsson AB
0005  *
0006  * Author: Rickard Andersson <rickard.andersson@stericsson.com>
0007  * Author: Linus Walleij <linus.walleij@stericsson.com>
0008  */
0009 #ifndef __ASMARM_TCM_H
0010 #define __ASMARM_TCM_H
0011 
0012 #ifndef CONFIG_HAVE_TCM
0013 #error "You should not be including tcm.h unless you have a TCM!"
0014 #endif
0015 
0016 #include <linux/compiler.h>
0017 
0018 /* Tag variables with this */
0019 #define __tcmdata __section(".tcm.data")
0020 /* Tag constants with this */
0021 #define __tcmconst __section(".tcm.rodata")
0022 /* Tag functions inside TCM called from outside TCM with this */
0023 #define __tcmfunc __attribute__((long_call)) __section(".tcm.text") noinline
0024 /* Tag function inside TCM called from inside TCM  with this */
0025 #define __tcmlocalfunc __section(".tcm.text")
0026 
0027 void *tcm_alloc(size_t len);
0028 void tcm_free(void *addr, size_t len);
0029 bool tcm_dtcm_present(void);
0030 bool tcm_itcm_present(void);
0031 
0032 #endif