common.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * linux/arch/arm/plat-omap/common.c
  3. *
  4. * Code common to all OMAP machines.
  5. * The file is created by Tony Lindgren <tony@atomide.com>
  6. *
  7. * Copyright (C) 2009 Texas Instruments
  8. * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/io.h>
  17. #include <linux/dma-mapping.h>
  18. #include <plat/common.h>
  19. #include <plat/vram.h>
  20. #include <plat/dsp.h>
  21. #include <plat/dma.h>
  22. #include <plat/omap-secure.h>
  23. void __init omap_reserve(void)
  24. {
  25. omap_vram_reserve_sdram_memblock();
  26. omap_dsp_reserve_sdram_memblock();
  27. omap_secure_ram_reserve_memblock();
  28. omap_barrier_reserve_memblock();
  29. }
  30. void __init omap_init_consistent_dma_size(void)
  31. {
  32. #ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
  33. init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
  34. #endif
  35. }
  36. /*
  37. * Stub function for OMAP2 so that common files
  38. * continue to build when custom builds are used
  39. */
  40. int __weak omap_secure_ram_reserve_memblock(void)
  41. {
  42. return 0;
  43. }