prealloc-zeus.c 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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 <asm/mach-powertv/asic.h>
  25. /*
  26. * DVR_CAPABLE RESOURCES
  27. */
  28. struct resource dvr_zeus_resources[] __initdata =
  29. {
  30. /*
  31. *
  32. * VIDEO1 / LX1
  33. *
  34. */
  35. {
  36. .name = "ST231aImage", /* Delta-Mu 1 image and ram */
  37. .start = 0x20000000,
  38. .end = 0x201FFFFF, /* 2MiB */
  39. .flags = IORESOURCE_IO,
  40. },
  41. {
  42. .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
  43. .start = 0x20200000,
  44. .end = 0x20201FFF,
  45. .flags = IORESOURCE_IO,
  46. },
  47. {
  48. .name = "MediaMemory1",
  49. .start = 0x20202000,
  50. .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  51. .flags = IORESOURCE_IO,
  52. },
  53. /*
  54. *
  55. * VIDEO2 / LX2
  56. *
  57. */
  58. {
  59. .name = "ST231bImage", /* Delta-Mu 2 image and ram */
  60. .start = 0x30000000,
  61. .end = 0x301FFFFF, /* 2MiB */
  62. .flags = IORESOURCE_IO,
  63. },
  64. {
  65. .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
  66. .start = 0x30200000,
  67. .end = 0x30201FFF,
  68. .flags = IORESOURCE_IO,
  69. },
  70. {
  71. .name = "MediaMemory2",
  72. .start = 0x30202000,
  73. .end = 0x31FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  74. .flags = IORESOURCE_IO,
  75. },
  76. /*
  77. *
  78. * Sysaudio Driver
  79. *
  80. * This driver requires:
  81. *
  82. * Arbitrary Based Buffers:
  83. * DSP_Image_Buff - DSP code and data images (1MB)
  84. * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
  85. * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
  86. * ADSC_Main_Buff - ADSC Main buffer (16KB)
  87. *
  88. */
  89. {
  90. .name = "DSP_Image_Buff",
  91. .start = 0x00000000,
  92. .end = 0x000FFFFF,
  93. .flags = IORESOURCE_MEM,
  94. },
  95. {
  96. .name = "ADSC_CPU_PCM_Buff",
  97. .start = 0x00000000,
  98. .end = 0x00009FFF,
  99. .flags = IORESOURCE_MEM,
  100. },
  101. {
  102. .name = "ADSC_AUX_Buff",
  103. .start = 0x00000000,
  104. .end = 0x00003FFF,
  105. .flags = IORESOURCE_MEM,
  106. },
  107. {
  108. .name = "ADSC_Main_Buff",
  109. .start = 0x00000000,
  110. .end = 0x00003FFF,
  111. .flags = IORESOURCE_MEM,
  112. },
  113. /*
  114. *
  115. * STAVEM driver/STAPI
  116. *
  117. * This driver requires:
  118. *
  119. * Arbitrary Based Buffers:
  120. * This memory area is used for allocating buffers for Video decoding
  121. * purposes. Allocation/De-allocation within this buffer is managed
  122. * by the STAVMEM driver of the STAPI. They could be Decimated
  123. * Picture Buffers, Intermediate Buffers, as deemed necessary for
  124. * video decoding purposes, for any video decoders on Zeus.
  125. *
  126. */
  127. {
  128. .name = "AVMEMPartition0",
  129. .start = 0x00000000,
  130. .end = 0x00c00000 - 1, /* 12 MB total */
  131. .flags = IORESOURCE_MEM,
  132. },
  133. /*
  134. *
  135. * DOCSIS Subsystem
  136. *
  137. * This driver requires:
  138. *
  139. * Arbitrary Based Buffers:
  140. * Docsis -
  141. *
  142. */
  143. {
  144. .name = "Docsis",
  145. .start = 0x40100000,
  146. .end = 0x407fffff,
  147. .flags = IORESOURCE_MEM,
  148. },
  149. /*
  150. *
  151. * GHW HAL Driver
  152. *
  153. * This driver requires:
  154. *
  155. * Arbitrary Based Buffers:
  156. * GraphicsHeap - PowerTV Graphics Heap
  157. *
  158. */
  159. {
  160. .name = "GraphicsHeap",
  161. .start = 0x46900000,
  162. .end = 0x47700000 - 1, /* 14 MB total */
  163. .flags = IORESOURCE_MEM,
  164. },
  165. /*
  166. *
  167. * multi com buffer area
  168. *
  169. * This driver requires:
  170. *
  171. * Arbitrary Based Buffers:
  172. * Docsis -
  173. *
  174. */
  175. {
  176. .name = "MulticomSHM",
  177. .start = 0x47900000,
  178. .end = 0x47920000 - 1,
  179. .flags = IORESOURCE_MEM,
  180. },
  181. /*
  182. *
  183. * DMA Ring buffer
  184. *
  185. * This driver requires:
  186. *
  187. * Arbitrary Based Buffers:
  188. * Docsis -
  189. *
  190. */
  191. {
  192. .name = "BMM_Buffer",
  193. .start = 0x00000000,
  194. .end = 0x00280000 - 1,
  195. .flags = IORESOURCE_MEM,
  196. },
  197. /*
  198. *
  199. * Display bins buffer for unit0
  200. *
  201. * This driver requires:
  202. *
  203. * Arbitrary Based Buffers:
  204. * Display Bins for unit0
  205. *
  206. */
  207. {
  208. .name = "DisplayBins0",
  209. .start = 0x00000000,
  210. .end = 0x00000FFF, /* 4 KB total */
  211. .flags = IORESOURCE_MEM,
  212. },
  213. /*
  214. *
  215. * Display bins buffer
  216. *
  217. * This driver requires:
  218. *
  219. * Arbitrary Based Buffers:
  220. * Display Bins for unit1
  221. *
  222. */
  223. {
  224. .name = "DisplayBins1",
  225. .start = 0x00000000,
  226. .end = 0x00000FFF, /* 4 KB total */
  227. .flags = IORESOURCE_MEM,
  228. },
  229. /*
  230. *
  231. * ITFS
  232. *
  233. * This driver requires:
  234. *
  235. * Arbitrary Based Buffers:
  236. * Docsis -
  237. *
  238. */
  239. {
  240. .name = "ITFS",
  241. .start = 0x00000000,
  242. /* 815,104 bytes each for 2 ITFS partitions. */
  243. .end = 0x0018DFFF,
  244. .flags = IORESOURCE_MEM,
  245. },
  246. /*
  247. *
  248. * AVFS
  249. *
  250. * This driver requires:
  251. *
  252. * Arbitrary Based Buffers:
  253. * Docsis -
  254. *
  255. */
  256. {
  257. .name = "AvfsDmaMem",
  258. .start = 0x00000000,
  259. /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
  260. .end = 0x007c2000 - 1,
  261. .flags = IORESOURCE_MEM,
  262. },
  263. {
  264. .name = "AvfsFileSys",
  265. .start = 0x00000000,
  266. .end = 0x00001000 - 1, /* 4K */
  267. .flags = IORESOURCE_MEM,
  268. },
  269. /*
  270. *
  271. * PMEM
  272. *
  273. * This driver requires:
  274. *
  275. * Arbitrary Based Buffers:
  276. * Persistent memory for diagnostics.
  277. *
  278. */
  279. {
  280. .name = "DiagPersistentMemory",
  281. .start = 0x00000000,
  282. .end = 0x10000 - 1,
  283. .flags = IORESOURCE_MEM,
  284. },
  285. /*
  286. *
  287. * Smartcard
  288. *
  289. * This driver requires:
  290. *
  291. * Arbitrary Based Buffers:
  292. * Read and write buffers for Internal/External cards
  293. *
  294. */
  295. {
  296. .name = "SmartCardInfo",
  297. .start = 0x00000000,
  298. .end = 0x2800 - 1,
  299. .flags = IORESOURCE_MEM,
  300. },
  301. /*
  302. * Add other resources here
  303. */
  304. { },
  305. };
  306. /*
  307. * NON_DVR_CAPABLE ZEUS RESOURCES
  308. */
  309. struct resource non_dvr_zeus_resources[] __initdata =
  310. {
  311. /*
  312. * VIDEO1 / LX1
  313. */
  314. {
  315. .name = "ST231aImage", /* Delta-Mu 1 image and ram */
  316. .start = 0x20000000,
  317. .end = 0x201FFFFF, /* 2MiB */
  318. .flags = IORESOURCE_IO,
  319. },
  320. {
  321. .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
  322. .start = 0x20200000,
  323. .end = 0x20201FFF,
  324. .flags = IORESOURCE_IO,
  325. },
  326. {
  327. .name = "MediaMemory1",
  328. .start = 0x20202000,
  329. .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  330. .flags = IORESOURCE_IO,
  331. },
  332. /*
  333. * Sysaudio Driver
  334. */
  335. {
  336. .name = "DSP_Image_Buff",
  337. .start = 0x00000000,
  338. .end = 0x000FFFFF,
  339. .flags = IORESOURCE_MEM,
  340. },
  341. {
  342. .name = "ADSC_CPU_PCM_Buff",
  343. .start = 0x00000000,
  344. .end = 0x00009FFF,
  345. .flags = IORESOURCE_MEM,
  346. },
  347. {
  348. .name = "ADSC_AUX_Buff",
  349. .start = 0x00000000,
  350. .end = 0x00003FFF,
  351. .flags = IORESOURCE_MEM,
  352. },
  353. {
  354. .name = "ADSC_Main_Buff",
  355. .start = 0x00000000,
  356. .end = 0x00003FFF,
  357. .flags = IORESOURCE_MEM,
  358. },
  359. /*
  360. * STAVEM driver/STAPI
  361. */
  362. {
  363. .name = "AVMEMPartition0",
  364. .start = 0x00000000,
  365. .end = 0x00600000 - 1, /* 6 MB total */
  366. .flags = IORESOURCE_MEM,
  367. },
  368. /*
  369. * DOCSIS Subsystem
  370. */
  371. {
  372. .name = "Docsis",
  373. .start = 0x40100000,
  374. .end = 0x407fffff,
  375. .flags = IORESOURCE_MEM,
  376. },
  377. /*
  378. * GHW HAL Driver
  379. */
  380. {
  381. .name = "GraphicsHeap",
  382. .start = 0x46900000,
  383. .end = 0x47700000 - 1, /* 14 MB total */
  384. .flags = IORESOURCE_MEM,
  385. },
  386. /*
  387. * multi com buffer area
  388. */
  389. {
  390. .name = "MulticomSHM",
  391. .start = 0x47900000,
  392. .end = 0x47920000 - 1,
  393. .flags = IORESOURCE_MEM,
  394. },
  395. /*
  396. * DMA Ring buffer
  397. */
  398. {
  399. .name = "BMM_Buffer",
  400. .start = 0x00000000,
  401. .end = 0x00280000 - 1,
  402. .flags = IORESOURCE_MEM,
  403. },
  404. /*
  405. * Display bins buffer for unit0
  406. */
  407. {
  408. .name = "DisplayBins0",
  409. .start = 0x00000000,
  410. .end = 0x00000FFF, /* 4 KB total */
  411. .flags = IORESOURCE_MEM,
  412. },
  413. /*
  414. *
  415. * AVFS: player HAL memory
  416. *
  417. *
  418. */
  419. {
  420. .name = "AvfsDmaMem",
  421. .start = 0x00000000,
  422. .end = 0x002c4c00 - 1, /* 945K * 3 for playback */
  423. .flags = IORESOURCE_MEM,
  424. },
  425. /*
  426. * PMEM
  427. */
  428. {
  429. .name = "DiagPersistentMemory",
  430. .start = 0x00000000,
  431. .end = 0x10000 - 1,
  432. .flags = IORESOURCE_MEM,
  433. },
  434. /*
  435. * Smartcard
  436. */
  437. {
  438. .name = "SmartCardInfo",
  439. .start = 0x00000000,
  440. .end = 0x2800 - 1,
  441. .flags = IORESOURCE_MEM,
  442. },
  443. /*
  444. * NAND Flash
  445. */
  446. {
  447. .name = "NandFlash",
  448. .start = NAND_FLASH_BASE,
  449. .end = NAND_FLASH_BASE + 0x400 - 1,
  450. .flags = IORESOURCE_IO,
  451. },
  452. /*
  453. * Add other resources here
  454. */
  455. { },
  456. };