tcm.h 665 B

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