prealloc-zeus.c 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /*
  2. * Memory pre-allocations for Zeus boxes.
  3. *
  4. * Copyright (C) 2005-2009 Scientific-Atlanta, 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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. *
  20. * Author: Ken Eppinett
  21. * David Schleef <ds@schleef.org>
  22. */
  23. #include <linux/init.h>
  24. #include <linux/ioport.h>
  25. #include <asm/mach-powertv/asic.h>
  26. #include "prealloc.h"
  27. /*
  28. * DVR_CAPABLE RESOURCES
  29. */
  30. struct resource dvr_zeus_resources[] __initdata =
  31. {
  32. /*
  33. * VIDEO1 / LX1
  34. */
  35. /* Delta-Mu 1 image (2MiB) */
  36. PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
  37. IORESOURCE_MEM)
  38. /* Delta-Mu 1 monitor (8KiB) */
  39. PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
  40. IORESOURCE_MEM)
  41. /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
  42. PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
  43. IORESOURCE_MEM)
  44. /*
  45. * VIDEO2 / LX2
  46. */
  47. /* Delta-Mu 2 image (2MiB) */
  48. PREALLOC_NORMAL("ST231bImage", 0x30000000, 0x30200000-1,
  49. IORESOURCE_MEM)
  50. /* Delta-Mu 2 monitor (8KiB) */
  51. PREALLOC_NORMAL("ST231bMonitor", 0x30200000, 0x30202000-1,
  52. IORESOURCE_MEM)
  53. /* Delta-Mu 2 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
  54. PREALLOC_NORMAL("MediaMemory2", 0x30202000, 0x32000000-1,
  55. IORESOURCE_MEM)
  56. /*
  57. * Sysaudio Driver
  58. */
  59. /* DSP code and data images (1MiB) */
  60. PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
  61. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  62. /* ADSC CPU PCM buffer (40KiB) */
  63. PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
  64. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  65. /* ADSC AUX buffer (16KiB) */
  66. PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
  67. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  68. /* ADSC Main buffer (16KiB) */
  69. PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
  70. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  71. /*
  72. * STAVEM driver/STAPI
  73. *
  74. * This memory area is used for allocating buffers for Video decoding
  75. * purposes. Allocation/De-allocation within this buffer is managed
  76. * by the STAVMEM driver of the STAPI. They could be Decimated
  77. * Picture Buffers, Intermediate Buffers, as deemed necessary for
  78. * video decoding purposes, for any video decoders on Zeus.
  79. */
  80. /* 12MiB */
  81. PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00c00000-1,
  82. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  83. /*
  84. * DOCSIS Subsystem
  85. */
  86. /* 7MiB */
  87. PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
  88. /*
  89. * GHW HAL Driver
  90. */
  91. /* PowerTV Graphics Heap (14MiB) */
  92. PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
  93. IORESOURCE_MEM)
  94. /*
  95. * multi com buffer area
  96. */
  97. /* 128KiB */
  98. PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
  99. IORESOURCE_MEM)
  100. /*
  101. * DMA Ring buffer
  102. */
  103. /* 2.5MiB */
  104. PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
  105. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  106. /*
  107. * Display bins buffer for unit0
  108. */
  109. /* 4KiB */
  110. PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
  111. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  112. /*
  113. * Display bins buffer for unit1
  114. */
  115. /* 4KiB */
  116. PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
  117. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  118. /*
  119. * ITFS
  120. */
  121. /* 815,104 bytes each for 2 ITFS partitions. */
  122. PREALLOC_NORMAL("ITFS", 0x00000000, 0x0018E000-1,
  123. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  124. /*
  125. * AVFS
  126. */
  127. /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
  128. PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x007c2000-1,
  129. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  130. /* 4KiB */
  131. PREALLOC_NORMAL("AvfsFileSys", 0x00000000, 0x00001000-1,
  132. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  133. /*
  134. * PMEM
  135. */
  136. /* Persistent memory for diagnostics (64KiB) */
  137. PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
  138. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  139. /*
  140. * Smartcard
  141. */
  142. /* Read and write buffers for Internal/External cards (10KiB) */
  143. PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
  144. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  145. /*
  146. * TFTPBuffer
  147. *
  148. * This buffer is used in some minimal configurations (e.g. two-way
  149. * loader) for storing software images
  150. */
  151. PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
  152. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  153. /*
  154. * Add other resources here
  155. */
  156. /*
  157. * End of Resource marker
  158. */
  159. {
  160. .flags = 0,
  161. },
  162. };
  163. /*
  164. * NON_DVR_CAPABLE ZEUS RESOURCES
  165. */
  166. struct resource non_dvr_zeus_resources[] __initdata =
  167. {
  168. /*
  169. * VIDEO1 / LX1
  170. */
  171. /* Delta-Mu 1 image (2MiB) */
  172. PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
  173. IORESOURCE_MEM)
  174. /* Delta-Mu 1 monitor (8KiB) */
  175. PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
  176. IORESOURCE_MEM)
  177. /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
  178. PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
  179. IORESOURCE_MEM)
  180. /*
  181. * Sysaudio Driver
  182. */
  183. /* DSP code and data images (1MiB) */
  184. PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
  185. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  186. /* ADSC CPU PCM buffer (40KiB) */
  187. PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
  188. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  189. /* ADSC AUX buffer (16KiB) */
  190. PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
  191. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  192. /* ADSC Main buffer (16KiB) */
  193. PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
  194. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  195. /*
  196. * STAVEM driver/STAPI
  197. */
  198. /* 6MiB */
  199. PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
  200. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  201. /*
  202. * DOCSIS Subsystem
  203. */
  204. /* 7MiB */
  205. PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
  206. /*
  207. * GHW HAL Driver
  208. */
  209. /* PowerTV Graphics Heap (14MiB) */
  210. PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
  211. IORESOURCE_MEM)
  212. /*
  213. * multi com buffer area
  214. */
  215. /* 128KiB */
  216. PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
  217. IORESOURCE_MEM)
  218. /*
  219. * DMA Ring buffer
  220. */
  221. /* 2.5MiB */
  222. PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
  223. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  224. /*
  225. * Display bins buffer for unit0
  226. */
  227. /* 4KiB */
  228. PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
  229. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  230. /*
  231. * AVFS: player HAL memory
  232. */
  233. /* 945K * 3 for playback */
  234. PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
  235. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  236. /*
  237. * PMEM
  238. */
  239. /* Persistent memory for diagnostics (64KiB) */
  240. PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
  241. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  242. /*
  243. * Smartcard
  244. */
  245. /* Read and write buffers for Internal/External cards (10KiB) */
  246. PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
  247. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  248. /*
  249. * NAND Flash
  250. */
  251. /* 10KiB */
  252. PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
  253. IORESOURCE_MEM)
  254. /*
  255. * TFTPBuffer
  256. *
  257. * This buffer is used in some minimal configurations (e.g. two-way
  258. * loader) for storing software images
  259. */
  260. PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
  261. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  262. /*
  263. * Add other resources here
  264. */
  265. /*
  266. * End of Resource marker
  267. */
  268. {
  269. .flags = 0,
  270. },
  271. };