Linux 4.16-rc2
[linux-2.6-block.git] / arch / metag / include / asm / tcm.h
CommitLineData
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
8struct 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 */
18struct tcm_region {
19 unsigned int tag;
20 struct resource res;
21};
22
23#define TCM_INVALID_TAG 0xffffffff
24
25unsigned long tcm_alloc(unsigned int tag, size_t len);
26void tcm_free(unsigned int tag, unsigned long addr, size_t len);
27unsigned int tcm_lookup_tag(unsigned long p);
28
29int tcm_add_region(struct tcm_region *reg);
30
31#endif