Merge tag 'gfs2-v6.1-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / include / linux / platform_data / dma-mmp_tdma.h
CommitLineData
d2912cb1 1/* SPDX-License-Identifier: GPL-2.0-only */
3c7241bd 2/*
3c7241bd
LY
3 * SRAM Memory Management
4 *
5 * Copyright (c) 2011 Marvell Semiconductors Inc.
3c7241bd
LY
6 */
7
61310a36
SK
8#ifndef __DMA_MMP_TDMA_H
9#define __DMA_MMP_TDMA_H
3c7241bd
LY
10
11#include <linux/genalloc.h>
12
13/* ARBITRARY: SRAM allocations are multiples of this 2^N size */
14#define SRAM_GRANULARITY 512
15
16enum sram_type {
17 MMP_SRAM_UNDEFINED = 0,
18 MMP_ASRAM,
19 MMP_ISRAM,
20};
21
22struct sram_platdata {
23 char *pool_name;
24 int granularity;
25};
26
93d05f1e 27#ifdef CONFIG_MMP_SRAM
3c7241bd 28extern struct gen_pool *sram_get_gpool(char *pool_name);
09aa8ac0
RH
29#else
30static inline struct gen_pool *sram_get_gpool(char *pool_name)
31{
32 return NULL;
33}
34#endif
3c7241bd 35
61310a36 36#endif /* __DMA_MMP_TDMA_H */