Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  SRAM Memory Management
0004  *
0005  *  Copyright (c) 2011 Marvell Semiconductors Inc.
0006  */
0007 
0008 #ifndef __DMA_MMP_TDMA_H
0009 #define __DMA_MMP_TDMA_H
0010 
0011 #include <linux/genalloc.h>
0012 
0013 /* ARBITRARY:  SRAM allocations are multiples of this 2^N size */
0014 #define SRAM_GRANULARITY    512
0015 
0016 enum sram_type {
0017     MMP_SRAM_UNDEFINED = 0,
0018     MMP_ASRAM,
0019     MMP_ISRAM,
0020 };
0021 
0022 struct sram_platdata {
0023     char *pool_name;
0024     int granularity;
0025 };
0026 
0027 #ifdef CONFIG_MMP_SRAM
0028 extern struct gen_pool *sram_get_gpool(char *pool_name);
0029 #else
0030 static inline struct gen_pool *sram_get_gpool(char *pool_name)
0031 {
0032     return NULL;
0033 }
0034 #endif
0035 
0036 #endif /* __DMA_MMP_TDMA_H */