drv_reserve_mmap.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. /**
  2. included by
  3. 1. kernel setup.c
  4. 2. bootrom
  5. **/
  6. #ifndef _DRV_RESERV_MMAP_H_
  7. #define _DRV_RESERV_MMAP_H_
  8. #if (CONFIG_CHIPID == 0x533)
  9. #include "reserve_mmap/drv_reserve_mmap_533.h"
  10. #elif (CONFIG_CHIPID == 0x531)
  11. #include "reserve_mmap/drv_reserve_mmap_531.h"
  12. #elif (CONFIG_CHIPID == 0x331)
  13. #include "reserve_mmap/drv_reserve_mmap_331.h"
  14. #elif (CONFIG_CHIPID == 0x131)
  15. #include "reserve_mmap/drv_reserve_mmap_131.h"
  16. #elif (CONFIG_CHIPID == 0x8506)
  17. #include "reserve_mmap/drv_reserve_mmap_8506.h"
  18. #elif (CONFIG_CHIPID == 0x6710)
  19. #include "reserve_mmap/drv_reserve_mmap_6710.h"
  20. #else
  21. #include "reserve_mmap/drv_reserve_mmap_default.h"
  22. #endif
  23. //DTV_MPEG tiling setting
  24. /*
  25. 0xbe02080c
  26. 00 3a 50 2a
  27. | | `-- start address
  28. | `-- tiling mode
  29. `-- end address
  30. ex: start address 0x05E00000 -> 0x2f (0x5E/2)
  31. end address 0x07C00000 -> 0x3e (0x7C+1)/2
  32. */
  33. #define Tiling_start (RMEM_MPEG_START_ADDR >> 20)/2
  34. #if (CONFIG_CHIPID == 0x533) && defined(CONFIG_SUPPORT_PVR) && (CONFIG_DRAMSIZE ==128)
  35. #define Tiling_end (((RMEM_MPEG_START_ADDR+RMEM_DTV_MPEG)>>20)-0x4)/2
  36. #else
  37. #define Tiling_end (((RMEM_MPEG_START_ADDR+RMEM_DTV_MPEG)>>20))/2
  38. #endif
  39. #define Dram_Tiling_Setting (0x00005000+Tiling_start+(Tiling_end<<16)) //(0x001e6011)
  40. #define Media_Tiling_end (((RMEM_MPEG_START_ADDR+RMEM_DTV_RUNAV)>>20))/2
  41. #define Dram_Media_Tiling_Setting (0x00005000+Tiling_start+(Media_Tiling_end<<16)) //(0x001e6011)
  42. #ifdef CONFIG_SUPPORT_USB_MCAST
  43. #define Net_Tiling_end (((RMEM_MPEG_START_ADDR+RMEM_NET_RUNAV)>>20))/2
  44. #define Dram_Net_Tiling_Setting (0x00005000+Tiling_start+(Net_Tiling_end<<16)) //(0x001e6011)
  45. #endif
  46. #ifndef CONFIG_DRAMSIZE
  47. #define CONFIG_DRAMSIZE 128
  48. #endif
  49. #ifdef CONFIG_BLT_ADD_OSD_COMPRESS_SIZE
  50. #define ADD_OSD_COMPRESS_SIZE CONFIG_BLT_ADD_OSD_COMPRESS_SIZE
  51. #else
  52. #define ADD_OSD_COMPRESS_SIZE 0
  53. #endif
  54. #if defined(CONFIG_SUPPORT_TTX) && defined(CONFIG_TTX_FONT_SIZE_30)
  55. #define RMEM_TT_FONT 0x00045000
  56. #elif defined(CONFIG_SUPPORT_TTX) && defined(CONFIG_TTX_FONT_SIZE_10)
  57. #define RMEM_TT_FONT 0x00019000
  58. #else
  59. #define RMEM_TT_FONT 0x00000000
  60. #endif
  61. #if defined(CONFIG_CC_SUPPORT)
  62. #define RMEM_CC_FONT 0x00053000
  63. #else
  64. #define RMEM_CC_FONT 0x00000000
  65. #endif
  66. #define RMEM_OSDLIB (RMEM_TT_FONT+RMEM_CC_FONT)
  67. #ifdef CONFIG_SUPPORT_PHOTO_TWO_DISPLAY_BUFFER
  68. #define RMEM_VIP_USB 0x00c80000
  69. #else
  70. #define RMEM_VIP_USB 0x00880000
  71. #endif
  72. #ifdef CONFIG_SUPPORT_TCON
  73. #define RMEM_TCON_ADDR 0x01180000
  74. #define RMEM_TCON 0x00180000
  75. #else
  76. #define RMEM_TCON_ADDR 0x00000000
  77. #define RMEM_TCON 0x00000000
  78. #endif
  79. #if defined( CONFIG_DTV_SUPPORT ) || defined(CONFIG_MEDIA_ENABLE)
  80. /*SOURCEID_DTV */
  81. #define RMEM_DTV_AUDIO RMEM_AUDIO
  82. #define RMEM_DTV_OSDLIB RMEM_OSDLIB
  83. #define RMEM_DTV_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  84. #define RMEM_DTV_TCON RMEM_TCON
  85. #define RMEM_DTV_VIP RMEM_VIP
  86. #define RMEM_DTV_VBV RMEM_VBV
  87. #define RMEM_DTV_MPEG RMEM_MPEG
  88. #define RMEM_DTV_DEMOD RMEM_DEMOD
  89. #define RMEM_DTV_PVR RMEM_PVR
  90. #define RMEM_DTV_RUNAV RMEM_MPEG+RMEM_RUNAV
  91. #define RMEM_DTV_POOL RMEM_DEMOD+RMEM_PVR-RMEM_RUNAV
  92. #define RMEM_DTV_SUBTITLE RMEM_PVR
  93. #define RMEM_DTV_MIR RMEM_MIR
  94. #define RMEM_DTV_FREE RMEM_DTV_VIP+RMEM_DTV_VBV+RMEM_DTV_MPEG+RMEM_DTV_DEMOD+RMEM_DTV_PVR
  95. #else
  96. #define RMEM_DTV_AUDIO RMEM_AUDIO
  97. #define RMEM_DTV_OSDLIB RMEM_OSDLIB
  98. #define RMEM_DTV_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  99. #define RMEM_DTV_TCON RMEM_TCON
  100. #define RMEM_DTV_VIP RMEM_VIP
  101. #define RMEM_DTV_FREE RMEM_DTV_VIP
  102. #endif
  103. #if defined( CONFIG_ATV_SUPPORT ) || defined( CONFIG_AV_SUPPORT )
  104. /*SOURCEID_ATV */
  105. #define RMEM_ATV_AUDIO RMEM_AUDIO
  106. #define RMEM_ATV_OSDLIB RMEM_OSDLIB
  107. #define RMEM_ATV_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  108. #define RMEM_ATV_TCON RMEM_TCON
  109. #define RMEM_ATV_CVD2 0x00362000
  110. #define RMEM_ATV_SUBTITLE RMEM_PVR
  111. #define RMEM_ATV_FREE RMEM_DTV_FREE-RMEM_ATV_CVD2-RMEM_ATV_SUBTITLE
  112. #define RMEM_ATV_VIP ADDR_RMEM_ATV_RMRTEST - ADDR_RMEM_ATV_VIP
  113. #define RMEM_ATV_RMRTEST (ADDR_RMEM_ATV_VIP+RMEM_ATV_FREE) - ADDR_RMEM_ATV_RMRTEST
  114. #define RMEM_ATV_MIR RMEM_MIR
  115. #endif
  116. #if defined( CONFIG_HDMI_SUPPORT ) || defined( CONFIG_PC_SUPPORT )
  117. /*SOURCEID_HDMI */
  118. #define RMEM_HDMI_AUDIO RMEM_AUDIO
  119. #define RMEM_HDMI_OSDLIB RMEM_OSDLIB
  120. #define RMEM_HDMI_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  121. #define RMEM_HDMI_TCON RMEM_TCON
  122. #define RMEM_HDMI_VIP RMEM_DTV_FREE
  123. #define RMEM_HDMI_MIR RMEM_MIR
  124. #endif
  125. #ifdef CONFIG_MEDIA_ENABLE
  126. /*SOURCEID_USB */
  127. #define RMEM_USB_AUDIO RMEM_AUDIO
  128. #define RMEM_USB_OSDLIB RMEM_OSDLIB
  129. #define RMEM_USB_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  130. #define RMEM_USB_TCON RMEM_TCON
  131. #define RMEM_USB_POOL RMEM_POOL
  132. #define RMEM_USB_DIO RMEM_DIO
  133. #define RMEM_USB_VIP RMEM_VIP_USB
  134. #define RMEM_USB_JPEG RMEM_DTV_FREE-RMEM_USB_VIP-RMEM_USB_DIO-RMEM_USB_POOL
  135. #define RMEM_USB_MIR RMEM_MIR
  136. #endif
  137. #ifdef CONFIG_COMPONENT_SUPPORT
  138. /*SOURCEID_COMPONENT */
  139. #define RMEM_COMP_AUDIO RMEM_AUDIO
  140. #define RMEM_COMP_OSDLIB RMEM_OSDLIB
  141. #define RMEM_COMP_TCON RMEM_TCON
  142. #define RMEM_COMP_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  143. #define RMEM_COMP_SUBTITLE RMEM_PVR
  144. #define RMEM_COMP_VIP RMEM_DTV_FREE-RMEM_COMP_SUBTITLE
  145. #define RMEM_COMP_MIR RMEM_MIR
  146. #endif
  147. #ifdef CONFIG_SUPPORT_USB_MCAST
  148. /*SOURCEID_NET */
  149. #define RMEM_NET_AUDIO RMEM_AUDIO
  150. #define RMEM_NET_OSDLIB RMEM_OSDLIB
  151. #define RMEM_NET_BLT RMEM_BLT+ADD_OSD_COMPRESS_SIZE
  152. #define RMEM_NET_TCON RMEM_TCON
  153. #define RMEM_NET_VIP RMEM_VIP
  154. #define RMEM_NET_VBV RMEM_VBV
  155. #define RMEM_NET_RUNAV RMEM_MPEG-RMEM_NETRUNAV
  156. #define RMEM_NET_POOL RMEM_NETRUNAV
  157. #define RMEM_NET_MIR RMEM_MIR
  158. #endif
  159. /* auto count address, you don't have to change these */
  160. #if defined( CONFIG_DTV_SUPPORT ) || defined( CONFIG_MEDIA_ENABLE )
  161. /*SOURCEID_DTV */
  162. #define ADDR_RMEM_DTV_TCON RMEM_TCON_ADDR
  163. #define ADDR_RMEM_DTV_AUDIO RMEM_START_ADDR
  164. #define ADDR_RMEM_DTV_OSDLIB (ADDR_RMEM_DTV_AUDIO + RMEM_DTV_AUDIO)
  165. #define ADDR_RMEM_DTV_BLT (ADDR_RMEM_DTV_OSDLIB + RMEM_DTV_OSDLIB)
  166. #define ADDR_RMEM_DTV_VIP (ADDR_RMEM_DTV_BLT + RMEM_DTV_BLT)
  167. #define ADDR_RMEM_DTV_VBV (ADDR_RMEM_DTV_VIP + RMEM_DTV_VIP)
  168. #define ADDR_RMEM_DTV_MPEG (ADDR_RMEM_DTV_VBV + RMEM_DTV_VBV)
  169. #define ADDR_RMEM_DTV_RUNAV (ADDR_RMEM_DTV_VBV + RMEM_DTV_VBV)
  170. #define ADDR_RMEM_DTV_DEMOD (ADDR_RMEM_DTV_MPEG + RMEM_DTV_MPEG)
  171. #define ADDR_RMEM_DTV_POOL (ADDR_RMEM_DTV_MPEG + RMEM_DTV_RUNAV)
  172. #define ADDR_RMEM_DTV_PVR (ADDR_RMEM_DTV_DEMOD + RMEM_DTV_DEMOD)
  173. #define ADDR_RMEM_DTV_SUBTITLE (ADDR_RMEM_DTV_DEMOD + RMEM_DTV_DEMOD)
  174. #ifdef CONFIG_ENABLE_MIR
  175. #define ADDR_RMEM_DTV_MIR (ADDR_RMEM_DTV_PVR + RMEM_DTV_PVR)
  176. #endif
  177. #endif
  178. #if defined( CONFIG_ATV_SUPPORT ) || defined( CONFIG_AV_SUPPORT )
  179. /*SOURCEID_ATV */
  180. #define ADDR_RMEM_ATV_TCON RMEM_TCON_ADDR
  181. #define ADDR_RMEM_ATV_AUDIO RMEM_START_ADDR
  182. #define ADDR_RMEM_ATV_OSDLIB (ADDR_RMEM_ATV_AUDIO + RMEM_ATV_AUDIO)
  183. #define ADDR_RMEM_ATV_BLT (ADDR_RMEM_ATV_OSDLIB + RMEM_ATV_OSDLIB)
  184. #define ADDR_RMEM_ATV_CVD2 (ADDR_RMEM_ATV_BLT + RMEM_ATV_BLT)
  185. #define ADDR_RMEM_ATV_SUBTITLE (ADDR_RMEM_ATV_CVD2 + RMEM_ATV_CVD2)
  186. #define ADDR_RMEM_ATV_VIP (ADDR_RMEM_ATV_SUBTITLE + RMEM_ATV_SUBTITLE)
  187. #define ADDR_RMEM_ATV_RMRTEST ((ADDR_RMEM_ATV_VIP+RMEM_ATV_FREE-RMEM_RMRTEST)&0xFFF00000)
  188. #ifdef CONFIG_ENABLE_MIR
  189. #define ADDR_RMEM_ATV_MIR (ADDR_RMEM_ATV_RMRTEST + RMEM_ATV_RMRTEST)
  190. #endif
  191. #endif
  192. #if defined( CONFIG_HDMI_SUPPORT ) || defined( CONFIG_PC_SUPPORT )
  193. /*SOURCEID_HDMI */
  194. #define ADDR_RMEM_HDMI_TCON RMEM_TCON_ADDR
  195. #define ADDR_RMEM_HDMI_AUDIO RMEM_START_ADDR
  196. #define ADDR_RMEM_HDMI_OSDLIB (ADDR_RMEM_HDMI_AUDIO + RMEM_HDMI_AUDIO)
  197. #define ADDR_RMEM_HDMI_BLT (ADDR_RMEM_HDMI_OSDLIB + RMEM_HDMI_OSDLIB)
  198. #define ADDR_RMEM_HDMI_VIP (ADDR_RMEM_HDMI_BLT + RMEM_HDMI_BLT)
  199. #ifdef CONFIG_ENABLE_MIR
  200. #define ADDR_RMEM_HDMI_MIR (ADDR_RMEM_HDMI_VIP + RMEM_HDMI_VIP)
  201. #endif
  202. #endif
  203. #ifdef CONFIG_MEDIA_ENABLE
  204. /*SOURCEID_USB */
  205. #define ADDR_RMEM_USB_TCON RMEM_TCON_ADDR
  206. #define ADDR_RMEM_USB_AUDIO RMEM_START_ADDR
  207. #define ADDR_RMEM_USB_OSDLIB (ADDR_RMEM_USB_AUDIO + RMEM_USB_AUDIO)
  208. #define ADDR_RMEM_USB_BLT (ADDR_RMEM_USB_OSDLIB + RMEM_USB_OSDLIB)
  209. #define ADDR_RMEM_USB_POOL (ADDR_RMEM_USB_BLT + RMEM_USB_BLT)
  210. #define ADDR_RMEM_USB_DIO (ADDR_RMEM_USB_POOL + RMEM_USB_POOL)
  211. #define ADDR_RMEM_USB_VIP (ADDR_RMEM_USB_DIO + RMEM_USB_DIO)
  212. #define ADDR_RMEM_USB_JPEG (ADDR_RMEM_USB_VIP + RMEM_USB_VIP)
  213. #ifdef CONFIG_ENABLE_MIR
  214. #define ADDR_RMEM_USB_MIR (ADDR_RMEM_USB_JPEG + RMEM_USB_JPEG)
  215. #endif
  216. #endif
  217. #ifdef CONFIG_COMPONENT_SUPPORT
  218. /*SOURCEID_COMPONENT */
  219. #define ADDR_RMEM_COMP_TCON RMEM_TCON_ADDR
  220. #define ADDR_RMEM_COMP_AUDIO RMEM_START_ADDR
  221. #define ADDR_RMEM_COMP_OSDLIB (ADDR_RMEM_COMP_AUDIO + RMEM_COMP_AUDIO)
  222. #define ADDR_RMEM_COMP_BLT (ADDR_RMEM_COMP_OSDLIB + RMEM_COMP_OSDLIB)
  223. #define ADDR_RMEM_COMP_SUBTITLE (ADDR_RMEM_COMP_BLT + RMEM_COMP_BLT)
  224. #define ADDR_RMEM_COMP_VIP (ADDR_RMEM_COMP_SUBTITLE+ RMEM_COMP_SUBTITLE)
  225. #ifdef CONFIG_ENABLE_MIR
  226. #define ADDR_RMEM_COMP_MIR (ADDR_RMEM_COMP_VIP + RMEM_COMP_VIP)
  227. #endif
  228. #endif
  229. #ifdef CONFIG_SUPPORT_USB_MCAST
  230. /*SOURCEID_NET */
  231. #define ADDR_RMEM_NET_TCON RMEM_TCON_ADDR
  232. #define ADDR_RMEM_NET_AUDIO RMEM_START_ADDR
  233. #define ADDR_RMEM_NET_OSDLIB (ADDR_RMEM_NET_AUDIO + RMEM_NET_AUDIO)
  234. #define ADDR_RMEM_NET_BLT (ADDR_RMEM_NET_OSDLIB + RMEM_NET_OSDLIB)
  235. #define ADDR_RMEM_NET_VIP (ADDR_RMEM_NET_BLT + RMEM_NET_BLT)
  236. #define ADDR_RMEM_NET_VBV (ADDR_RMEM_NET_VIP + RMEM_NET_VIP)
  237. #define ADDR_RMEM_NET_RUNAV (ADDR_RMEM_NET_VBV + RMEM_NET_VBV)
  238. #define ADDR_RMEM_NET_POOL (ADDR_RMEM_NET_RUNAV + RMEM_NET_RUNAV)
  239. #ifdef CONFIG_ENABLE_MIR
  240. #define ADDR_RMEM_NET_MIR (ADDR_RMEM_NET_POOL + RMEM_NET_POOL)
  241. #endif
  242. #endif
  243. #endif // _DRV_RESERV_MMAP_H_