2019-06-04 11:11:33 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2011-08-15 07:09:52 +04:00
|
|
|
/*
|
|
|
|
* SRAM Memory Management
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011 Marvell Semiconductors Inc.
|
|
|
|
*/
|
|
|
|
|
2013-12-30 09:16:31 +04:00
|
|
|
#ifndef __DMA_MMP_TDMA_H
|
|
|
|
#define __DMA_MMP_TDMA_H
|
2011-08-15 07:09:52 +04:00
|
|
|
|
|
|
|
#include <linux/genalloc.h>
|
|
|
|
|
|
|
|
/* ARBITRARY: SRAM allocations are multiples of this 2^N size */
|
|
|
|
#define SRAM_GRANULARITY 512
|
|
|
|
|
|
|
|
enum sram_type {
|
|
|
|
MMP_SRAM_UNDEFINED = 0,
|
|
|
|
MMP_ASRAM,
|
|
|
|
MMP_ISRAM,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sram_platdata {
|
|
|
|
char *pool_name;
|
|
|
|
int granularity;
|
|
|
|
};
|
|
|
|
|
2016-09-02 13:27:09 +03:00
|
|
|
#ifdef CONFIG_MMP_SRAM
|
2011-08-15 07:09:52 +04:00
|
|
|
extern struct gen_pool *sram_get_gpool(char *pool_name);
|
2015-02-04 02:07:35 +03:00
|
|
|
#else
|
|
|
|
static inline struct gen_pool *sram_get_gpool(char *pool_name)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif
|
2011-08-15 07:09:52 +04:00
|
|
|
|
2013-12-30 09:16:31 +04:00
|
|
|
#endif /* __DMA_MMP_TDMA_H */
|