dma-mmp_tdma.h 794 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * SRAM Memory Management
  3. *
  4. * Copyright (c) 2011 Marvell Semiconductors Inc.
  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. */
  11. #ifndef __DMA_MMP_TDMA_H
  12. #define __DMA_MMP_TDMA_H
  13. #include <linux/genalloc.h>
  14. /* ARBITRARY: SRAM allocations are multiples of this 2^N size */
  15. #define SRAM_GRANULARITY 512
  16. enum sram_type {
  17. MMP_SRAM_UNDEFINED = 0,
  18. MMP_ASRAM,
  19. MMP_ISRAM,
  20. };
  21. struct sram_platdata {
  22. char *pool_name;
  23. int granularity;
  24. };
  25. #ifdef CONFIG_ARM
  26. extern struct gen_pool *sram_get_gpool(char *pool_name);
  27. #else
  28. static inline struct gen_pool *sram_get_gpool(char *pool_name)
  29. {
  30. return NULL;
  31. }
  32. #endif
  33. #endif /* __DMA_MMP_TDMA_H */