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