diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-02-28 08:42:48 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-03-11 13:26:58 -0400 |
commit | 3f0c8206644836e4f10a6b9fc47cda6a9a372f9b (patch) | |
tree | c85e72e465074dd94761f8a685a2110a3b7f8db9 /include/linux/of_reserved_mem.h | |
parent | e8d9d1f5485b52ec3c4d7af839e6914438f6c285 (diff) |
drivers: of: add initialization code for dynamic reserved memory
This patch adds support for dynamically allocated reserved memory regions
declared in device tree. Such regions are defined by 'size', 'alignment'
and 'alloc-ranges' properties.
Based on previous code provided by Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'include/linux/of_reserved_mem.h')
-rw-r--r-- | include/linux/of_reserved_mem.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h new file mode 100644 index 000000000000..89226ed7d954 --- /dev/null +++ b/include/linux/of_reserved_mem.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef __OF_RESERVED_MEM_H | ||
2 | #define __OF_RESERVED_MEM_H | ||
3 | |||
4 | struct reserved_mem { | ||
5 | const char *name; | ||
6 | unsigned long fdt_node; | ||
7 | phys_addr_t base; | ||
8 | phys_addr_t size; | ||
9 | }; | ||
10 | |||
11 | #ifdef CONFIG_OF_RESERVED_MEM | ||
12 | void fdt_init_reserved_mem(void); | ||
13 | void fdt_reserved_mem_save_node(unsigned long node, const char *uname, | ||
14 | phys_addr_t base, phys_addr_t size); | ||
15 | #else | ||
16 | static inline void fdt_init_reserved_mem(void) { } | ||
17 | static inline void fdt_reserved_mem_save_node(unsigned long node, | ||
18 | const char *uname, phys_addr_t base, phys_addr_t size) { } | ||
19 | #endif | ||
20 | |||
21 | #endif /* __OF_RESERVED_MEM_H */ | ||