/* SPDX-License-Identifier: GPL-2.0-only */1/*2* mach/sram.h - DaVinci simple SRAM allocator3*4* Copyright (C) 2009 David Brownell5*/6#ifndef __MACH_SRAM_H7#define __MACH_SRAM_H89/* ARBITRARY: SRAM allocations are multiples of this 2^N size */10#define SRAM_GRANULARITY 5121112/*13* SRAM allocations return a CPU virtual address, or NULL on error.14* If a DMA address is requested and the SRAM supports DMA, its15* mapped address is also returned.16*17* Errors include SRAM memory not being available, and requesting18* DMA mapped SRAM on systems which don't allow that.19*/20extern void *sram_alloc(size_t len, dma_addr_t *dma);21extern void sram_free(void *addr, size_t len);2223/* Get the struct gen_pool * for use in platform data */24extern struct gen_pool *sram_get_gen_pool(void);2526#endif /* __MACH_SRAM_H */272829