summaryrefslogtreecommitdiffstats
path: root/include/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/memory.h')
-rw-r--r--include/memory.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/memory.h b/include/memory.h
index 67b19d7ff1..cb185afa65 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -2,9 +2,24 @@
#define __MEM_MALLOC_H
#include <linux/types.h>
+#include <linux/list.h>
void mem_malloc_init(void *start, void *end);
ulong mem_malloc_start(void);
ulong mem_malloc_end(void);
+struct memory_bank {
+ struct list_head list;
+ struct device_d *dev;
+ unsigned long start;
+ unsigned long size;
+};
+
+extern struct list_head memory_banks;
+
+void barebox_add_memory_bank(const char *name, resource_size_t start,
+ resource_size_t size);
+
+#define for_each_memory_bank(mem) list_for_each_entry(mem, &memory_banks, list)
+
#endif