fsl_85xx_cache_sram.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright 2009 Freescale Semiconductor, Inc.
  3. *
  4. * Cache SRAM handling for QorIQ platform
  5. *
  6. * Author: Vivek Mahajan <vivek.mahajan@freescale.com>
  7. * This file is derived from the original work done
  8. * by Sylvain Munaut for the Bestcomm SRAM allocator.
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. #ifndef __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__
  25. #define __ASM_POWERPC_FSL_85XX_CACHE_SRAM_H__
  26. #include <asm/rheap.h>
  27. #include <linux/spinlock.h>
  28. /*
  29. * Cache-SRAM
  30. */
  31. struct mpc85xx_cache_sram {
  32. phys_addr_t base_phys;
  33. void *base_virt;
  34. unsigned int size;
  35. rh_info_t *rh;
  36. spinlock_t lock;
  37. };
  38. extern void mpc85xx_cache_sram_free(void *ptr);
  39. extern void *mpc85xx_cache_sram_alloc(unsigned int size,
  40. phys_addr_t *phys, unsigned int align);
  41. #endif /* __AMS_POWERPC_FSL_85XX_CACHE_SRAM_H__ */