diff options
author | Matt Porter <mporter@ti.com> | 2012-10-05 13:04:43 -0400 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2012-10-27 06:58:35 -0400 |
commit | 983c42ba3465d4a80edfd318de24f8ffb2bf71ca (patch) | |
tree | 69fbbb59019fadb8f6c1a6eaf271c41faa7004d1 /arch | |
parent | c94472d4ad11c5b7d8cd527d136c198269d390fc (diff) |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/sram.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/sram.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h index 111f7cc71e07..4e5db56218b8 100644 --- a/arch/arm/mach-davinci/include/mach/sram.h +++ b/arch/arm/mach-davinci/include/mach/sram.h | |||
@@ -24,4 +24,7 @@ | |||
24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); | 24 | extern void *sram_alloc(size_t len, dma_addr_t *dma); |
25 | extern void sram_free(void *addr, size_t len); | 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 | #endif /* __MACH_SRAM_H */ | 30 | #endif /* __MACH_SRAM_H */ |
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c index fa56374912d4..c5f7ee5cc80a 100644 --- a/arch/arm/mach-davinci/sram.c +++ b/arch/arm/mach-davinci/sram.c | |||
@@ -18,6 +18,11 @@ | |||
18 | 18 | ||
19 | static struct gen_pool *sram_pool; | 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 | void *sram_alloc(size_t len, dma_addr_t *dma) | 26 | void *sram_alloc(size_t len, dma_addr_t *dma) |
22 | { | 27 | { |
23 | unsigned long vaddr; | 28 | unsigned long vaddr; |