board-8626m-refc02.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef __BOARD_8626M_H
  2. #define __BOARD_8626M_H
  3. #include <asm/page.h>
  4. #define PHYS_MEM_START (0x80000000)
  5. #define PHYS_MEM_SIZE (256*SZ_1M)
  6. #define PHYS_MEM_END (PHYS_MEM_START + PHYS_MEM_SIZE -1 )
  7. /******** Reserved memory setting ************************/
  8. #define RESERVED_MEM_START (0x80000000+64*SZ_1M) /*start at the second 64M */
  9. /******** CODEC memory setting ************************/
  10. // Codec need 16M for 1080p decode
  11. // 4M for sd decode;
  12. #define ALIGN_MSK ((SZ_1M)-1)
  13. #define U_ALIGN(x) ((x+ALIGN_MSK)&(~ALIGN_MSK))
  14. #define D_ALIGN(x) ((x)&(~ALIGN_MSK))
  15. /******** AUDIODSP memory setting ************************/
  16. #define AUDIODSP_ADDR_START U_ALIGN(RESERVED_MEM_START) /*audiodsp memstart */
  17. #define AUDIODSP_ADDR_END (AUDIODSP_ADDR_START+SZ_1M-1) /*audiodsp memend */
  18. /******** Frame buffer memory configuration ***********/
  19. #define OSD_480_PIX (640*480)
  20. #define OSD_576_PIX (768*576)
  21. #define OSD_720_PIX (1280*720)
  22. #define OSD_1080_PIX (1920*1080)
  23. #define B16BpP (2)
  24. #define B32BpP (4)
  25. #define DOUBLE_BUFFER (2)
  26. #define OSD1_MAX_MEM U_ALIGN(OSD_1080_PIX*B32BpP*DOUBLE_BUFFER)
  27. #define OSD2_MAX_MEM U_ALIGN(640*480*B32BpP)
  28. /******** Reserved memory configuration ***************/
  29. #define OSD1_ADDR_START U_ALIGN(AUDIODSP_ADDR_END )
  30. #define OSD1_ADDR_END (OSD1_ADDR_START+OSD1_MAX_MEM - 1)
  31. #define OSD2_ADDR_START U_ALIGN(OSD1_ADDR_END)
  32. #define OSD2_ADDR_END (OSD2_ADDR_START+OSD2_MAX_MEM -1)
  33. #if defined(CONFIG_AM_VDEC_H264)
  34. #define CODEC_MEM_SIZE U_ALIGN(32*SZ_1M)
  35. #else
  36. #define CODEC_MEM_SIZE U_ALIGN(16*SZ_1M)
  37. #endif
  38. #define CODEC_ADDR_START U_ALIGN(OSD2_ADDR_END)
  39. #define CODEC_ADDR_END (CODEC_ADDR_START+CODEC_MEM_SIZE-1)
  40. /********VDIN memory configuration ***************/
  41. #define VDIN_ADDR_START U_ALIGN(OSD2_ADDR_END)
  42. #define VDIN_ADDR_END (VDIN_ADDR_START +CODEC_MEM_SIZE -1)
  43. #if defined(CONFIG_AM_DEINTERLACE_SD_ONLY)
  44. #define DI_MEM_SIZE (SZ_1M*3)
  45. #else
  46. #define DI_MEM_SIZE (SZ_1M*15)
  47. #endif
  48. #define DI_ADDR_START U_ALIGN(CODEC_ADDR_END)
  49. #define DI_ADDR_END (DI_ADDR_START+DI_MEM_SIZE-1)
  50. #define STREAMBUF_MEM_SIZE (SZ_1M*7)
  51. #define STREAMBUF_ADDR_START U_ALIGN(DI_ADDR_END)
  52. #define STREAMBUF_ADDR_END (STREAMBUF_ADDR_START+STREAMBUF_MEM_SIZE-1)
  53. #define RESERVED_MEM_END (STREAMBUF_ADDR_END)
  54. #endif