]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
ARM: davinci: add platform hook to fetch the SRAM pool
authorMatt Porter <mporter@ti.com>
Fri, 5 Oct 2012 17:04:43 +0000 (13:04 -0400)
committerSekhar Nori <nsekhar@ti.com>
Sat, 27 Oct 2012 10:58:35 +0000 (16:28 +0530)
Adds sram_get_gen_pool() which allows platform code to get
the machine's SRAM gen_pool. The gen_pool may be passed in
platform data for driver genalloc use.

Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/include/mach/sram.h
arch/arm/mach-davinci/sram.c

index 111f7cc71e07b0a36ff0ccba4df066216c8747b6..4e5db56218b86a28017ef38898ed7a54e5f53acc 100644 (file)
@@ -24,4 +24,7 @@
 extern void *sram_alloc(size_t len, dma_addr_t *dma);
 extern void sram_free(void *addr, size_t len);
 
+/* Get the struct gen_pool * for use in platform data */
+extern struct gen_pool *sram_get_gen_pool(void);
+
 #endif /* __MACH_SRAM_H */
index fa56374912d42e4baf4649477bafef3034fa3619..c5f7ee5cc80ab3b6b6c2226798b233a8f59f1d0c 100644 (file)
 
 static struct gen_pool *sram_pool;
 
+struct gen_pool *sram_get_gen_pool(void)
+{
+       return sram_pool;
+}
+
 void *sram_alloc(size_t len, dma_addr_t *dma)
 {
        unsigned long vaddr;