aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/powertv/asic
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/powertv/asic')
-rw-r--r--arch/mips/powertv/asic/prealloc-calliope.c673
-rw-r--r--arch/mips/powertv/asic/prealloc-cronus.c668
-rw-r--r--arch/mips/powertv/asic/prealloc-cronuslite.c302
-rw-r--r--arch/mips/powertv/asic/prealloc-zeus.c505
-rw-r--r--arch/mips/powertv/asic/prealloc.h70
5 files changed, 757 insertions, 1461 deletions
diff --git a/arch/mips/powertv/asic/prealloc-calliope.c b/arch/mips/powertv/asic/prealloc-calliope.c
index cd5b76a1c951..3fc5d46687a9 100644
--- a/arch/mips/powertv/asic/prealloc-calliope.c
+++ b/arch/mips/powertv/asic/prealloc-calliope.c
@@ -22,7 +22,9 @@
22 */ 22 */
23 23
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h>
25#include <asm/mach-powertv/asic.h> 26#include <asm/mach-powertv/asic.h>
27#include "prealloc.h"
26 28
27/* 29/*
28 * NON_DVR_CAPABLE CALLIOPE RESOURCES 30 * NON_DVR_CAPABLE CALLIOPE RESOURCES
@@ -32,432 +34,234 @@ struct resource non_dvr_calliope_resources[] __initdata =
32 /* 34 /*
33 * VIDEO / LX1 35 * VIDEO / LX1
34 */ 36 */
35 { 37 /* Delta-Mu 1 image (2MiB) */
36 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 38 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
37 .start = 0x24000000, 39 IORESOURCE_MEM)
38 .end = 0x24200000 - 1, /*2MiB */ 40 /* Delta-Mu 1 monitor (8KiB) */
39 .flags = IORESOURCE_MEM, 41 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
40 }, 42 IORESOURCE_MEM)
41 { 43 /* Delta-Mu 1 RAM (~36.9MiB (32MiB - (2MiB + 8KiB))) */
42 .name = "ST231aMonitor", /*8KiB block ST231a monitor */ 44 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26700000-1,
43 .start = 0x24200000, 45 IORESOURCE_MEM)
44 .end = 0x24202000 - 1, 46
45 .flags = IORESOURCE_MEM,
46 },
47 {
48 .name = "MediaMemory1",
49 .start = 0x24202000,
50 .end = 0x26700000 - 1, /*~36.9MiB (32MiB - (2MiB + 8KiB)) */
51 .flags = IORESOURCE_MEM,
52 },
53 /* 47 /*
54 * Sysaudio Driver 48 * Sysaudio Driver
55 */ 49 */
56 { 50 /* DSP code and data images (1MiB) */
57 .name = "DSP_Image_Buff", 51 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
58 .start = 0x00000000, 52 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
59 .end = 0x000FFFFF, 53 /* ADSC CPU PCM buffer (40KiB) */
60 .flags = IORESOURCE_MEM, 54 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
61 }, 55 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
62 { 56 /* ADSC AUX buffer (128KiB) */
63 .name = "ADSC_CPU_PCM_Buff", 57 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
64 .start = 0x00000000, 58 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
65 .end = 0x00009FFF, 59 /* ADSC Main buffer (128KiB) */
66 .flags = IORESOURCE_MEM, 60 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
67 }, 61 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
68 { 62
69 .name = "ADSC_AUX_Buff",
70 .start = 0x00000000,
71 .end = 0x00003FFF,
72 .flags = IORESOURCE_MEM,
73 },
74 {
75 .name = "ADSC_Main_Buff",
76 .start = 0x00000000,
77 .end = 0x00003FFF,
78 .flags = IORESOURCE_MEM,
79 },
80 /* 63 /*
81 * STAVEM driver/STAPI 64 * STAVEM driver/STAPI
82 */ 65 */
83 { 66 /* 6MiB */
84 .name = "AVMEMPartition0", 67 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
85 .start = 0x00000000, 68 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
86 .end = 0x00600000 - 1, /* 6 MB total */ 69
87 .flags = IORESOURCE_MEM,
88 },
89 /* 70 /*
90 * DOCSIS Subsystem 71 * DOCSIS Subsystem
91 */ 72 */
92 { 73 /* 7MiB */
93 .name = "Docsis", 74 PREALLOC_DOCSIS("Docsis", 0x27500000, 0x27c00000-1, IORESOURCE_MEM)
94 .start = 0x22000000, 75
95 .end = 0x22700000 - 1,
96 .flags = IORESOURCE_MEM,
97 },
98 /* 76 /*
99 * GHW HAL Driver 77 * GHW HAL Driver
100 */ 78 */
101 { 79 /* PowerTV Graphics Heap (14MiB) */
102 .name = "GraphicsHeap", 80 PREALLOC_NORMAL("GraphicsHeap", 0x26700000, 0x26700000+(14*1048576)-1,
103 .start = 0x22700000, 81 IORESOURCE_MEM)
104 .end = 0x23500000 - 1, /* 14 MB total */ 82
105 .flags = IORESOURCE_MEM,
106 },
107 /* 83 /*
108 * multi com buffer area 84 * multi com buffer area
109 */ 85 */
110 { 86 /* 128KiB */
111 .name = "MulticomSHM", 87 PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
112 .start = 0x23700000, 88 IORESOURCE_MEM)
113 .end = 0x23720000 - 1, 89
114 .flags = IORESOURCE_MEM,
115 },
116 /* 90 /*
117 * DMA Ring buffer (don't need recording buffers) 91 * DMA Ring buffer (don't need recording buffers)
118 */ 92 */
119 { 93 /* 680KiB */
120 .name = "BMM_Buffer", 94 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
121 .start = 0x00000000, 95 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
122 .end = 0x000AA000 - 1, 96
123 .flags = IORESOURCE_MEM,
124 },
125 /* 97 /*
126 * Display bins buffer for unit0 98 * Display bins buffer for unit0
127 */ 99 */
128 { 100 /* 4KiB */
129 .name = "DisplayBins0", 101 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
130 .start = 0x00000000, 102 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
131 .end = 0x00000FFF, /* 4 KB total */ 103
132 .flags = IORESOURCE_MEM,
133 },
134 /* 104 /*
135 *
136 * AVFS: player HAL memory 105 * AVFS: player HAL memory
137 *
138 *
139 */ 106 */
140 { 107 /* 945K * 3 for playback */
141 .name = "AvfsDmaMem", 108 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
142 .start = 0x00000000, 109 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
143 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */ 110
144 .flags = IORESOURCE_MEM,
145 },
146 /* 111 /*
147 * PMEM 112 * PMEM
148 */ 113 */
149 { 114 /* Persistent memory for diagnostics (64KiB) */
150 .name = "DiagPersistentMemory", 115 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
151 .start = 0x00000000, 116 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
152 .end = 0x10000 - 1, 117
153 .flags = IORESOURCE_MEM,
154 },
155 /* 118 /*
156 * Smartcard 119 * Smartcard
157 */ 120 */
158 { 121 /* Read and write buffers for Internal/External cards (10KiB) */
159 .name = "SmartCardInfo", 122 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
160 .start = 0x00000000, 123 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
161 .end = 0x2800 - 1, 124
162 .flags = IORESOURCE_MEM,
163 },
164 /* 125 /*
165 * NAND Flash 126 * NAND Flash
166 */ 127 */
167 { 128 /* 10KiB */
168 .name = "NandFlash", 129 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
169 .start = NAND_FLASH_BASE, 130 IORESOURCE_MEM)
170 .end = NAND_FLASH_BASE + 0x400 - 1, 131
171 .flags = IORESOURCE_IO,
172 },
173 /* 132 /*
174 * Synopsys GMAC Memory Region 133 * Synopsys GMAC Memory Region
175 */ 134 */
176 { 135 /* 64KiB */
177 .name = "GMAC", 136 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
178 .start = 0x00000000, 137 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
179 .end = 0x00010000 - 1, 138
180 .flags = IORESOURCE_MEM,
181 },
182 /* 139 /*
183 * Add other resources here 140 * TFTPBuffer
184 * 141 *
142 * This buffer is used in some minimal configurations (e.g. two-way
143 * loader) for storing software images
185 */ 144 */
186 { }, 145 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
187}; 146 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
188 147
189struct resource non_dvr_vz_calliope_resources[] __initdata =
190{
191 /* 148 /*
192 * VIDEO / LX1 149 * Add other resources here
193 */
194 {
195 .name = "ST231aImage", /* Delta-Mu 1 image and ram */
196 .start = 0x24000000,
197 .end = 0x24200000 - 1, /*2 Meg */
198 .flags = IORESOURCE_MEM,
199 },
200 {
201 .name = "ST231aMonitor", /* 8k block ST231a monitor */
202 .start = 0x24200000,
203 .end = 0x24202000 - 1,
204 .flags = IORESOURCE_MEM,
205 },
206 {
207 .name = "MediaMemory1",
208 .start = 0x22202000,
209 .end = 0x22C20B85 - 1, /* 10.12 Meg */
210 .flags = IORESOURCE_MEM,
211 },
212 /*
213 * Sysaudio Driver
214 */
215 {
216 .name = "DSP_Image_Buff",
217 .start = 0x00000000,
218 .end = 0x000FFFFF,
219 .flags = IORESOURCE_MEM,
220 },
221 {
222 .name = "ADSC_CPU_PCM_Buff",
223 .start = 0x00000000,
224 .end = 0x00009FFF,
225 .flags = IORESOURCE_MEM,
226 },
227 {
228 .name = "ADSC_AUX_Buff",
229 .start = 0x00000000,
230 .end = 0x00003FFF,
231 .flags = IORESOURCE_MEM,
232 },
233 {
234 .name = "ADSC_Main_Buff",
235 .start = 0x00000000,
236 .end = 0x00003FFF,
237 .flags = IORESOURCE_MEM,
238 },
239 /*
240 * STAVEM driver/STAPI
241 */
242 {
243 .name = "AVMEMPartition0",
244 .start = 0x20300000,
245 .end = 0x20620000-1, /*3.125 MB total */
246 .flags = IORESOURCE_MEM,
247 },
248 /*
249 * GHW HAL Driver
250 */
251 {
252 .name = "GraphicsHeap",
253 .start = 0x20100000,
254 .end = 0x20300000 - 1,
255 .flags = IORESOURCE_MEM,
256 },
257 /*
258 * multi com buffer area
259 */
260 {
261 .name = "MulticomSHM",
262 .start = 0x23900000,
263 .end = 0x23920000 - 1,
264 .flags = IORESOURCE_MEM,
265 },
266 /*
267 * DMA Ring buffer
268 */
269 {
270 .name = "BMM_Buffer",
271 .start = 0x00000000,
272 .end = 0x000AA000 - 1,
273 .flags = IORESOURCE_MEM,
274 },
275 /*
276 * Display bins buffer for unit0
277 */
278 {
279 .name = "DisplayBins0",
280 .start = 0x00000000,
281 .end = 0x00000FFF,
282 .flags = IORESOURCE_MEM,
283 },
284 /*
285 * PMEM
286 */
287 {
288 .name = "DiagPersistentMemory",
289 .start = 0x00000000,
290 .end = 0x10000 - 1,
291 .flags = IORESOURCE_MEM,
292 },
293 /*
294 * Smartcard
295 */
296 {
297 .name = "SmartCardInfo",
298 .start = 0x00000000,
299 .end = 0x2800 - 1,
300 .flags = IORESOURCE_MEM,
301 },
302 /*
303 * NAND Flash
304 */ 150 */
305 { 151
306 .name = "NandFlash",
307 .start = NAND_FLASH_BASE,
308 .end = NAND_FLASH_BASE+0x400 - 1,
309 .flags = IORESOURCE_IO,
310 },
311 /* 152 /*
312 * Synopsys GMAC Memory Region 153 * End of Resource marker
313 */ 154 */
314 { 155 {
315 .name = "GMAC", 156 .flags = 0,
316 .start = 0x00000000,
317 .end = 0x00010000 - 1,
318 .flags = IORESOURCE_MEM,
319 }, 157 },
320 /*
321 * Add other resources here
322 */
323 { },
324}; 158};
325 159
160
326struct resource non_dvr_vze_calliope_resources[] __initdata = 161struct resource non_dvr_vze_calliope_resources[] __initdata =
327{ 162{
328 /* 163 /*
329 * VIDEO / LX1 164 * VIDEO / LX1
330 */ 165 */
331 { 166 /* Delta-Mu 1 image (2MiB) */
332 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 167 PREALLOC_NORMAL("ST231aImage", 0x22000000, 0x22200000-1,
333 .start = 0x22000000, 168 IORESOURCE_MEM)
334 .end = 0x22200000 - 1, /*2 Meg */ 169 /* Delta-Mu 1 monitor (8KiB) */
335 .flags = IORESOURCE_MEM, 170 PREALLOC_NORMAL("ST231aMonitor", 0x22200000, 0x22202000-1,
336 }, 171 IORESOURCE_MEM)
337 { 172 /* Delta-Mu 1 RAM (10.12MiB) */
338 .name = "ST231aMonitor", /* 8k block ST231a monitor */ 173 PREALLOC_NORMAL("MediaMemory1", 0x22202000, 0x22C20B85-1,
339 .start = 0x22200000, 174 IORESOURCE_MEM)
340 .end = 0x22202000 - 1, 175
341 .flags = IORESOURCE_MEM,
342 },
343 {
344 .name = "MediaMemory1",
345 .start = 0x22202000,
346 .end = 0x22C20B85 - 1, /* 10.12 Meg */
347 .flags = IORESOURCE_MEM,
348 },
349 /* 176 /*
350 * Sysaudio Driver 177 * Sysaudio Driver
351 */ 178 */
352 { 179 /* DSP code and data images (1MiB) */
353 .name = "DSP_Image_Buff", 180 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
354 .start = 0x00000000, 181 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
355 .end = 0x000FFFFF, 182 /* ADSC CPU PCM buffer (40KiB) */
356 .flags = IORESOURCE_MEM, 183 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
357 }, 184 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
358 { 185 /* ADSC AUX buffer (16KiB) */
359 .name = "ADSC_CPU_PCM_Buff", 186 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
360 .start = 0x00000000, 187 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
361 .end = 0x00009FFF, 188 /* ADSC Main buffer (16KiB) */
362 .flags = IORESOURCE_MEM, 189 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
363 }, 190 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
364 { 191
365 .name = "ADSC_AUX_Buff",
366 .start = 0x00000000,
367 .end = 0x00003FFF,
368 .flags = IORESOURCE_MEM,
369 },
370 {
371 .name = "ADSC_Main_Buff",
372 .start = 0x00000000,
373 .end = 0x00003FFF,
374 .flags = IORESOURCE_MEM,
375 },
376 /* 192 /*
377 * STAVEM driver/STAPI 193 * STAVEM driver/STAPI
378 */ 194 */
379 { 195 /* 3.125MiB */
380 .name = "AVMEMPartition0", 196 PREALLOC_NORMAL("AVMEMPartition0", 0x20396000, 0x206B6000-1,
381 .start = 0x20396000, 197 IORESOURCE_MEM)
382 .end = 0x206B6000 - 1, /* 3.125 MB total */ 198
383 .flags = IORESOURCE_MEM,
384 },
385 /* 199 /*
386 * GHW HAL Driver 200 * GHW HAL Driver
387 */ 201 */
388 { 202 /* PowerTV Graphics Heap (2.59MiB) */
389 .name = "GraphicsHeap", 203 PREALLOC_NORMAL("GraphicsHeap", 0x20100000, 0x20396000-1,
390 .start = 0x20100000, 204 IORESOURCE_MEM)
391 .end = 0x20396000 - 1, 205
392 .flags = IORESOURCE_MEM,
393 },
394 /* 206 /*
395 * multi com buffer area 207 * multi com buffer area
396 */ 208 */
397 { 209 /* 128KiB */
398 .name = "MulticomSHM", 210 PREALLOC_NORMAL("MulticomSHM", 0x206B6000, 0x206D6000-1,
399 .start = 0x206B6000, 211 IORESOURCE_MEM)
400 .end = 0x206D6000 - 1, 212
401 .flags = IORESOURCE_MEM,
402 },
403 /* 213 /*
404 * DMA Ring buffer 214 * DMA Ring buffer (don't need recording buffers)
405 */ 215 */
406 { 216 /* 680KiB */
407 .name = "BMM_Buffer", 217 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
408 .start = 0x00000000, 218 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
409 .end = 0x000AA000 - 1, 219
410 .flags = IORESOURCE_MEM,
411 },
412 /* 220 /*
413 * Display bins buffer for unit0 221 * Display bins buffer for unit0
414 */ 222 */
415 { 223 /* 4KiB */
416 .name = "DisplayBins0", 224 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
417 .start = 0x00000000, 225 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
418 .end = 0x00000FFF, 226
419 .flags = IORESOURCE_MEM,
420 },
421 /* 227 /*
422 * PMEM 228 * PMEM
423 */ 229 */
424 { 230 /* Persistent memory for diagnostics (64KiB) */
425 .name = "DiagPersistentMemory", 231 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
426 .start = 0x00000000, 232 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
427 .end = 0x10000 - 1, 233
428 .flags = IORESOURCE_MEM,
429 },
430 /* 234 /*
431 * Smartcard 235 * Smartcard
432 */ 236 */
433 { 237 /* Read and write buffers for Internal/External cards (10KiB) */
434 .name = "SmartCardInfo", 238 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
435 .start = 0x00000000, 239 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
436 .end = 0x2800 - 1, 240
437 .flags = IORESOURCE_MEM,
438 },
439 /* 241 /*
440 * NAND Flash 242 * NAND Flash
441 */ 243 */
442 { 244 /* 10KiB */
443 .name = "NandFlash", 245 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
444 .start = NAND_FLASH_BASE, 246 IORESOURCE_MEM)
445 .end = NAND_FLASH_BASE+0x400 - 1, 247
446 .flags = IORESOURCE_MEM,
447 },
448 /* 248 /*
449 * Synopsys GMAC Memory Region 249 * Synopsys GMAC Memory Region
450 */ 250 */
451 { 251 /* 64KiB */
452 .name = "GMAC", 252 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
453 .start = 0x00000000, 253 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
454 .end = 0x00010000 - 1, 254
455 .flags = IORESOURCE_MEM,
456 },
457 /* 255 /*
458 * Add other resources here 256 * Add other resources here
459 */ 257 */
460 { }, 258
259 /*
260 * End of Resource marker
261 */
262 {
263 .flags = 0,
264 },
461}; 265};
462 266
463struct resource non_dvr_vzf_calliope_resources[] __initdata = 267struct resource non_dvr_vzf_calliope_resources[] __initdata =
@@ -465,156 +269,117 @@ struct resource non_dvr_vzf_calliope_resources[] __initdata =
465 /* 269 /*
466 * VIDEO / LX1 270 * VIDEO / LX1
467 */ 271 */
468 { 272 /* Delta-Mu 1 image (2MiB) */
469 .name = "ST231aImage", /*Delta-Mu 1 image and ram */ 273 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
470 .start = 0x24000000, 274 IORESOURCE_MEM)
471 .end = 0x24200000 - 1, /*2MiB */ 275 /* Delta-Mu 1 monitor (8KiB) */
472 .flags = IORESOURCE_MEM, 276 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
473 }, 277 IORESOURCE_MEM)
474 { 278 /* Delta-Mu 1 RAM (~19.4 (21.5MiB - (2MiB + 8KiB))) */
475 .name = "ST231aMonitor", /*8KiB block ST231a monitor */ 279 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x25580000-1,
476 .start = 0x24200000, 280 IORESOURCE_MEM)
477 .end = 0x24202000 - 1, 281
478 .flags = IORESOURCE_MEM,
479 },
480 {
481 .name = "MediaMemory1",
482 .start = 0x24202000,
483 /* ~19.4 (21.5MiB - (2MiB + 8KiB)) */
484 .end = 0x25580000 - 1,
485 .flags = IORESOURCE_MEM,
486 },
487 /* 282 /*
488 * Sysaudio Driver 283 * Sysaudio Driver
489 */ 284 */
490 { 285 /* DSP code and data images (1MiB) */
491 .name = "DSP_Image_Buff", 286 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
492 .start = 0x00000000, 287 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
493 .end = 0x000FFFFF, 288 /* ADSC CPU PCM buffer (40KiB) */
494 .flags = IORESOURCE_MEM, 289 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
495 }, 290 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
496 { 291 /* ADSC AUX buffer (128KiB) */
497 .name = "ADSC_CPU_PCM_Buff", 292 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
498 .start = 0x00000000, 293 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
499 .end = 0x00009FFF, 294 /* ADSC Main buffer (128KiB) */
500 .flags = IORESOURCE_MEM, 295 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
501 }, 296 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
502 { 297
503 .name = "ADSC_AUX_Buff",
504 .start = 0x00000000,
505 .end = 0x00003FFF,
506 .flags = IORESOURCE_MEM,
507 },
508 {
509 .name = "ADSC_Main_Buff",
510 .start = 0x00000000,
511 .end = 0x00003FFF,
512 .flags = IORESOURCE_MEM,
513 },
514 /* 298 /*
515 * STAVEM driver/STAPI 299 * STAVEM driver/STAPI
516 */ 300 */
517 { 301 /* 4.5MiB */
518 .name = "AVMEMPartition0", 302 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00480000-1,
519 .start = 0x00000000, 303 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
520 .end = 0x00480000 - 1, /* 4.5 MB total */ 304
521 .flags = IORESOURCE_MEM,
522 },
523 /* 305 /*
524 * GHW HAL Driver 306 * GHW HAL Driver
525 */ 307 */
526 { 308 /* PowerTV Graphics Heap (14MiB) */
527 .name = "GraphicsHeap", 309 PREALLOC_NORMAL("GraphicsHeap", 0x25600000, 0x25600000+(14*1048576)-1,
528 .start = 0x22700000, 310 IORESOURCE_MEM)
529 .end = 0x23500000 - 1, /* 14 MB total */ 311
530 .flags = IORESOURCE_MEM,
531 },
532 /* 312 /*
533 * multi com buffer area 313 * multi com buffer area
534 */ 314 */
535 { 315 /* 128KiB */
536 .name = "MulticomSHM", 316 PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
537 .start = 0x23700000, 317 IORESOURCE_MEM)
538 .end = 0x23720000 - 1, 318
539 .flags = IORESOURCE_MEM,
540 },
541 /* 319 /*
542 * DMA Ring buffer (don't need recording buffers) 320 * DMA Ring buffer (don't need recording buffers)
543 */ 321 */
544 { 322 /* 680KiB */
545 .name = "BMM_Buffer", 323 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
546 .start = 0x00000000, 324 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
547 .end = 0x000AA000 - 1, 325
548 .flags = IORESOURCE_MEM,
549 },
550 /* 326 /*
551 * Display bins buffer for unit0 327 * Display bins buffer for unit0
552 */ 328 */
553 { 329 /* 4KiB */
554 .name = "DisplayBins0", 330 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
555 .start = 0x00000000, 331 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
556 .end = 0x00000FFF, /* 4 KB total */ 332
557 .flags = IORESOURCE_MEM,
558 },
559 /* 333 /*
560 * Display bins buffer for unit1 334 * Display bins buffer for unit1
561 */ 335 */
562 { 336 /* 4KiB */
563 .name = "DisplayBins1", 337 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
564 .start = 0x00000000, 338 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
565 .end = 0x00000FFF, /* 4 KB total */ 339
566 .flags = IORESOURCE_MEM,
567 },
568 /* 340 /*
569 *
570 * AVFS: player HAL memory 341 * AVFS: player HAL memory
571 *
572 *
573 */ 342 */
574 { 343 /* 945K * 3 for playback */
575 .name = "AvfsDmaMem", 344 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
576 .start = 0x00000000, 345 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
577 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */ 346
578 .flags = IORESOURCE_MEM,
579 },
580 /* 347 /*
581 * PMEM 348 * PMEM
582 */ 349 */
583 { 350 /* Persistent memory for diagnostics (64KiB) */
584 .name = "DiagPersistentMemory", 351 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
585 .start = 0x00000000, 352 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
586 .end = 0x10000 - 1, 353
587 .flags = IORESOURCE_MEM,
588 },
589 /* 354 /*
590 * Smartcard 355 * Smartcard
591 */ 356 */
592 { 357 /* Read and write buffers for Internal/External cards (10KiB) */
593 .name = "SmartCardInfo", 358 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
594 .start = 0x00000000, 359 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
595 .end = 0x2800 - 1, 360
596 .flags = IORESOURCE_MEM,
597 },
598 /* 361 /*
599 * NAND Flash 362 * NAND Flash
600 */ 363 */
601 { 364 /* 10KiB */
602 .name = "NandFlash", 365 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
603 .start = NAND_FLASH_BASE, 366 IORESOURCE_MEM)
604 .end = NAND_FLASH_BASE + 0x400 - 1, 367
605 .flags = IORESOURCE_MEM,
606 },
607 /* 368 /*
608 * Synopsys GMAC Memory Region 369 * Synopsys GMAC Memory Region
609 */ 370 */
610 { 371 /* 64KiB */
611 .name = "GMAC", 372 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
612 .start = 0x00000000, 373 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
613 .end = 0x00010000 - 1, 374
614 .flags = IORESOURCE_MEM,
615 },
616 /* 375 /*
617 * Add other resources here 376 * Add other resources here
618 */ 377 */
619 { }, 378
379 /*
380 * End of Resource marker
381 */
382 {
383 .flags = 0,
384 },
620}; 385};
diff --git a/arch/mips/powertv/asic/prealloc-cronus.c b/arch/mips/powertv/asic/prealloc-cronus.c
index 45a5c3ea718c..c532b50521ec 100644
--- a/arch/mips/powertv/asic/prealloc-cronus.c
+++ b/arch/mips/powertv/asic/prealloc-cronus.c
@@ -22,7 +22,9 @@
22 */ 22 */
23 23
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h>
25#include <asm/mach-powertv/asic.h> 26#include <asm/mach-powertv/asic.h>
27#include "prealloc.h"
26 28
27/* 29/*
28 * DVR_CAPABLE CRONUS RESOURCES 30 * DVR_CAPABLE CRONUS RESOURCES
@@ -30,305 +32,161 @@
30struct resource dvr_cronus_resources[] __initdata = 32struct resource dvr_cronus_resources[] __initdata =
31{ 33{
32 /* 34 /*
33 *
34 * VIDEO1 / LX1 35 * VIDEO1 / LX1
35 *
36 */ 36 */
37 { 37 /* Delta-Mu 1 image (2MiB) */
38 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 38 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
39 .start = 0x24000000, 39 IORESOURCE_MEM)
40 .end = 0x241FFFFF, /* 2MiB */ 40 /* Delta-Mu 1 monitor (8KiB) */
41 .flags = IORESOURCE_MEM, 41 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
42 }, 42 IORESOURCE_MEM)
43 { 43 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
44 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ 44 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26000000-1,
45 .start = 0x24200000, 45 IORESOURCE_MEM)
46 .end = 0x24201FFF, 46
47 .flags = IORESOURCE_MEM,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x24202000,
52 .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_MEM,
54 },
55 /* 47 /*
56 *
57 * VIDEO2 / LX2 48 * VIDEO2 / LX2
58 *
59 */ 49 */
60 { 50 /* Delta-Mu 2 image (2MiB) */
61 .name = "ST231bImage", /* Delta-Mu 2 image and ram */ 51 PREALLOC_NORMAL("ST231bImage", 0x60000000, 0x60200000-1,
62 .start = 0x60000000, 52 IORESOURCE_MEM)
63 .end = 0x601FFFFF, /* 2MiB */ 53 /* Delta-Mu 2 monitor (8KiB) */
64 .flags = IORESOURCE_IO, 54 PREALLOC_NORMAL("ST231bMonitor", 0x60200000, 0x60202000-1,
65 }, 55 IORESOURCE_MEM)
66 { 56 /* Delta-Mu 2 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
67 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ 57 PREALLOC_NORMAL("MediaMemory2", 0x60202000, 0x62000000-1,
68 .start = 0x60200000, 58 IORESOURCE_MEM)
69 .end = 0x60201FFF, 59
70 .flags = IORESOURCE_IO,
71 },
72 {
73 .name = "MediaMemory2",
74 .start = 0x60202000,
75 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
76 .flags = IORESOURCE_IO,
77 },
78 /* 60 /*
79 *
80 * Sysaudio Driver 61 * Sysaudio Driver
81 *
82 * This driver requires:
83 *
84 * Arbitrary Based Buffers:
85 * DSP_Image_Buff - DSP code and data images (1MB)
86 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
87 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
88 * ADSC_Main_Buff - ADSC Main buffer (16KB)
89 *
90 */ 62 */
91 { 63 /* DSP code and data images (1MiB) */
92 .name = "DSP_Image_Buff", 64 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
93 .start = 0x00000000, 65 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
94 .end = 0x000FFFFF, 66 /* ADSC CPU PCM buffer (40KiB) */
95 .flags = IORESOURCE_MEM, 67 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
96 }, 68 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
97 { 69 /* ADSC AUX buffer (128KiB) */
98 .name = "ADSC_CPU_PCM_Buff", 70 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
99 .start = 0x00000000, 71 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
100 .end = 0x00009FFF, 72 /* ADSC Main buffer (128KiB) */
101 .flags = IORESOURCE_MEM, 73 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
102 }, 74 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
103 { 75
104 .name = "ADSC_AUX_Buff",
105 .start = 0x00000000,
106 .end = 0x00003FFF,
107 .flags = IORESOURCE_MEM,
108 },
109 {
110 .name = "ADSC_Main_Buff",
111 .start = 0x00000000,
112 .end = 0x00003FFF,
113 .flags = IORESOURCE_MEM,
114 },
115 /* 76 /*
116 *
117 * STAVEM driver/STAPI 77 * STAVEM driver/STAPI
118 * 78 *
119 * This driver requires:
120 *
121 * Arbitrary Based Buffers:
122 * This memory area is used for allocating buffers for Video decoding 79 * This memory area is used for allocating buffers for Video decoding
123 * purposes. Allocation/De-allocation within this buffer is managed 80 * purposes. Allocation/De-allocation within this buffer is managed
124 * by the STAVMEM driver of the STAPI. They could be Decimated 81 * by the STAVMEM driver of the STAPI. They could be Decimated
125 * Picture Buffers, Intermediate Buffers, as deemed necessary for 82 * Picture Buffers, Intermediate Buffers, as deemed necessary for
126 * video decoding purposes, for any video decoders on Zeus. 83 * video decoding purposes, for any video decoders on Zeus.
127 *
128 */ 84 */
129 { 85 /* 12MiB */
130 .name = "AVMEMPartition0", 86 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00c00000-1,
131 .start = 0x63580000, 87 IORESOURCE_MEM)
132 .end = 0x64180000 - 1, /* 12 MB total */ 88
133 .flags = IORESOURCE_IO,
134 },
135 /* 89 /*
136 *
137 * DOCSIS Subsystem 90 * DOCSIS Subsystem
138 *
139 * This driver requires:
140 *
141 * Arbitrary Based Buffers:
142 * Docsis -
143 *
144 */ 91 */
145 { 92 /* 7MiB */
146 .name = "Docsis", 93 PREALLOC_DOCSIS("Docsis", 0x67500000, 0x67c00000-1, IORESOURCE_MEM)
147 .start = 0x62000000, 94
148 .end = 0x62700000 - 1, /* 7 MB total */
149 .flags = IORESOURCE_IO,
150 },
151 /* 95 /*
152 *
153 * GHW HAL Driver 96 * GHW HAL Driver
154 *
155 * This driver requires:
156 *
157 * Arbitrary Based Buffers:
158 * GraphicsHeap - PowerTV Graphics Heap
159 *
160 */ 97 */
161 { 98 /* PowerTV Graphics Heap (14MiB) */
162 .name = "GraphicsHeap", 99 PREALLOC_NORMAL("GraphicsHeap", 0x62700000, 0x63500000-1,
163 .start = 0x62700000, 100 IORESOURCE_MEM)
164 .end = 0x63500000 - 1, /* 14 MB total */ 101
165 .flags = IORESOURCE_IO,
166 },
167 /* 102 /*
168 *
169 * multi com buffer area 103 * multi com buffer area
170 *
171 * This driver requires:
172 *
173 * Arbitrary Based Buffers:
174 * Docsis -
175 *
176 */ 104 */
177 { 105 /* 128KiB */
178 .name = "MulticomSHM", 106 PREALLOC_NORMAL("MulticomSHM", 0x26000000, 0x26020000-1,
179 .start = 0x26000000, 107 IORESOURCE_MEM)
180 .end = 0x26020000 - 1, 108
181 .flags = IORESOURCE_MEM,
182 },
183 /* 109 /*
184 *
185 * DMA Ring buffer 110 * DMA Ring buffer
186 *
187 * This driver requires:
188 *
189 * Arbitrary Based Buffers:
190 * Docsis -
191 *
192 */ 111 */
193 { 112 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x002EA000-1,
194 .name = "BMM_Buffer", 113 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
195 .start = 0x00000000, 114
196 .end = 0x00280000 - 1,
197 .flags = IORESOURCE_MEM,
198 },
199 /* 115 /*
200 *
201 * Display bins buffer for unit0 116 * Display bins buffer for unit0
202 *
203 * This driver requires:
204 *
205 * Arbitrary Based Buffers:
206 * Display Bins for unit0
207 *
208 */ 117 */
209 { 118 /* 4KiB */
210 .name = "DisplayBins0", 119 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
211 .start = 0x00000000, 120 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
212 .end = 0x00000FFF, /* 4 KB total */ 121
213 .flags = IORESOURCE_MEM,
214 },
215 /* 122 /*
216 * 123 * Display bins buffer for unit1
217 * Display bins buffer
218 *
219 * This driver requires:
220 *
221 * Arbitrary Based Buffers:
222 * Display Bins for unit1
223 *
224 */ 124 */
225 { 125 /* 4KiB */
226 .name = "DisplayBins1", 126 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
227 .start = 0x64AD4000, 127 IORESOURCE_MEM)
228 .end = 0x64AD5000 - 1, /* 4 KB total */ 128
229 .flags = IORESOURCE_IO,
230 },
231 /* 129 /*
232 *
233 * ITFS 130 * ITFS
234 *
235 * This driver requires:
236 *
237 * Arbitrary Based Buffers:
238 * Docsis -
239 *
240 */ 131 */
241 { 132 /* 815,104 bytes each for 2 ITFS partitions. */
242 .name = "ITFS", 133 PREALLOC_NORMAL("ITFS", 0x00000000, 0x0018E000-1, IORESOURCE_MEM)
243 .start = 0x64180000, 134
244 /* 815,104 bytes each for 2 ITFS partitions. */
245 .end = 0x6430DFFF,
246 .flags = IORESOURCE_IO,
247 },
248 /* 135 /*
249 *
250 * AVFS 136 * AVFS
251 *
252 * This driver requires:
253 *
254 * Arbitrary Based Buffers:
255 * Docsis -
256 *
257 */ 137 */
258 { 138 /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
259 .name = "AvfsDmaMem", 139 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x007c2000-1,
260 .start = 0x6430E000, 140 IORESOURCE_MEM)
261 /* (945K * 8) = (128K *3) 5 playbacks / 3 server */ 141
262 .end = 0x64AD0000 - 1, 142 /* 4KiB */
263 .flags = IORESOURCE_IO, 143 PREALLOC_NORMAL("AvfsFileSys", 0x00000000, 0x00001000-1,
264 }, 144 IORESOURCE_MEM)
265 { 145
266 .name = "AvfsFileSys",
267 .start = 0x64AD0000,
268 .end = 0x64AD1000 - 1, /* 4K */
269 .flags = IORESOURCE_IO,
270 },
271 /* 146 /*
272 *
273 * PMEM 147 * PMEM
274 *
275 * This driver requires:
276 *
277 * Arbitrary Based Buffers:
278 * Persistent memory for diagnostics.
279 *
280 */ 148 */
281 { 149 /* Persistent memory for diagnostics (64KiB) */
282 .name = "DiagPersistentMemory", 150 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
283 .start = 0x00000000, 151 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
284 .end = 0x10000 - 1, 152
285 .flags = IORESOURCE_MEM,
286 },
287 /* 153 /*
288 *
289 * Smartcard 154 * Smartcard
290 *
291 * This driver requires:
292 *
293 * Arbitrary Based Buffers:
294 * Read and write buffers for Internal/External cards
295 *
296 */ 155 */
297 { 156 /* Read and write buffers for Internal/External cards (10KiB) */
298 .name = "SmartCardInfo", 157 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
299 .start = 0x64AD1000, 158 IORESOURCE_MEM)
300 .end = 0x64AD3800 - 1, 159
301 .flags = IORESOURCE_IO,
302 },
303 /* 160 /*
304 *
305 * KAVNET 161 * KAVNET
306 * NP Reset Vector - must be of the form xxCxxxxx
307 * NP Image - must be video bank 1
308 * NP IPC - must be video bank 2
309 */ 162 */
310 { 163 /* NP Reset Vector - must be of the form xxCxxxxx (4KiB) */
311 .name = "NP_Reset_Vector", 164 PREALLOC_NORMAL("NP_Reset_Vector", 0x27c00000, 0x27c01000-1,
312 .start = 0x27c00000, 165 IORESOURCE_MEM)
313 .end = 0x27c01000 - 1, 166 /* NP Image - must be video bank 1 (320KiB) */
314 .flags = IORESOURCE_MEM, 167 PREALLOC_NORMAL("NP_Image", 0x27020000, 0x27070000-1, IORESOURCE_MEM)
315 }, 168 /* NP IPC - must be video bank 2 (512KiB) */
316 { 169 PREALLOC_NORMAL("NP_IPC", 0x63500000, 0x63580000-1, IORESOURCE_MEM)
317 .name = "NP_Image", 170
318 .start = 0x27020000, 171 /*
319 .end = 0x27060000 - 1, 172 * TFTPBuffer
320 .flags = IORESOURCE_MEM, 173 *
321 }, 174 * This buffer is used in some minimal configurations (e.g. two-way
322 { 175 * loader) for storing software images
323 .name = "NP_IPC", 176 */
324 .start = 0x63500000, 177 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
325 .end = 0x63580000 - 1, 178 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
326 .flags = IORESOURCE_IO, 179
327 },
328 /* 180 /*
329 * Add other resources here 181 * Add other resources here
330 */ 182 */
331 { }, 183
184 /*
185 * End of Resource marker
186 */
187 {
188 .flags = 0,
189 },
332}; 190};
333 191
334/* 192/*
@@ -337,272 +195,146 @@ struct resource dvr_cronus_resources[] __initdata =
337struct resource non_dvr_cronus_resources[] __initdata = 195struct resource non_dvr_cronus_resources[] __initdata =
338{ 196{
339 /* 197 /*
340 *
341 * VIDEO1 / LX1 198 * VIDEO1 / LX1
342 *
343 */ 199 */
344 { 200 /* Delta-Mu 1 image (2MiB) */
345 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 201 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
346 .start = 0x24000000, 202 IORESOURCE_MEM)
347 .end = 0x241FFFFF, /* 2MiB */ 203 /* Delta-Mu 1 monitor (8KiB) */
348 .flags = IORESOURCE_MEM, 204 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
349 }, 205 IORESOURCE_MEM)
350 { 206 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
351 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ 207 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26000000-1,
352 .start = 0x24200000, 208 IORESOURCE_MEM)
353 .end = 0x24201FFF, 209
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .name = "MediaMemory1",
358 .start = 0x24202000,
359 .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
360 .flags = IORESOURCE_MEM,
361 },
362 /* 210 /*
363 *
364 * VIDEO2 / LX2 211 * VIDEO2 / LX2
365 *
366 */ 212 */
367 { 213 /* Delta-Mu 2 image (2MiB) */
368 .name = "ST231bImage", /* Delta-Mu 2 image and ram */ 214 PREALLOC_NORMAL("ST231bImage", 0x60000000, 0x60200000-1,
369 .start = 0x60000000, 215 IORESOURCE_MEM)
370 .end = 0x601FFFFF, /* 2MiB */ 216 /* Delta-Mu 2 monitor (8KiB) */
371 .flags = IORESOURCE_IO, 217 PREALLOC_NORMAL("ST231bMonitor", 0x60200000, 0x60202000-1,
372 }, 218 IORESOURCE_MEM)
373 { 219 /* Delta-Mu 2 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
374 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ 220 PREALLOC_NORMAL("MediaMemory2", 0x60202000, 0x62000000-1,
375 .start = 0x60200000, 221 IORESOURCE_MEM)
376 .end = 0x60201FFF, 222
377 .flags = IORESOURCE_IO,
378 },
379 {
380 .name = "MediaMemory2",
381 .start = 0x60202000,
382 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
383 .flags = IORESOURCE_IO,
384 },
385 /* 223 /*
386 *
387 * Sysaudio Driver 224 * Sysaudio Driver
388 *
389 * This driver requires:
390 *
391 * Arbitrary Based Buffers:
392 * DSP_Image_Buff - DSP code and data images (1MB)
393 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
394 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
395 * ADSC_Main_Buff - ADSC Main buffer (16KB)
396 *
397 */ 225 */
398 { 226 /* DSP code and data images (1MiB) */
399 .name = "DSP_Image_Buff", 227 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
400 .start = 0x00000000, 228 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
401 .end = 0x000FFFFF, 229 /* ADSC CPU PCM buffer (40KiB) */
402 .flags = IORESOURCE_MEM, 230 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
403 }, 231 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
404 { 232 /* ADSC AUX buffer (128KiB) */
405 .name = "ADSC_CPU_PCM_Buff", 233 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
406 .start = 0x00000000, 234 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
407 .end = 0x00009FFF, 235 /* ADSC Main buffer (128KiB) */
408 .flags = IORESOURCE_MEM, 236 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
409 }, 237 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
410 { 238
411 .name = "ADSC_AUX_Buff",
412 .start = 0x00000000,
413 .end = 0x00003FFF,
414 .flags = IORESOURCE_MEM,
415 },
416 {
417 .name = "ADSC_Main_Buff",
418 .start = 0x00000000,
419 .end = 0x00003FFF,
420 .flags = IORESOURCE_MEM,
421 },
422 /* 239 /*
423 *
424 * STAVEM driver/STAPI 240 * STAVEM driver/STAPI
425 * 241 *
426 * This driver requires:
427 *
428 * Arbitrary Based Buffers:
429 * This memory area is used for allocating buffers for Video decoding 242 * This memory area is used for allocating buffers for Video decoding
430 * purposes. Allocation/De-allocation within this buffer is managed 243 * purposes. Allocation/De-allocation within this buffer is managed
431 * by the STAVMEM driver of the STAPI. They could be Decimated 244 * by the STAVMEM driver of the STAPI. They could be Decimated
432 * Picture Buffers, Intermediate Buffers, as deemed necessary for 245 * Picture Buffers, Intermediate Buffers, as deemed necessary for
433 * video decoding purposes, for any video decoders on Zeus. 246 * video decoding purposes, for any video decoders on Zeus.
434 *
435 */ 247 */
436 { 248 /* 12MiB */
437 .name = "AVMEMPartition0", 249 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00c00000-1,
438 .start = 0x63580000, 250 IORESOURCE_MEM)
439 .end = 0x64180000 - 1, /* 12 MB total */ 251
440 .flags = IORESOURCE_IO,
441 },
442 /* 252 /*
443 *
444 * DOCSIS Subsystem 253 * DOCSIS Subsystem
445 *
446 * This driver requires:
447 *
448 * Arbitrary Based Buffers:
449 * Docsis -
450 *
451 */ 254 */
452 { 255 /* 7MiB */
453 .name = "Docsis", 256 PREALLOC_DOCSIS("Docsis", 0x67500000, 0x67c00000-1, IORESOURCE_MEM)
454 .start = 0x62000000, 257
455 .end = 0x62700000 - 1, /* 7 MB total */
456 .flags = IORESOURCE_IO,
457 },
458 /* 258 /*
459 *
460 * GHW HAL Driver 259 * GHW HAL Driver
461 *
462 * This driver requires:
463 *
464 * Arbitrary Based Buffers:
465 * GraphicsHeap - PowerTV Graphics Heap
466 *
467 */ 260 */
468 { 261 /* PowerTV Graphics Heap (14MiB) */
469 .name = "GraphicsHeap", 262 PREALLOC_NORMAL("GraphicsHeap", 0x62700000, 0x63500000-1,
470 .start = 0x62700000, 263 IORESOURCE_MEM)
471 .end = 0x63500000 - 1, /* 14 MB total */ 264
472 .flags = IORESOURCE_IO,
473 },
474 /* 265 /*
475 *
476 * multi com buffer area 266 * multi com buffer area
477 *
478 * This driver requires:
479 *
480 * Arbitrary Based Buffers:
481 * Docsis -
482 *
483 */ 267 */
484 { 268 /* 128KiB */
485 .name = "MulticomSHM", 269 PREALLOC_NORMAL("MulticomSHM", 0x26000000, 0x26020000-1,
486 .start = 0x26000000, 270 IORESOURCE_MEM)
487 .end = 0x26020000 - 1, 271
488 .flags = IORESOURCE_MEM,
489 },
490 /* 272 /*
491 * 273 * DMA Ring buffer (don't need recording buffers)
492 * DMA Ring buffer
493 *
494 * This driver requires:
495 *
496 * Arbitrary Based Buffers:
497 * Docsis -
498 *
499 */ 274 */
500 { 275 /* 680KiB */
501 .name = "BMM_Buffer", 276 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
502 .start = 0x00000000, 277 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
503 .end = 0x000AA000 - 1, 278
504 .flags = IORESOURCE_MEM,
505 },
506 /* 279 /*
507 *
508 * Display bins buffer for unit0 280 * Display bins buffer for unit0
509 *
510 * This driver requires:
511 *
512 * Arbitrary Based Buffers:
513 * Display Bins for unit0
514 *
515 */ 281 */
516 { 282 /* 4KiB */
517 .name = "DisplayBins0", 283 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
518 .start = 0x00000000, 284 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
519 .end = 0x00000FFF, /* 4 KB total */ 285
520 .flags = IORESOURCE_MEM,
521 },
522 /* 286 /*
523 * 287 * Display bins buffer for unit1
524 * Display bins buffer
525 *
526 * This driver requires:
527 *
528 * Arbitrary Based Buffers:
529 * Display Bins for unit1
530 *
531 */ 288 */
532 { 289 /* 4KiB */
533 .name = "DisplayBins1", 290 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
534 .start = 0x64AD4000, 291 IORESOURCE_MEM)
535 .end = 0x64AD5000 - 1, /* 4 KB total */ 292
536 .flags = IORESOURCE_IO,
537 },
538 /* 293 /*
539 *
540 * AVFS: player HAL memory 294 * AVFS: player HAL memory
541 *
542 *
543 */ 295 */
544 { 296 /* 945K * 3 for playback */
545 .name = "AvfsDmaMem", 297 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1, IORESOURCE_MEM)
546 .start = 0x6430E000, 298
547 .end = 0x645D2C00 - 1, /* 945K * 3 for playback */
548 .flags = IORESOURCE_IO,
549 },
550 /* 299 /*
551 *
552 * PMEM 300 * PMEM
553 *
554 * This driver requires:
555 *
556 * Arbitrary Based Buffers:
557 * Persistent memory for diagnostics.
558 *
559 */ 301 */
560 { 302 /* Persistent memory for diagnostics (64KiB) */
561 .name = "DiagPersistentMemory", 303 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
562 .start = 0x00000000, 304 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
563 .end = 0x10000 - 1, 305
564 .flags = IORESOURCE_MEM,
565 },
566 /* 306 /*
567 *
568 * Smartcard 307 * Smartcard
569 *
570 * This driver requires:
571 *
572 * Arbitrary Based Buffers:
573 * Read and write buffers for Internal/External cards
574 *
575 */ 308 */
576 { 309 /* Read and write buffers for Internal/External cards (10KiB) */
577 .name = "SmartCardInfo", 310 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1, IORESOURCE_MEM)
578 .start = 0x64AD1000, 311
579 .end = 0x64AD3800 - 1,
580 .flags = IORESOURCE_IO,
581 },
582 /* 312 /*
583 *
584 * KAVNET 313 * KAVNET
585 * NP Reset Vector - must be of the form xxCxxxxx 314 */
586 * NP Image - must be video bank 1 315 /* NP Reset Vector - must be of the form xxCxxxxx (4KiB) */
587 * NP IPC - must be video bank 2 316 PREALLOC_NORMAL("NP_Reset_Vector", 0x27c00000, 0x27c01000-1,
317 IORESOURCE_MEM)
318 /* NP Image - must be video bank 1 (320KiB) */
319 PREALLOC_NORMAL("NP_Image", 0x27020000, 0x27070000-1, IORESOURCE_MEM)
320 /* NP IPC - must be video bank 2 (512KiB) */
321 PREALLOC_NORMAL("NP_IPC", 0x63500000, 0x63580000-1, IORESOURCE_MEM)
322
323 /*
324 * NAND Flash
325 */
326 /* 10KiB */
327 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
328 IORESOURCE_MEM)
329
330 /*
331 * Add other resources here
332 */
333
334 /*
335 * End of Resource marker
588 */ 336 */
589 { 337 {
590 .name = "NP_Reset_Vector", 338 .flags = 0,
591 .start = 0x27c00000,
592 .end = 0x27c01000 - 1,
593 .flags = IORESOURCE_MEM,
594 },
595 {
596 .name = "NP_Image",
597 .start = 0x27020000,
598 .end = 0x27060000 - 1,
599 .flags = IORESOURCE_MEM,
600 },
601 {
602 .name = "NP_IPC",
603 .start = 0x63500000,
604 .end = 0x63580000 - 1,
605 .flags = IORESOURCE_IO,
606 }, 339 },
607 { },
608}; 340};
diff --git a/arch/mips/powertv/asic/prealloc-cronuslite.c b/arch/mips/powertv/asic/prealloc-cronuslite.c
index 23a905613c04..b5537e49e7f5 100644
--- a/arch/mips/powertv/asic/prealloc-cronuslite.c
+++ b/arch/mips/powertv/asic/prealloc-cronuslite.c
@@ -22,7 +22,9 @@
22 */ 22 */
23 23
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h>
25#include <asm/mach-powertv/asic.h> 26#include <asm/mach-powertv/asic.h>
27#include "prealloc.h"
26 28
27/* 29/*
28 * NON_DVR_CAPABLE CRONUSLITE RESOURCES 30 * NON_DVR_CAPABLE CRONUSLITE RESOURCES
@@ -30,261 +32,143 @@
30struct resource non_dvr_cronuslite_resources[] __initdata = 32struct resource non_dvr_cronuslite_resources[] __initdata =
31{ 33{
32 /* 34 /*
33 *
34 * VIDEO2 / LX2 35 * VIDEO2 / LX2
35 *
36 */ 36 */
37 { 37 /* Delta-Mu 1 image (2MiB) */
38 .name = "ST231aImage", /* Delta-Mu 2 image and ram */ 38 PREALLOC_NORMAL("ST231aImage", 0x60000000, 0x60200000-1,
39 .start = 0x60000000, 39 IORESOURCE_MEM)
40 .end = 0x601FFFFF, /* 2MiB */ 40 /* Delta-Mu 1 monitor (8KiB) */
41 .flags = IORESOURCE_IO, 41 PREALLOC_NORMAL("ST231aMonitor", 0x60200000, 0x60202000-1,
42 }, 42 IORESOURCE_MEM)
43 { 43 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
44 .name = "ST231aMonitor", /* 8KiB block ST231b monitor */ 44 PREALLOC_NORMAL("MediaMemory1", 0x60202000, 0x62000000-1,
45 .start = 0x60200000, 45 IORESOURCE_MEM)
46 .end = 0x60201FFF, 46
47 .flags = IORESOURCE_IO,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x60202000,
52 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_IO,
54 },
55 /* 47 /*
56 *
57 * Sysaudio Driver 48 * Sysaudio Driver
58 *
59 * This driver requires:
60 *
61 * Arbitrary Based Buffers:
62 * DSP_Image_Buff - DSP code and data images (1MB)
63 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
64 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
65 * ADSC_Main_Buff - ADSC Main buffer (16KB)
66 *
67 */ 49 */
68 { 50 /* DSP code and data images (1MiB) */
69 .name = "DSP_Image_Buff", 51 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
70 .start = 0x00000000, 52 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
71 .end = 0x000FFFFF, 53 /* ADSC CPU PCM buffer (40KiB) */
72 .flags = IORESOURCE_MEM, 54 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
73 }, 55 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
74 { 56 /* ADSC AUX buffer (128KiB) */
75 .name = "ADSC_CPU_PCM_Buff", 57 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
76 .start = 0x00000000, 58 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
77 .end = 0x00009FFF, 59 /* ADSC Main buffer (128KiB) */
78 .flags = IORESOURCE_MEM, 60 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
79 }, 61 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
80 { 62
81 .name = "ADSC_AUX_Buff",
82 .start = 0x00000000,
83 .end = 0x00003FFF,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "ADSC_Main_Buff",
88 .start = 0x00000000,
89 .end = 0x00003FFF,
90 .flags = IORESOURCE_MEM,
91 },
92 /* 63 /*
93 *
94 * STAVEM driver/STAPI 64 * STAVEM driver/STAPI
95 * 65 *
96 * This driver requires:
97 *
98 * Arbitrary Based Buffers:
99 * This memory area is used for allocating buffers for Video decoding 66 * This memory area is used for allocating buffers for Video decoding
100 * purposes. Allocation/De-allocation within this buffer is managed 67 * purposes. Allocation/De-allocation within this buffer is managed
101 * by the STAVMEM driver of the STAPI. They could be Decimated 68 * by the STAVMEM driver of the STAPI. They could be Decimated
102 * Picture Buffers, Intermediate Buffers, as deemed necessary for 69 * Picture Buffers, Intermediate Buffers, as deemed necessary for
103 * video decoding purposes, for any video decoders on Zeus. 70 * video decoding purposes, for any video decoders on Zeus.
104 *
105 */ 71 */
106 { 72 /* 6MiB */
107 .name = "AVMEMPartition0", 73 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
108 .start = 0x63580000, 74 IORESOURCE_MEM)
109 .end = 0x63B80000 - 1, /* 6 MB total */ 75
110 .flags = IORESOURCE_IO,
111 },
112 /* 76 /*
113 *
114 * DOCSIS Subsystem 77 * DOCSIS Subsystem
115 *
116 * This driver requires:
117 *
118 * Arbitrary Based Buffers:
119 * Docsis -
120 *
121 */ 78 */
122 { 79 /* 7MiB */
123 .name = "Docsis", 80 PREALLOC_DOCSIS("Docsis", 0x67500000, 0x67c00000-1, IORESOURCE_MEM)
124 .start = 0x62000000, 81
125 .end = 0x62700000 - 1, /* 7 MB total */
126 .flags = IORESOURCE_IO,
127 },
128 /* 82 /*
129 *
130 * GHW HAL Driver 83 * GHW HAL Driver
131 *
132 * This driver requires:
133 *
134 * Arbitrary Based Buffers:
135 * GraphicsHeap - PowerTV Graphics Heap
136 *
137 */ 84 */
138 { 85 /* PowerTV Graphics Heap (14MiB) */
139 .name = "GraphicsHeap", 86 PREALLOC_NORMAL("GraphicsHeap", 0x62700000, 0x63500000-1,
140 .start = 0x62700000, 87 IORESOURCE_MEM)
141 .end = 0x63500000 - 1, /* 14 MB total */ 88
142 .flags = IORESOURCE_IO,
143 },
144 /* 89 /*
145 *
146 * multi com buffer area 90 * multi com buffer area
147 *
148 * This driver requires:
149 *
150 * Arbitrary Based Buffers:
151 * Docsis -
152 *
153 */ 91 */
154 { 92 /* 128KiB */
155 .name = "MulticomSHM", 93 PREALLOC_NORMAL("MulticomSHM", 0x26000000, 0x26020000-1,
156 .start = 0x26000000, 94 IORESOURCE_MEM)
157 .end = 0x26020000 - 1, 95
158 .flags = IORESOURCE_MEM,
159 },
160 /* 96 /*
161 * 97 * DMA Ring buffer (don't need recording buffers)
162 * DMA Ring buffer
163 *
164 * This driver requires:
165 *
166 * Arbitrary Based Buffers:
167 * Docsis -
168 *
169 */ 98 */
170 { 99 /* 680KiB */
171 .name = "BMM_Buffer", 100 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
172 .start = 0x00000000, 101 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
173 .end = 0x000AA000 - 1, 102
174 .flags = IORESOURCE_MEM,
175 },
176 /* 103 /*
177 *
178 * Display bins buffer for unit0 104 * Display bins buffer for unit0
179 *
180 * This driver requires:
181 *
182 * Arbitrary Based Buffers:
183 * Display Bins for unit0
184 *
185 */ 105 */
186 { 106 /* 4KiB */
187 .name = "DisplayBins0", 107 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
188 .start = 0x00000000, 108 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
189 .end = 0x00000FFF, /* 4 KB total */ 109
190 .flags = IORESOURCE_MEM,
191 },
192 /* 110 /*
193 * 111 * Display bins buffer for unit1
194 * Display bins buffer
195 *
196 * This driver requires:
197 *
198 * Arbitrary Based Buffers:
199 * Display Bins for unit1
200 *
201 */ 112 */
202 { 113 /* 4KiB */
203 .name = "DisplayBins1", 114 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
204 .start = 0x63B83000, 115 IORESOURCE_MEM)
205 .end = 0x63B84000 - 1, /* 4 KB total */ 116
206 .flags = IORESOURCE_IO,
207 },
208 /* 117 /*
209 *
210 * AVFS: player HAL memory 118 * AVFS: player HAL memory
211 *
212 *
213 */ 119 */
214 { 120 /* 945K * 3 for playback */
215 .name = "AvfsDmaMem", 121 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
216 .start = 0x63B84000, 122 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
217 .end = 0x63E48C00 - 1, /* 945K * 3 for playback */ 123
218 .flags = IORESOURCE_IO,
219 },
220 /* 124 /*
221 *
222 * PMEM 125 * PMEM
223 *
224 * This driver requires:
225 *
226 * Arbitrary Based Buffers:
227 * Persistent memory for diagnostics.
228 *
229 */ 126 */
230 { 127 /* Persistent memory for diagnostics (64KiB) */
231 .name = "DiagPersistentMemory", 128 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
232 .start = 0x00000000, 129 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
233 .end = 0x10000 - 1, 130
234 .flags = IORESOURCE_MEM,
235 },
236 /* 131 /*
237 *
238 * Smartcard 132 * Smartcard
239 *
240 * This driver requires:
241 *
242 * Arbitrary Based Buffers:
243 * Read and write buffers for Internal/External cards
244 *
245 */ 133 */
246 { 134 /* Read and write buffers for Internal/External cards (10KiB) */
247 .name = "SmartCardInfo", 135 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1, IORESOURCE_MEM)
248 .start = 0x63B80000, 136
249 .end = 0x63B82800 - 1,
250 .flags = IORESOURCE_IO,
251 },
252 /* 137 /*
253 *
254 * KAVNET 138 * KAVNET
255 * NP Reset Vector - must be of the form xxCxxxxx
256 * NP Image - must be video bank 1
257 * NP IPC - must be video bank 2
258 */ 139 */
259 { 140 /* NP Reset Vector - must be of the form xxCxxxxx (4KiB) */
260 .name = "NP_Reset_Vector", 141 PREALLOC_NORMAL("NP_Reset_Vector", 0x27c00000, 0x27c01000-1,
261 .start = 0x27c00000, 142 IORESOURCE_MEM)
262 .end = 0x27c01000 - 1, 143 /* NP Image - must be video bank 1 (320KiB) */
263 .flags = IORESOURCE_MEM, 144 PREALLOC_NORMAL("NP_Image", 0x27020000, 0x27070000-1, IORESOURCE_MEM)
264 }, 145 /* NP IPC - must be video bank 2 (512KiB) */
265 { 146 PREALLOC_NORMAL("NP_IPC", 0x63500000, 0x63580000-1, IORESOURCE_MEM)
266 .name = "NP_Image", 147
267 .start = 0x27020000,
268 .end = 0x27060000 - 1,
269 .flags = IORESOURCE_MEM,
270 },
271 {
272 .name = "NP_IPC",
273 .start = 0x63500000,
274 .end = 0x63580000 - 1,
275 .flags = IORESOURCE_IO,
276 },
277 /* 148 /*
278 * NAND Flash 149 * NAND Flash
279 */ 150 */
280 { 151 /* 10KiB */
281 .name = "NandFlash", 152 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
282 .start = NAND_FLASH_BASE, 153 IORESOURCE_MEM)
283 .end = NAND_FLASH_BASE + 0x400 - 1, 154
284 .flags = IORESOURCE_IO, 155 /*
285 }, 156 * TFTPBuffer
157 *
158 * This buffer is used in some minimal configurations (e.g. two-way
159 * loader) for storing software images
160 */
161 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
162 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
163
286 /* 164 /*
287 * Add other resources here 165 * Add other resources here
288 */ 166 */
289 { }, 167
168 /*
169 * End of Resource marker
170 */
171 {
172 .flags = 0,
173 },
290}; 174};
diff --git a/arch/mips/powertv/asic/prealloc-zeus.c b/arch/mips/powertv/asic/prealloc-zeus.c
index 018d4514dbe3..96480a2395c0 100644
--- a/arch/mips/powertv/asic/prealloc-zeus.c
+++ b/arch/mips/powertv/asic/prealloc-zeus.c
@@ -22,7 +22,9 @@
22 */ 22 */
23 23
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h>
25#include <asm/mach-powertv/asic.h> 26#include <asm/mach-powertv/asic.h>
27#include "prealloc.h"
26 28
27/* 29/*
28 * DVR_CAPABLE RESOURCES 30 * DVR_CAPABLE RESOURCES
@@ -30,280 +32,151 @@
30struct resource dvr_zeus_resources[] __initdata = 32struct resource dvr_zeus_resources[] __initdata =
31{ 33{
32 /* 34 /*
33 *
34 * VIDEO1 / LX1 35 * VIDEO1 / LX1
35 *
36 */ 36 */
37 { 37 /* Delta-Mu 1 image (2MiB) */
38 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 38 PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
39 .start = 0x20000000, 39 IORESOURCE_MEM)
40 .end = 0x201FFFFF, /* 2MiB */ 40 /* Delta-Mu 1 monitor (8KiB) */
41 .flags = IORESOURCE_IO, 41 PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
42 }, 42 IORESOURCE_MEM)
43 { 43 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
44 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ 44 PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
45 .start = 0x20200000, 45 IORESOURCE_MEM)
46 .end = 0x20201FFF, 46
47 .flags = IORESOURCE_IO,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x20202000,
52 .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_IO,
54 },
55 /* 47 /*
56 *
57 * VIDEO2 / LX2 48 * VIDEO2 / LX2
58 *
59 */ 49 */
60 { 50 /* Delta-Mu 2 image (2MiB) */
61 .name = "ST231bImage", /* Delta-Mu 2 image and ram */ 51 PREALLOC_NORMAL("ST231bImage", 0x30000000, 0x30200000-1,
62 .start = 0x30000000, 52 IORESOURCE_MEM)
63 .end = 0x301FFFFF, /* 2MiB */ 53 /* Delta-Mu 2 monitor (8KiB) */
64 .flags = IORESOURCE_IO, 54 PREALLOC_NORMAL("ST231bMonitor", 0x30200000, 0x30202000-1,
65 }, 55 IORESOURCE_MEM)
66 { 56 /* Delta-Mu 2 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
67 .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ 57 PREALLOC_NORMAL("MediaMemory2", 0x30202000, 0x32000000-1,
68 .start = 0x30200000, 58 IORESOURCE_MEM)
69 .end = 0x30201FFF, 59
70 .flags = IORESOURCE_IO,
71 },
72 {
73 .name = "MediaMemory2",
74 .start = 0x30202000,
75 .end = 0x31FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
76 .flags = IORESOURCE_IO,
77 },
78 /* 60 /*
79 *
80 * Sysaudio Driver 61 * Sysaudio Driver
81 *
82 * This driver requires:
83 *
84 * Arbitrary Based Buffers:
85 * DSP_Image_Buff - DSP code and data images (1MB)
86 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
87 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
88 * ADSC_Main_Buff - ADSC Main buffer (16KB)
89 *
90 */ 62 */
91 { 63 /* DSP code and data images (1MiB) */
92 .name = "DSP_Image_Buff", 64 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
93 .start = 0x00000000, 65 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
94 .end = 0x000FFFFF, 66 /* ADSC CPU PCM buffer (40KiB) */
95 .flags = IORESOURCE_MEM, 67 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
96 }, 68 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
97 { 69 /* ADSC AUX buffer (16KiB) */
98 .name = "ADSC_CPU_PCM_Buff", 70 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
99 .start = 0x00000000, 71 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
100 .end = 0x00009FFF, 72 /* ADSC Main buffer (16KiB) */
101 .flags = IORESOURCE_MEM, 73 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
102 }, 74 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
103 { 75
104 .name = "ADSC_AUX_Buff",
105 .start = 0x00000000,
106 .end = 0x00003FFF,
107 .flags = IORESOURCE_MEM,
108 },
109 {
110 .name = "ADSC_Main_Buff",
111 .start = 0x00000000,
112 .end = 0x00003FFF,
113 .flags = IORESOURCE_MEM,
114 },
115 /* 76 /*
116 *
117 * STAVEM driver/STAPI 77 * STAVEM driver/STAPI
118 * 78 *
119 * This driver requires:
120 *
121 * Arbitrary Based Buffers:
122 * This memory area is used for allocating buffers for Video decoding 79 * This memory area is used for allocating buffers for Video decoding
123 * purposes. Allocation/De-allocation within this buffer is managed 80 * purposes. Allocation/De-allocation within this buffer is managed
124 * by the STAVMEM driver of the STAPI. They could be Decimated 81 * by the STAVMEM driver of the STAPI. They could be Decimated
125 * Picture Buffers, Intermediate Buffers, as deemed necessary for 82 * Picture Buffers, Intermediate Buffers, as deemed necessary for
126 * video decoding purposes, for any video decoders on Zeus. 83 * video decoding purposes, for any video decoders on Zeus.
127 *
128 */ 84 */
129 { 85 /* 12MiB */
130 .name = "AVMEMPartition0", 86 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00c00000-1,
131 .start = 0x00000000, 87 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
132 .end = 0x00c00000 - 1, /* 12 MB total */ 88
133 .flags = IORESOURCE_MEM,
134 },
135 /* 89 /*
136 *
137 * DOCSIS Subsystem 90 * DOCSIS Subsystem
138 *
139 * This driver requires:
140 *
141 * Arbitrary Based Buffers:
142 * Docsis -
143 *
144 */ 91 */
145 { 92 /* 7MiB */
146 .name = "Docsis", 93 PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
147 .start = 0x40100000, 94
148 .end = 0x407fffff,
149 .flags = IORESOURCE_MEM,
150 },
151 /* 95 /*
152 *
153 * GHW HAL Driver 96 * GHW HAL Driver
154 *
155 * This driver requires:
156 *
157 * Arbitrary Based Buffers:
158 * GraphicsHeap - PowerTV Graphics Heap
159 *
160 */ 97 */
161 { 98 /* PowerTV Graphics Heap (14MiB) */
162 .name = "GraphicsHeap", 99 PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
163 .start = 0x46900000, 100 IORESOURCE_MEM)
164 .end = 0x47700000 - 1, /* 14 MB total */ 101
165 .flags = IORESOURCE_MEM,
166 },
167 /* 102 /*
168 *
169 * multi com buffer area 103 * multi com buffer area
170 *
171 * This driver requires:
172 *
173 * Arbitrary Based Buffers:
174 * Docsis -
175 *
176 */ 104 */
177 { 105 /* 128KiB */
178 .name = "MulticomSHM", 106 PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
179 .start = 0x47900000, 107 IORESOURCE_MEM)
180 .end = 0x47920000 - 1, 108
181 .flags = IORESOURCE_MEM,
182 },
183 /* 109 /*
184 *
185 * DMA Ring buffer 110 * DMA Ring buffer
186 *
187 * This driver requires:
188 *
189 * Arbitrary Based Buffers:
190 * Docsis -
191 *
192 */ 111 */
193 { 112 /* 2.5MiB */
194 .name = "BMM_Buffer", 113 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
195 .start = 0x00000000, 114 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
196 .end = 0x00280000 - 1, 115
197 .flags = IORESOURCE_MEM,
198 },
199 /* 116 /*
200 *
201 * Display bins buffer for unit0 117 * Display bins buffer for unit0
202 *
203 * This driver requires:
204 *
205 * Arbitrary Based Buffers:
206 * Display Bins for unit0
207 *
208 */ 118 */
209 { 119 /* 4KiB */
210 .name = "DisplayBins0", 120 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
211 .start = 0x00000000, 121 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
212 .end = 0x00000FFF, /* 4 KB total */ 122
213 .flags = IORESOURCE_MEM,
214 },
215 /* 123 /*
216 * 124 * Display bins buffer for unit1
217 * Display bins buffer
218 *
219 * This driver requires:
220 *
221 * Arbitrary Based Buffers:
222 * Display Bins for unit1
223 *
224 */ 125 */
225 { 126 /* 4KiB */
226 .name = "DisplayBins1", 127 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
227 .start = 0x00000000, 128 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
228 .end = 0x00000FFF, /* 4 KB total */ 129
229 .flags = IORESOURCE_MEM,
230 },
231 /* 130 /*
232 *
233 * ITFS 131 * ITFS
234 *
235 * This driver requires:
236 *
237 * Arbitrary Based Buffers:
238 * Docsis -
239 *
240 */ 132 */
241 { 133 /* 815,104 bytes each for 2 ITFS partitions. */
242 .name = "ITFS", 134 PREALLOC_NORMAL("ITFS", 0x00000000, 0x0018E000-1,
243 .start = 0x00000000, 135 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
244 /* 815,104 bytes each for 2 ITFS partitions. */ 136
245 .end = 0x0018DFFF,
246 .flags = IORESOURCE_MEM,
247 },
248 /* 137 /*
249 *
250 * AVFS 138 * AVFS
251 *
252 * This driver requires:
253 *
254 * Arbitrary Based Buffers:
255 * Docsis -
256 *
257 */ 139 */
258 { 140 /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
259 .name = "AvfsDmaMem", 141 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x007c2000-1,
260 .start = 0x00000000, 142 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
261 /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */ 143 /* 4KiB */
262 .end = 0x007c2000 - 1, 144 PREALLOC_NORMAL("AvfsFileSys", 0x00000000, 0x00001000-1,
263 .flags = IORESOURCE_MEM, 145 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
264 }, 146
265 {
266 .name = "AvfsFileSys",
267 .start = 0x00000000,
268 .end = 0x00001000 - 1, /* 4K */
269 .flags = IORESOURCE_MEM,
270 },
271 /* 147 /*
272 *
273 * PMEM 148 * PMEM
274 *
275 * This driver requires:
276 *
277 * Arbitrary Based Buffers:
278 * Persistent memory for diagnostics.
279 *
280 */ 149 */
281 { 150 /* Persistent memory for diagnostics (64KiB) */
282 .name = "DiagPersistentMemory", 151 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
283 .start = 0x00000000, 152 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
284 .end = 0x10000 - 1, 153
285 .flags = IORESOURCE_MEM,
286 },
287 /* 154 /*
288 *
289 * Smartcard 155 * Smartcard
156 */
157 /* Read and write buffers for Internal/External cards (10KiB) */
158 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
159 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
160
161 /*
162 * TFTPBuffer
290 * 163 *
291 * This driver requires: 164 * This buffer is used in some minimal configurations (e.g. two-way
292 * 165 * loader) for storing software images
293 * Arbitrary Based Buffers:
294 * Read and write buffers for Internal/External cards
295 *
296 */ 166 */
297 { 167 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
298 .name = "SmartCardInfo", 168 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
299 .start = 0x00000000, 169
300 .end = 0x2800 - 1,
301 .flags = IORESOURCE_MEM,
302 },
303 /* 170 /*
304 * Add other resources here 171 * Add other resources here
305 */ 172 */
306 { }, 173
174 /*
175 * End of Resource marker
176 */
177 {
178 .flags = 0,
179 },
307}; 180};
308 181
309/* 182/*
@@ -314,146 +187,118 @@ struct resource non_dvr_zeus_resources[] __initdata =
314 /* 187 /*
315 * VIDEO1 / LX1 188 * VIDEO1 / LX1
316 */ 189 */
317 { 190 /* Delta-Mu 1 image (2MiB) */
318 .name = "ST231aImage", /* Delta-Mu 1 image and ram */ 191 PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
319 .start = 0x20000000, 192 IORESOURCE_MEM)
320 .end = 0x201FFFFF, /* 2MiB */ 193 /* Delta-Mu 1 monitor (8KiB) */
321 .flags = IORESOURCE_IO, 194 PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
322 }, 195 IORESOURCE_MEM)
323 { 196 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
324 .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ 197 PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
325 .start = 0x20200000, 198 IORESOURCE_MEM)
326 .end = 0x20201FFF, 199
327 .flags = IORESOURCE_IO,
328 },
329 {
330 .name = "MediaMemory1",
331 .start = 0x20202000,
332 .end = 0x21FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
333 .flags = IORESOURCE_IO,
334 },
335 /* 200 /*
336 * Sysaudio Driver 201 * Sysaudio Driver
337 */ 202 */
338 { 203 /* DSP code and data images (1MiB) */
339 .name = "DSP_Image_Buff", 204 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
340 .start = 0x00000000, 205 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
341 .end = 0x000FFFFF, 206 /* ADSC CPU PCM buffer (40KiB) */
342 .flags = IORESOURCE_MEM, 207 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
343 }, 208 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
344 { 209 /* ADSC AUX buffer (16KiB) */
345 .name = "ADSC_CPU_PCM_Buff", 210 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
346 .start = 0x00000000, 211 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
347 .end = 0x00009FFF, 212 /* ADSC Main buffer (16KiB) */
348 .flags = IORESOURCE_MEM, 213 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
349 }, 214 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
350 { 215
351 .name = "ADSC_AUX_Buff",
352 .start = 0x00000000,
353 .end = 0x00003FFF,
354 .flags = IORESOURCE_MEM,
355 },
356 {
357 .name = "ADSC_Main_Buff",
358 .start = 0x00000000,
359 .end = 0x00003FFF,
360 .flags = IORESOURCE_MEM,
361 },
362 /* 216 /*
363 * STAVEM driver/STAPI 217 * STAVEM driver/STAPI
364 */ 218 */
365 { 219 /* 6MiB */
366 .name = "AVMEMPartition0", 220 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
367 .start = 0x00000000, 221 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
368 .end = 0x00600000 - 1, /* 6 MB total */ 222
369 .flags = IORESOURCE_MEM,
370 },
371 /* 223 /*
372 * DOCSIS Subsystem 224 * DOCSIS Subsystem
373 */ 225 */
374 { 226 /* 7MiB */
375 .name = "Docsis", 227 PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
376 .start = 0x40100000, 228
377 .end = 0x407fffff,
378 .flags = IORESOURCE_MEM,
379 },
380 /* 229 /*
381 * GHW HAL Driver 230 * GHW HAL Driver
382 */ 231 */
383 { 232 /* PowerTV Graphics Heap (14MiB) */
384 .name = "GraphicsHeap", 233 PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
385 .start = 0x46900000, 234 IORESOURCE_MEM)
386 .end = 0x47700000 - 1, /* 14 MB total */ 235
387 .flags = IORESOURCE_MEM,
388 },
389 /* 236 /*
390 * multi com buffer area 237 * multi com buffer area
391 */ 238 */
392 { 239 /* 128KiB */
393 .name = "MulticomSHM", 240 PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
394 .start = 0x47900000, 241 IORESOURCE_MEM)
395 .end = 0x47920000 - 1, 242
396 .flags = IORESOURCE_MEM,
397 },
398 /* 243 /*
399 * DMA Ring buffer 244 * DMA Ring buffer
400 */ 245 */
401 { 246 /* 2.5MiB */
402 .name = "BMM_Buffer", 247 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
403 .start = 0x00000000, 248 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
404 .end = 0x00280000 - 1, 249
405 .flags = IORESOURCE_MEM,
406 },
407 /* 250 /*
408 * Display bins buffer for unit0 251 * Display bins buffer for unit0
409 */ 252 */
410 { 253 /* 4KiB */
411 .name = "DisplayBins0", 254 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
412 .start = 0x00000000, 255 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
413 .end = 0x00000FFF, /* 4 KB total */ 256
414 .flags = IORESOURCE_MEM,
415 },
416 /* 257 /*
417 *
418 * AVFS: player HAL memory 258 * AVFS: player HAL memory
419 *
420 *
421 */ 259 */
422 { 260 /* 945K * 3 for playback */
423 .name = "AvfsDmaMem", 261 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
424 .start = 0x00000000, 262 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
425 .end = 0x002c4c00 - 1, /* 945K * 3 for playback */ 263
426 .flags = IORESOURCE_MEM,
427 },
428 /* 264 /*
429 * PMEM 265 * PMEM
430 */ 266 */
431 { 267 /* Persistent memory for diagnostics (64KiB) */
432 .name = "DiagPersistentMemory", 268 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
433 .start = 0x00000000, 269 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
434 .end = 0x10000 - 1, 270
435 .flags = IORESOURCE_MEM,
436 },
437 /* 271 /*
438 * Smartcard 272 * Smartcard
439 */ 273 */
440 { 274 /* Read and write buffers for Internal/External cards (10KiB) */
441 .name = "SmartCardInfo", 275 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
442 .start = 0x00000000, 276 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
443 .end = 0x2800 - 1, 277
444 .flags = IORESOURCE_MEM,
445 },
446 /* 278 /*
447 * NAND Flash 279 * NAND Flash
448 */ 280 */
449 { 281 /* 10KiB */
450 .name = "NandFlash", 282 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
451 .start = NAND_FLASH_BASE, 283 IORESOURCE_MEM)
452 .end = NAND_FLASH_BASE + 0x400 - 1, 284
453 .flags = IORESOURCE_IO, 285 /*
454 }, 286 * TFTPBuffer
287 *
288 * This buffer is used in some minimal configurations (e.g. two-way
289 * loader) for storing software images
290 */
291 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
292 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
293
455 /* 294 /*
456 * Add other resources here 295 * Add other resources here
457 */ 296 */
458 { }, 297
298 /*
299 * End of Resource marker
300 */
301 {
302 .flags = 0,
303 },
459}; 304};
diff --git a/arch/mips/powertv/asic/prealloc.h b/arch/mips/powertv/asic/prealloc.h
new file mode 100644
index 000000000000..8e682df17856
--- /dev/null
+++ b/arch/mips/powertv/asic/prealloc.h
@@ -0,0 +1,70 @@
1/*
2 * Definitions for memory preallocations
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
21#ifndef _ARCH_MIPS_POWERTV_ASIC_PREALLOC_H
22#define _ARCH_MIPS_POWERTV_ASIC_PREALLOC_H
23
24#define KIBIBYTE(n) ((n) * 1024) /* Number of kibibytes */
25#define MEBIBYTE(n) ((n) * KIBIBYTE(1024)) /* Number of mebibytes */
26
27/* "struct resource" array element definition */
28#define PREALLOC(NAME, START, END, FLAGS) { \
29 .name = (NAME), \
30 .start = (START), \
31 .end = (END), \
32 .flags = (FLAGS) \
33 },
34
35/* Individual resources in the preallocated resource arrays are defined using
36 * macros. These macros are conditionally defined based on their
37 * corresponding kernel configuration flag:
38 * - CONFIG_PREALLOC_NORMAL: preallocate resources for a normal settop box
39 * - CONFIG_PREALLOC_TFTP: preallocate the TFTP download resource
40 * - CONFIG_PREALLOC_DOCSIS: preallocate the DOCSIS resource
41 * - CONFIG_PREALLOC_PMEM: reserve space for persistent memory
42 */
43#ifdef CONFIG_PREALLOC_NORMAL
44#define PREALLOC_NORMAL(name, start, end, flags) \
45 PREALLOC(name, start, end, flags)
46#else
47#define PREALLOC_NORMAL(name, start, end, flags)
48#endif
49
50#ifdef CONFIG_PREALLOC_TFTP
51#define PREALLOC_TFTP(name, start, end, flags) \
52 PREALLOC(name, start, end, flags)
53#else
54#define PREALLOC_TFTP(name, start, end, flags)
55#endif
56
57#ifdef CONFIG_PREALLOC_DOCSIS
58#define PREALLOC_DOCSIS(name, start, end, flags) \
59 PREALLOC(name, start, end, flags)
60#else
61#define PREALLOC_DOCSIS(name, start, end, flags)
62#endif
63
64#ifdef CONFIG_PREALLOC_PMEM
65#define PREALLOC_PMEM(name, start, end, flags) \
66 PREALLOC(name, start, end, flags)
67#else
68#define PREALLOC_PMEM(name, start, end, flags)
69#endif
70#endif