Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 983c42ba authored by Matt Porter's avatar Matt Porter Committed by Sekhar Nori
Browse files

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: default avatarMatt Porter <mporter@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent c94472d4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 */
+5 −0
Original line number Diff line number Diff line
@@ -18,6 +18,11 @@

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;