aboutsummaryrefslogtreecommitdiffstats
path: root/arch/metag/include/asm/tcm.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2012-10-09 10:54:17 +0100
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 20:09:21 +0000
commitc438b58e65462cfff172b396d03d6bc45c971fca (patch)
tree3d8ea3cfbe75f4e6b41f5f41f36c889df5b0f7d8 /arch/metag/include/asm/tcm.h
parentmetag: Highmem support (diff)
downloadlinux-dev-c438b58e65462cfff172b396d03d6bc45c971fca.tar.xz
linux-dev-c438b58e65462cfff172b396d03d6bc45c971fca.zip
metag: TCM support
Add some TCM support Signed-off-by: James Hogan <james.hogan@imgtec.com>
Diffstat (limited to 'arch/metag/include/asm/tcm.h')
-rw-r--r--arch/metag/include/asm/tcm.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/metag/include/asm/tcm.h b/arch/metag/include/asm/tcm.h
new file mode 100644
index 000000000000..7711c317b1d2
--- /dev/null
+++ b/arch/metag/include/asm/tcm.h
@@ -0,0 +1,30 @@
+#ifndef __ASM_TCM_H__
+#define __ASM_TCM_H__
+
+#include <linux/ioport.h>
+#include <linux/list.h>
+
+struct tcm_allocation {
+ struct list_head list;
+ unsigned int tag;
+ unsigned long addr;
+ unsigned long size;
+};
+
+/*
+ * TCM memory region descriptor.
+ */
+struct tcm_region {
+ unsigned int tag;
+ struct resource res;
+};
+
+#define TCM_INVALID_TAG 0xffffffff
+
+unsigned long tcm_alloc(unsigned int tag, size_t len);
+void tcm_free(unsigned int tag, unsigned long addr, size_t len);
+unsigned int tcm_lookup_tag(unsigned long p);
+
+int tcm_add_region(struct tcm_region *reg);
+
+#endif