prealloc-gaia.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. /*
  2. * Memory pre-allocations for Gaia 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: David VomLehn
  21. */
  22. #include <linux/init.h>
  23. #include <asm/mach-powertv/asic.h>
  24. /*
  25. * DVR_CAPABLE GAIA RESOURCES
  26. */
  27. struct resource dvr_gaia_resources[] __initdata = {
  28. /*
  29. *
  30. * VIDEO1 / LX1
  31. *
  32. */
  33. {
  34. .name = "ST231aImage", /* Delta-Mu 1 image and ram */
  35. .start = 0x24000000,
  36. .end = 0x241FFFFF, /* 2MiB */
  37. .flags = IORESOURCE_MEM,
  38. },
  39. {
  40. .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
  41. .start = 0x24200000,
  42. .end = 0x24201FFF,
  43. .flags = IORESOURCE_MEM,
  44. },
  45. {
  46. .name = "MediaMemory1",
  47. .start = 0x24202000,
  48. .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  49. .flags = IORESOURCE_MEM,
  50. },
  51. /*
  52. *
  53. * VIDEO2 / LX2
  54. *
  55. */
  56. {
  57. .name = "ST231bImage", /* Delta-Mu 2 image and ram */
  58. .start = 0x60000000,
  59. .end = 0x601FFFFF, /* 2MiB */
  60. .flags = IORESOURCE_IO,
  61. },
  62. {
  63. .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
  64. .start = 0x60200000,
  65. .end = 0x60201FFF,
  66. .flags = IORESOURCE_IO,
  67. },
  68. {
  69. .name = "MediaMemory2",
  70. .start = 0x60202000,
  71. .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  72. .flags = IORESOURCE_IO,
  73. },
  74. /*
  75. *
  76. * Sysaudio Driver
  77. *
  78. * This driver requires:
  79. *
  80. * Arbitrary Based Buffers:
  81. * DSP_Image_Buff - DSP code and data images (1MB)
  82. * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
  83. * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
  84. * ADSC_Main_Buff - ADSC Main buffer (16KB)
  85. *
  86. */
  87. {
  88. .name = "DSP_Image_Buff",
  89. .start = 0x00000000,
  90. .end = 0x000FFFFF,
  91. .flags = IORESOURCE_MEM,
  92. },
  93. {
  94. .name = "ADSC_CPU_PCM_Buff",
  95. .start = 0x00000000,
  96. .end = 0x00009FFF,
  97. .flags = IORESOURCE_MEM,
  98. },
  99. {
  100. .name = "ADSC_AUX_Buff",
  101. .start = 0x00000000,
  102. .end = 0x00003FFF,
  103. .flags = IORESOURCE_MEM,
  104. },
  105. {
  106. .name = "ADSC_Main_Buff",
  107. .start = 0x00000000,
  108. .end = 0x00003FFF,
  109. .flags = IORESOURCE_MEM,
  110. },
  111. /*
  112. *
  113. * STAVEM driver/STAPI
  114. *
  115. * This driver requires:
  116. *
  117. * Arbitrary Based Buffers:
  118. * This memory area is used for allocating buffers for Video decoding
  119. * purposes. Allocation/De-allocation within this buffer is managed
  120. * by the STAVMEM driver of the STAPI. They could be Decimated
  121. * Picture Buffers, Intermediate Buffers, as deemed necessary for
  122. * video decoding purposes, for any video decoders on Zeus.
  123. *
  124. */
  125. {
  126. .name = "AVMEMPartition0",
  127. .start = 0x63580000,
  128. .end = 0x64180000 - 1, /* 12 MB total */
  129. .flags = IORESOURCE_IO,
  130. },
  131. /*
  132. *
  133. * DOCSIS Subsystem
  134. *
  135. * This driver requires:
  136. *
  137. * Arbitrary Based Buffers:
  138. * Docsis -
  139. *
  140. */
  141. {
  142. .name = "Docsis",
  143. .start = 0x62000000,
  144. .end = 0x62700000 - 1, /* 7 MB total */
  145. .flags = IORESOURCE_IO,
  146. },
  147. /*
  148. *
  149. * GHW HAL Driver
  150. *
  151. * This driver requires:
  152. *
  153. * Arbitrary Based Buffers:
  154. * GraphicsHeap - PowerTV Graphics Heap
  155. *
  156. */
  157. {
  158. .name = "GraphicsHeap",
  159. .start = 0x62700000,
  160. .end = 0x63500000 - 1, /* 14 MB total */
  161. .flags = IORESOURCE_IO,
  162. },
  163. /*
  164. *
  165. * multi com buffer area
  166. *
  167. * This driver requires:
  168. *
  169. * Arbitrary Based Buffers:
  170. * Docsis -
  171. *
  172. */
  173. {
  174. .name = "MulticomSHM",
  175. .start = 0x26000000,
  176. .end = 0x26020000 - 1,
  177. .flags = IORESOURCE_MEM,
  178. },
  179. /*
  180. *
  181. * DMA Ring buffer
  182. *
  183. * This driver requires:
  184. *
  185. * Arbitrary Based Buffers:
  186. * Docsis -
  187. *
  188. */
  189. {
  190. .name = "BMM_Buffer",
  191. .start = 0x00000000,
  192. .end = 0x00280000 - 1,
  193. .flags = IORESOURCE_MEM,
  194. },
  195. /*
  196. *
  197. * Display bins buffer for unit0
  198. *
  199. * This driver requires:
  200. *
  201. * Arbitrary Based Buffers:
  202. * Display Bins for unit0
  203. *
  204. */
  205. {
  206. .name = "DisplayBins0",
  207. .start = 0x00000000,
  208. .end = 0x00000FFF, /* 4 KB total */
  209. .flags = IORESOURCE_MEM,
  210. },
  211. /*
  212. *
  213. * Display bins buffer
  214. *
  215. * This driver requires:
  216. *
  217. * Arbitrary Based Buffers:
  218. * Display Bins for unit1
  219. *
  220. */
  221. {
  222. .name = "DisplayBins1",
  223. .start = 0x64AD4000,
  224. .end = 0x64AD5000 - 1, /* 4 KB total */
  225. .flags = IORESOURCE_IO,
  226. },
  227. /*
  228. *
  229. * ITFS
  230. *
  231. * This driver requires:
  232. *
  233. * Arbitrary Based Buffers:
  234. * Docsis -
  235. *
  236. */
  237. {
  238. .name = "ITFS",
  239. .start = 0x64180000,
  240. /* 815,104 bytes each for 2 ITFS partitions. */
  241. .end = 0x6430DFFF,
  242. .flags = IORESOURCE_IO,
  243. },
  244. /*
  245. *
  246. * AVFS
  247. *
  248. * This driver requires:
  249. *
  250. * Arbitrary Based Buffers:
  251. * Docsis -
  252. *
  253. */
  254. {
  255. .name = "AvfsDmaMem",
  256. .start = 0x6430E000,
  257. /* (945K * 8) = (128K *3) 5 playbacks / 3 server */
  258. .end = 0x64AD0000 - 1,
  259. .flags = IORESOURCE_IO,
  260. },
  261. {
  262. .name = "AvfsFileSys",
  263. .start = 0x64AD0000,
  264. .end = 0x64AD1000 - 1, /* 4K */
  265. .flags = IORESOURCE_IO,
  266. },
  267. /*
  268. *
  269. * Smartcard
  270. *
  271. * This driver requires:
  272. *
  273. * Arbitrary Based Buffers:
  274. * Read and write buffers for Internal/External cards
  275. *
  276. */
  277. {
  278. .name = "SmartCardInfo",
  279. .start = 0x64AD1000,
  280. .end = 0x64AD3800 - 1,
  281. .flags = IORESOURCE_IO,
  282. },
  283. /*
  284. *
  285. * KAVNET
  286. * NP Reset Vector - must be of the form xxCxxxxx
  287. * NP Image - must be video bank 1
  288. * NP IPC - must be video bank 2
  289. */
  290. {
  291. .name = "NP_Reset_Vector",
  292. .start = 0x27c00000,
  293. .end = 0x27c01000 - 1,
  294. .flags = IORESOURCE_MEM,
  295. },
  296. {
  297. .name = "NP_Image",
  298. .start = 0x27020000,
  299. .end = 0x27060000 - 1,
  300. .flags = IORESOURCE_MEM,
  301. },
  302. {
  303. .name = "NP_IPC",
  304. .start = 0x63500000,
  305. .end = 0x63580000 - 1,
  306. .flags = IORESOURCE_IO,
  307. },
  308. /*
  309. * Add other resources here
  310. */
  311. { },
  312. };
  313. /*
  314. * NON_DVR_CAPABLE GAIA RESOURCES
  315. */
  316. struct resource non_dvr_gaia_resources[] __initdata = {
  317. /*
  318. *
  319. * VIDEO1 / LX1
  320. *
  321. */
  322. {
  323. .name = "ST231aImage", /* Delta-Mu 1 image and ram */
  324. .start = 0x24000000,
  325. .end = 0x241FFFFF, /* 2MiB */
  326. .flags = IORESOURCE_MEM,
  327. },
  328. {
  329. .name = "ST231aMonitor", /* 8KiB block ST231a monitor */
  330. .start = 0x24200000,
  331. .end = 0x24201FFF,
  332. .flags = IORESOURCE_MEM,
  333. },
  334. {
  335. .name = "MediaMemory1",
  336. .start = 0x24202000,
  337. .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  338. .flags = IORESOURCE_MEM,
  339. },
  340. /*
  341. *
  342. * VIDEO2 / LX2
  343. *
  344. */
  345. {
  346. .name = "ST231bImage", /* Delta-Mu 2 image and ram */
  347. .start = 0x60000000,
  348. .end = 0x601FFFFF, /* 2MiB */
  349. .flags = IORESOURCE_IO,
  350. },
  351. {
  352. .name = "ST231bMonitor", /* 8KiB block ST231b monitor */
  353. .start = 0x60200000,
  354. .end = 0x60201FFF,
  355. .flags = IORESOURCE_IO,
  356. },
  357. {
  358. .name = "MediaMemory2",
  359. .start = 0x60202000,
  360. .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
  361. .flags = IORESOURCE_IO,
  362. },
  363. /*
  364. *
  365. * Sysaudio Driver
  366. *
  367. * This driver requires:
  368. *
  369. * Arbitrary Based Buffers:
  370. * DSP_Image_Buff - DSP code and data images (1MB)
  371. * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
  372. * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
  373. * ADSC_Main_Buff - ADSC Main buffer (16KB)
  374. *
  375. */
  376. {
  377. .name = "DSP_Image_Buff",
  378. .start = 0x00000000,
  379. .end = 0x000FFFFF,
  380. .flags = IORESOURCE_MEM,
  381. },
  382. {
  383. .name = "ADSC_CPU_PCM_Buff",
  384. .start = 0x00000000,
  385. .end = 0x00009FFF,
  386. .flags = IORESOURCE_MEM,
  387. },
  388. {
  389. .name = "ADSC_AUX_Buff",
  390. .start = 0x00000000,
  391. .end = 0x00003FFF,
  392. .flags = IORESOURCE_MEM,
  393. },
  394. {
  395. .name = "ADSC_Main_Buff",
  396. .start = 0x00000000,
  397. .end = 0x00003FFF,
  398. .flags = IORESOURCE_MEM,
  399. },
  400. /*
  401. *
  402. * STAVEM driver/STAPI
  403. *
  404. * This driver requires:
  405. *
  406. * Arbitrary Based Buffers:
  407. * This memory area is used for allocating buffers for Video decoding
  408. * purposes. Allocation/De-allocation within this buffer is managed
  409. * by the STAVMEM driver of the STAPI. They could be Decimated
  410. * Picture Buffers, Intermediate Buffers, as deemed necessary for
  411. * video decoding purposes, for any video decoders on Zeus.
  412. *
  413. */
  414. {
  415. .name = "AVMEMPartition0",
  416. .start = 0x63580000,
  417. .end = 0x64180000 - 1, /* 12 MB total */
  418. .flags = IORESOURCE_IO,
  419. },
  420. /*
  421. *
  422. * DOCSIS Subsystem
  423. *
  424. * This driver requires:
  425. *
  426. * Arbitrary Based Buffers:
  427. * Docsis -
  428. *
  429. */
  430. {
  431. .name = "Docsis",
  432. .start = 0x62000000,
  433. .end = 0x62700000 - 1, /* 7 MB total */
  434. .flags = IORESOURCE_IO,
  435. },
  436. /*
  437. *
  438. * GHW HAL Driver
  439. *
  440. * This driver requires:
  441. *
  442. * Arbitrary Based Buffers:
  443. * GraphicsHeap - PowerTV Graphics Heap
  444. *
  445. */
  446. {
  447. .name = "GraphicsHeap",
  448. .start = 0x62700000,
  449. .end = 0x63500000 - 1, /* 14 MB total */
  450. .flags = IORESOURCE_IO,
  451. },
  452. /*
  453. *
  454. * multi com buffer area
  455. *
  456. * This driver requires:
  457. *
  458. * Arbitrary Based Buffers:
  459. * Docsis -
  460. *
  461. */
  462. {
  463. .name = "MulticomSHM",
  464. .start = 0x26000000,
  465. .end = 0x26020000 - 1,
  466. .flags = IORESOURCE_MEM,
  467. },
  468. /*
  469. *
  470. * DMA Ring buffer
  471. *
  472. * This driver requires:
  473. *
  474. * Arbitrary Based Buffers:
  475. * Docsis -
  476. *
  477. */
  478. {
  479. .name = "BMM_Buffer",
  480. .start = 0x00000000,
  481. .end = 0x000AA000 - 1,
  482. .flags = IORESOURCE_MEM,
  483. },
  484. /*
  485. *
  486. * Display bins buffer for unit0
  487. *
  488. * This driver requires:
  489. *
  490. * Arbitrary Based Buffers:
  491. * Display Bins for unit0
  492. *
  493. */
  494. {
  495. .name = "DisplayBins0",
  496. .start = 0x00000000,
  497. .end = 0x00000FFF, /* 4 KB total */
  498. .flags = IORESOURCE_MEM,
  499. },
  500. /*
  501. *
  502. * Display bins buffer
  503. *
  504. * This driver requires:
  505. *
  506. * Arbitrary Based Buffers:
  507. * Display Bins for unit1
  508. *
  509. */
  510. {
  511. .name = "DisplayBins1",
  512. .start = 0x64AD4000,
  513. .end = 0x64AD5000 - 1, /* 4 KB total */
  514. .flags = IORESOURCE_IO,
  515. },
  516. /*
  517. *
  518. * AVFS: player HAL memory
  519. *
  520. *
  521. */
  522. {
  523. .name = "AvfsDmaMem",
  524. .start = 0x6430E000,
  525. .end = 0x645D2C00 - 1, /* 945K * 3 for playback */
  526. .flags = IORESOURCE_IO,
  527. },
  528. /*
  529. *
  530. * PMEM
  531. *
  532. * This driver requires:
  533. *
  534. * Arbitrary Based Buffers:
  535. * Persistent memory for diagnostics.
  536. *
  537. */
  538. {
  539. .name = "DiagPersistentMemory",
  540. .start = 0x00000000,
  541. .end = 0x10000 - 1,
  542. .flags = IORESOURCE_MEM,
  543. },
  544. /*
  545. *
  546. * Smartcard
  547. *
  548. * This driver requires:
  549. *
  550. * Arbitrary Based Buffers:
  551. * Read and write buffers for Internal/External cards
  552. *
  553. */
  554. {
  555. .name = "SmartCardInfo",
  556. .start = 0x64AD1000,
  557. .end = 0x64AD3800 - 1,
  558. .flags = IORESOURCE_IO,
  559. },
  560. /*
  561. *
  562. * KAVNET
  563. * NP Reset Vector - must be of the form xxCxxxxx
  564. * NP Image - must be video bank 1
  565. * NP IPC - must be video bank 2
  566. */
  567. {
  568. .name = "NP_Reset_Vector",
  569. .start = 0x27c00000,
  570. .end = 0x27c01000 - 1,
  571. .flags = IORESOURCE_MEM,
  572. },
  573. {
  574. .name = "NP_Image",
  575. .start = 0x27020000,
  576. .end = 0x27060000 - 1,
  577. .flags = IORESOURCE_MEM,
  578. },
  579. {
  580. .name = "NP_IPC",
  581. .start = 0x63500000,
  582. .end = 0x63580000 - 1,
  583. .flags = IORESOURCE_IO,
  584. },
  585. { },
  586. };