prealloc-calliope.c 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. /*
  2. * Memory pre-allocations for Calliope 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. * NON_DVR_CAPABLE CALLIOPE RESOURCES
  29. */
  30. struct resource non_dvr_calliope_resources[] __initdata =
  31. {
  32. /*
  33. * VIDEO / LX1
  34. */
  35. /* Delta-Mu 1 image (2MiB) */
  36. PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
  37. IORESOURCE_MEM)
  38. /* Delta-Mu 1 monitor (8KiB) */
  39. PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
  40. IORESOURCE_MEM)
  41. /* Delta-Mu 1 RAM (~36.9MiB (32MiB - (2MiB + 8KiB))) */
  42. PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26700000-1,
  43. IORESOURCE_MEM)
  44. /*
  45. * Sysaudio Driver
  46. */
  47. /* DSP code and data images (1MiB) */
  48. PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
  49. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  50. /* ADSC CPU PCM buffer (40KiB) */
  51. PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
  52. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  53. /* ADSC AUX buffer (128KiB) */
  54. PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
  55. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  56. /* ADSC Main buffer (128KiB) */
  57. PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
  58. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  59. /*
  60. * STAVEM driver/STAPI
  61. */
  62. /* 6MiB */
  63. PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
  64. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  65. /*
  66. * DOCSIS Subsystem
  67. */
  68. /* 7MiB */
  69. PREALLOC_DOCSIS("Docsis", 0x27500000, 0x27c00000-1, IORESOURCE_MEM)
  70. /*
  71. * GHW HAL Driver
  72. */
  73. /* PowerTV Graphics Heap (14MiB) */
  74. PREALLOC_NORMAL("GraphicsHeap", 0x26700000, 0x26700000+(14*1048576)-1,
  75. IORESOURCE_MEM)
  76. /*
  77. * multi com buffer area
  78. */
  79. /* 128KiB */
  80. PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
  81. IORESOURCE_MEM)
  82. /*
  83. * DMA Ring buffer (don't need recording buffers)
  84. */
  85. /* 680KiB */
  86. PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
  87. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  88. /*
  89. * Display bins buffer for unit0
  90. */
  91. /* 4KiB */
  92. PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
  93. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  94. /*
  95. * AVFS: player HAL memory
  96. */
  97. /* 945K * 3 for playback */
  98. PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
  99. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  100. /*
  101. * PMEM
  102. */
  103. /* Persistent memory for diagnostics (64KiB) */
  104. PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
  105. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  106. /*
  107. * Smartcard
  108. */
  109. /* Read and write buffers for Internal/External cards (10KiB) */
  110. PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
  111. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  112. /*
  113. * NAND Flash
  114. */
  115. /* 10KiB */
  116. PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
  117. IORESOURCE_MEM)
  118. /*
  119. * Synopsys GMAC Memory Region
  120. */
  121. /* 64KiB */
  122. PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
  123. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  124. /*
  125. * TFTPBuffer
  126. *
  127. * This buffer is used in some minimal configurations (e.g. two-way
  128. * loader) for storing software images
  129. */
  130. PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
  131. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  132. /*
  133. * Add other resources here
  134. */
  135. /*
  136. * End of Resource marker
  137. */
  138. {
  139. .flags = 0,
  140. },
  141. };
  142. struct resource non_dvr_vze_calliope_resources[] __initdata =
  143. {
  144. /*
  145. * VIDEO / LX1
  146. */
  147. /* Delta-Mu 1 image (2MiB) */
  148. PREALLOC_NORMAL("ST231aImage", 0x22000000, 0x22200000-1,
  149. IORESOURCE_MEM)
  150. /* Delta-Mu 1 monitor (8KiB) */
  151. PREALLOC_NORMAL("ST231aMonitor", 0x22200000, 0x22202000-1,
  152. IORESOURCE_MEM)
  153. /* Delta-Mu 1 RAM (10.12MiB) */
  154. PREALLOC_NORMAL("MediaMemory1", 0x22202000, 0x22C20B85-1,
  155. IORESOURCE_MEM)
  156. /*
  157. * Sysaudio Driver
  158. */
  159. /* DSP code and data images (1MiB) */
  160. PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
  161. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  162. /* ADSC CPU PCM buffer (40KiB) */
  163. PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
  164. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  165. /* ADSC AUX buffer (16KiB) */
  166. PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
  167. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  168. /* ADSC Main buffer (16KiB) */
  169. PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
  170. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  171. /*
  172. * STAVEM driver/STAPI
  173. */
  174. /* 3.125MiB */
  175. PREALLOC_NORMAL("AVMEMPartition0", 0x20396000, 0x206B6000-1,
  176. IORESOURCE_MEM)
  177. /*
  178. * GHW HAL Driver
  179. */
  180. /* PowerTV Graphics Heap (2.59MiB) */
  181. PREALLOC_NORMAL("GraphicsHeap", 0x20100000, 0x20396000-1,
  182. IORESOURCE_MEM)
  183. /*
  184. * multi com buffer area
  185. */
  186. /* 128KiB */
  187. PREALLOC_NORMAL("MulticomSHM", 0x206B6000, 0x206D6000-1,
  188. IORESOURCE_MEM)
  189. /*
  190. * DMA Ring buffer (don't need recording buffers)
  191. */
  192. /* 680KiB */
  193. PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
  194. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  195. /*
  196. * Display bins buffer for unit0
  197. */
  198. /* 4KiB */
  199. PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
  200. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  201. /*
  202. * PMEM
  203. */
  204. /* Persistent memory for diagnostics (64KiB) */
  205. PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
  206. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  207. /*
  208. * Smartcard
  209. */
  210. /* Read and write buffers for Internal/External cards (10KiB) */
  211. PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
  212. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  213. /*
  214. * NAND Flash
  215. */
  216. /* 10KiB */
  217. PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
  218. IORESOURCE_MEM)
  219. /*
  220. * Synopsys GMAC Memory Region
  221. */
  222. /* 64KiB */
  223. PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
  224. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  225. /*
  226. * Add other resources here
  227. */
  228. /*
  229. * End of Resource marker
  230. */
  231. {
  232. .flags = 0,
  233. },
  234. };
  235. struct resource non_dvr_vzf_calliope_resources[] __initdata =
  236. {
  237. /*
  238. * VIDEO / LX1
  239. */
  240. /* Delta-Mu 1 image (2MiB) */
  241. PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
  242. IORESOURCE_MEM)
  243. /* Delta-Mu 1 monitor (8KiB) */
  244. PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
  245. IORESOURCE_MEM)
  246. /* Delta-Mu 1 RAM (~19.4 (21.5MiB - (2MiB + 8KiB))) */
  247. PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x25580000-1,
  248. IORESOURCE_MEM)
  249. /*
  250. * Sysaudio Driver
  251. */
  252. /* DSP code and data images (1MiB) */
  253. PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
  254. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  255. /* ADSC CPU PCM buffer (40KiB) */
  256. PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
  257. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  258. /* ADSC AUX buffer (128KiB) */
  259. PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
  260. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  261. /* ADSC Main buffer (128KiB) */
  262. PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
  263. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  264. /*
  265. * STAVEM driver/STAPI
  266. */
  267. /* 4.5MiB */
  268. PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00480000-1,
  269. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  270. /*
  271. * GHW HAL Driver
  272. */
  273. /* PowerTV Graphics Heap (14MiB) */
  274. PREALLOC_NORMAL("GraphicsHeap", 0x25600000, 0x25600000+(14*1048576)-1,
  275. IORESOURCE_MEM)
  276. /*
  277. * multi com buffer area
  278. */
  279. /* 128KiB */
  280. PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
  281. IORESOURCE_MEM)
  282. /*
  283. * DMA Ring buffer (don't need recording buffers)
  284. */
  285. /* 680KiB */
  286. PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
  287. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  288. /*
  289. * Display bins buffer for unit0
  290. */
  291. /* 4KiB */
  292. PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
  293. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  294. /*
  295. * Display bins buffer for unit1
  296. */
  297. /* 4KiB */
  298. PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
  299. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  300. /*
  301. * AVFS: player HAL memory
  302. */
  303. /* 945K * 3 for playback */
  304. PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
  305. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  306. /*
  307. * PMEM
  308. */
  309. /* Persistent memory for diagnostics (64KiB) */
  310. PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
  311. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  312. /*
  313. * Smartcard
  314. */
  315. /* Read and write buffers for Internal/External cards (10KiB) */
  316. PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
  317. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  318. /*
  319. * NAND Flash
  320. */
  321. /* 10KiB */
  322. PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
  323. IORESOURCE_MEM)
  324. /*
  325. * Synopsys GMAC Memory Region
  326. */
  327. /* 64KiB */
  328. PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
  329. (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
  330. /*
  331. * Add other resources here
  332. */
  333. /*
  334. * End of Resource marker
  335. */
  336. {
  337. .flags = 0,
  338. },
  339. };