]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - arch/arm/mach-davinci/sram.h
Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[mirror_ubuntu-hirsute-kernel.git] / arch / arm / mach-davinci / sram.h
CommitLineData
20e9969b
DB
1/*
2 * mach/sram.h - DaVinci simple SRAM allocator
3 *
4 * Copyright (C) 2009 David Brownell
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __MACH_SRAM_H
11#define __MACH_SRAM_H
12
13/* ARBITRARY: SRAM allocations are multiples of this 2^N size */
14#define SRAM_GRANULARITY 512
15
16/*
17 * SRAM allocations return a CPU virtual address, or NULL on error.
18 * If a DMA address is requested and the SRAM supports DMA, its
19 * mapped address is also returned.
20 *
21 * Errors include SRAM memory not being available, and requesting
22 * DMA mapped SRAM on systems which don't allow that.
23 */
24extern void *sram_alloc(size_t len, dma_addr_t *dma);
25extern void sram_free(void *addr, size_t len);
26
983c42ba
MP
27/* Get the struct gen_pool * for use in platform data */
28extern struct gen_pool *sram_get_gen_pool(void);
29
20e9969b 30#endif /* __MACH_SRAM_H */