Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
c438b58e JH |
2 | #ifndef __ASM_TCM_H__ |
3 | #define __ASM_TCM_H__ | |
4 | ||
5 | #include <linux/ioport.h> | |
6 | #include <linux/list.h> | |
7 | ||
8 | struct tcm_allocation { | |
9 | struct list_head list; | |
10 | unsigned int tag; | |
11 | unsigned long addr; | |
12 | unsigned long size; | |
13 | }; | |
14 | ||
15 | /* | |
16 | * TCM memory region descriptor. | |
17 | */ | |
18 | struct tcm_region { | |
19 | unsigned int tag; | |
20 | struct resource res; | |
21 | }; | |
22 | ||
23 | #define TCM_INVALID_TAG 0xffffffff | |
24 | ||
25 | unsigned long tcm_alloc(unsigned int tag, size_t len); | |
26 | void tcm_free(unsigned int tag, unsigned long addr, size_t len); | |
27 | unsigned int tcm_lookup_tag(unsigned long p); | |
28 | ||
29 | int tcm_add_region(struct tcm_region *reg); | |
30 | ||
31 | #endif |