diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-07-14 10:28:04 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-08-01 12:22:21 -0600 |
commit | 9dcfee01930e6cc1e84d28c232664f0c19a1f86c (patch) | |
tree | 747884063ec2dfb1dda29f616d87ceb4d6211e04 /include/linux/of_reserved_mem.h | |
parent | 3069f0c07f8d64ebf6ff5d2d1553e0a6dad4316e (diff) |
drivers: of: add automated assignment of reserved regions to client devices
This patch adds code for automated assignment of reserved memory regions
to struct device. reserved_mem->ops->device_init()/device_cleanup()
callbacks are called to perform reserved memory driver specific
initialization and cleanup
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index 4669ddfdd5af..5b5efae09135 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -8,6 +8,7 @@ struct reserved_mem_ops; struct reserved_mem { const char *name; unsigned long fdt_node; + unsigned long phandle; const struct reserved_mem_ops *ops; phys_addr_t base; phys_addr_t size; @@ -27,10 +28,16 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) #ifdef CONFIG_OF_RESERVED_MEM +void of_reserved_mem_device_init(struct device *dev); +void of_reserved_mem_device_release(struct device *dev); + void fdt_init_reserved_mem(void); void fdt_reserved_mem_save_node(unsigned long node, const char *uname, phys_addr_t base, phys_addr_t size); #else +static inline void of_reserved_mem_device_init(struct device *dev) { } +static inline void of_reserved_mem_device_release(struct device *pdev) { } + static inline void fdt_init_reserved_mem(void) { } static inline void fdt_reserved_mem_save_node(unsigned long node, const char *uname, phys_addr_t base, phys_addr_t size) { } |