Commit 983c42ba3465d4a80edfd318de24f8ffb2bf71ca

Authored by Matt Porter
Committed by Sekhar Nori
1 parent c94472d4ad

ARM: davinci: add platform hook to fetch the SRAM pool

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>

Showing 2 changed files with 8 additions and 0 deletions Side-by-side Diff

arch/arm/mach-davinci/include/mach/sram.h
... ... @@ -24,5 +24,8 @@
24 24 extern void *sram_alloc(size_t len, dma_addr_t *dma);
25 25 extern void sram_free(void *addr, size_t len);
26 26  
  27 +/* Get the struct gen_pool * for use in platform data */
  28 +extern struct gen_pool *sram_get_gen_pool(void);
  29 +
27 30 #endif /* __MACH_SRAM_H */
arch/arm/mach-davinci/sram.c
... ... @@ -18,6 +18,11 @@
18 18  
19 19 static struct gen_pool *sram_pool;
20 20  
  21 +struct gen_pool *sram_get_gen_pool(void)
  22 +{
  23 + return sram_pool;
  24 +}
  25 +
21 26 void *sram_alloc(size_t len, dma_addr_t *dma)
22 27 {
23 28 unsigned long vaddr;