Path: blob/master/arch/arm/mach-davinci/include/mach/sram.h
17628 views
/*1* mach/sram.h - DaVinci simple SRAM allocator2*3* Copyright (C) 2009 David Brownell4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#ifndef __MACH_SRAM_H10#define __MACH_SRAM_H1112/* ARBITRARY: SRAM allocations are multiples of this 2^N size */13#define SRAM_GRANULARITY 5121415/*16* SRAM allocations return a CPU virtual address, or NULL on error.17* If a DMA address is requested and the SRAM supports DMA, its18* mapped address is also returned.19*20* Errors include SRAM memory not being available, and requesting21* DMA mapped SRAM on systems which don't allow that.22*/23extern void *sram_alloc(size_t len, dma_addr_t *dma);24extern void sram_free(void *addr, size_t len);2526#endif /* __MACH_SRAM_H */272829