David VomLehn | a3a0f8c | 2009-08-30 17:15:11 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Memory pre-allocations for Calliope boxes. |
| 3 | * |
| 4 | * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | * |
| 20 | * Author: Ken Eppinett |
| 21 | * David Schleef <ds@schleef.org> |
| 22 | */ |
| 23 | |
| 24 | #include <linux/init.h> |
| 25 | #include <asm/mach-powertv/asic.h> |
| 26 | |
| 27 | /* |
| 28 | * NON_DVR_CAPABLE CALLIOPE RESOURCES |
| 29 | */ |
| 30 | struct resource non_dvr_calliope_resources[] __initdata = |
| 31 | { |
| 32 | /* |
| 33 | * VIDEO / LX1 |
| 34 | */ |
| 35 | { |
| 36 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ |
| 37 | .start = 0x24000000, |
| 38 | .end = 0x24200000 - 1, /*2MiB */ |
| 39 | .flags = IORESOURCE_MEM, |
| 40 | }, |
| 41 | { |
| 42 | .name = "ST231aMonitor", /*8KiB block ST231a monitor */ |
| 43 | .start = 0x24200000, |
| 44 | .end = 0x24202000 - 1, |
| 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 | /* |
| 54 | * Sysaudio Driver |
| 55 | */ |
| 56 | { |
| 57 | .name = "DSP_Image_Buff", |
| 58 | .start = 0x00000000, |
| 59 | .end = 0x000FFFFF, |
| 60 | .flags = IORESOURCE_MEM, |
| 61 | }, |
| 62 | { |
| 63 | .name = "ADSC_CPU_PCM_Buff", |
| 64 | .start = 0x00000000, |
| 65 | .end = 0x00009FFF, |
| 66 | .flags = IORESOURCE_MEM, |
| 67 | }, |
| 68 | { |
| 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 | /* |
| 81 | * STAVEM driver/STAPI |
| 82 | */ |
| 83 | { |
| 84 | .name = "AVMEMPartition0", |
| 85 | .start = 0x00000000, |
| 86 | .end = 0x00600000 - 1, /* 6 MB total */ |
| 87 | .flags = IORESOURCE_MEM, |
| 88 | }, |
| 89 | /* |
| 90 | * DOCSIS Subsystem |
| 91 | */ |
| 92 | { |
| 93 | .name = "Docsis", |
| 94 | .start = 0x22000000, |
| 95 | .end = 0x22700000 - 1, |
| 96 | .flags = IORESOURCE_MEM, |
| 97 | }, |
| 98 | /* |
| 99 | * GHW HAL Driver |
| 100 | */ |
| 101 | { |
| 102 | .name = "GraphicsHeap", |
| 103 | .start = 0x22700000, |
| 104 | .end = 0x23500000 - 1, /* 14 MB total */ |
| 105 | .flags = IORESOURCE_MEM, |
| 106 | }, |
| 107 | /* |
| 108 | * multi com buffer area |
| 109 | */ |
| 110 | { |
| 111 | .name = "MulticomSHM", |
| 112 | .start = 0x23700000, |
| 113 | .end = 0x23720000 - 1, |
| 114 | .flags = IORESOURCE_MEM, |
| 115 | }, |
| 116 | /* |
| 117 | * DMA Ring buffer (don't need recording buffers) |
| 118 | */ |
| 119 | { |
| 120 | .name = "BMM_Buffer", |
| 121 | .start = 0x00000000, |
| 122 | .end = 0x000AA000 - 1, |
| 123 | .flags = IORESOURCE_MEM, |
| 124 | }, |
| 125 | /* |
| 126 | * Display bins buffer for unit0 |
| 127 | */ |
| 128 | { |
| 129 | .name = "DisplayBins0", |
| 130 | .start = 0x00000000, |
| 131 | .end = 0x00000FFF, /* 4 KB total */ |
| 132 | .flags = IORESOURCE_MEM, |
| 133 | }, |
| 134 | /* |
| 135 | * |
| 136 | * AVFS: player HAL memory |
| 137 | * |
| 138 | * |
| 139 | */ |
| 140 | { |
| 141 | .name = "AvfsDmaMem", |
| 142 | .start = 0x00000000, |
| 143 | .end = 0x002c4c00 - 1, /* 945K * 3 for playback */ |
| 144 | .flags = IORESOURCE_MEM, |
| 145 | }, |
| 146 | /* |
| 147 | * PMEM |
| 148 | */ |
| 149 | { |
| 150 | .name = "DiagPersistentMemory", |
| 151 | .start = 0x00000000, |
| 152 | .end = 0x10000 - 1, |
| 153 | .flags = IORESOURCE_MEM, |
| 154 | }, |
| 155 | /* |
| 156 | * Smartcard |
| 157 | */ |
| 158 | { |
| 159 | .name = "SmartCardInfo", |
| 160 | .start = 0x00000000, |
| 161 | .end = 0x2800 - 1, |
| 162 | .flags = IORESOURCE_MEM, |
| 163 | }, |
| 164 | /* |
| 165 | * NAND Flash |
| 166 | */ |
| 167 | { |
| 168 | .name = "NandFlash", |
| 169 | .start = NAND_FLASH_BASE, |
| 170 | .end = NAND_FLASH_BASE + 0x400 - 1, |
| 171 | .flags = IORESOURCE_IO, |
| 172 | }, |
| 173 | /* |
| 174 | * Synopsys GMAC Memory Region |
| 175 | */ |
| 176 | { |
| 177 | .name = "GMAC", |
| 178 | .start = 0x00000000, |
| 179 | .end = 0x00010000 - 1, |
| 180 | .flags = IORESOURCE_MEM, |
| 181 | }, |
| 182 | /* |
| 183 | * Add other resources here |
| 184 | * |
| 185 | */ |
| 186 | { }, |
| 187 | }; |
| 188 | |
| 189 | struct resource non_dvr_vz_calliope_resources[] __initdata = |
| 190 | { |
| 191 | /* |
| 192 | * VIDEO / LX1 |
| 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 | */ |
| 305 | { |
| 306 | .name = "NandFlash", |
| 307 | .start = NAND_FLASH_BASE, |
| 308 | .end = NAND_FLASH_BASE+0x400 - 1, |
| 309 | .flags = IORESOURCE_IO, |
| 310 | }, |
| 311 | /* |
| 312 | * Synopsys GMAC Memory Region |
| 313 | */ |
| 314 | { |
| 315 | .name = "GMAC", |
| 316 | .start = 0x00000000, |
| 317 | .end = 0x00010000 - 1, |
| 318 | .flags = IORESOURCE_MEM, |
| 319 | }, |
| 320 | /* |
| 321 | * Add other resources here |
| 322 | */ |
| 323 | { }, |
| 324 | }; |
| 325 | |
| 326 | struct resource non_dvr_vze_calliope_resources[] __initdata = |
| 327 | { |
| 328 | /* |
| 329 | * VIDEO / LX1 |
| 330 | */ |
| 331 | { |
| 332 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ |
| 333 | .start = 0x22000000, |
| 334 | .end = 0x22200000 - 1, /*2 Meg */ |
| 335 | .flags = IORESOURCE_MEM, |
| 336 | }, |
| 337 | { |
| 338 | .name = "ST231aMonitor", /* 8k block ST231a monitor */ |
| 339 | .start = 0x22200000, |
| 340 | .end = 0x22202000 - 1, |
| 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 | /* |
| 350 | * Sysaudio Driver |
| 351 | */ |
| 352 | { |
| 353 | .name = "DSP_Image_Buff", |
| 354 | .start = 0x00000000, |
| 355 | .end = 0x000FFFFF, |
| 356 | .flags = IORESOURCE_MEM, |
| 357 | }, |
| 358 | { |
| 359 | .name = "ADSC_CPU_PCM_Buff", |
| 360 | .start = 0x00000000, |
| 361 | .end = 0x00009FFF, |
| 362 | .flags = IORESOURCE_MEM, |
| 363 | }, |
| 364 | { |
| 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 | /* |
| 377 | * STAVEM driver/STAPI |
| 378 | */ |
| 379 | { |
| 380 | .name = "AVMEMPartition0", |
| 381 | .start = 0x20396000, |
| 382 | .end = 0x206B6000 - 1, /* 3.125 MB total */ |
| 383 | .flags = IORESOURCE_MEM, |
| 384 | }, |
| 385 | /* |
| 386 | * GHW HAL Driver |
| 387 | */ |
| 388 | { |
| 389 | .name = "GraphicsHeap", |
| 390 | .start = 0x20100000, |
| 391 | .end = 0x20396000 - 1, |
| 392 | .flags = IORESOURCE_MEM, |
| 393 | }, |
| 394 | /* |
| 395 | * multi com buffer area |
| 396 | */ |
| 397 | { |
| 398 | .name = "MulticomSHM", |
| 399 | .start = 0x206B6000, |
| 400 | .end = 0x206D6000 - 1, |
| 401 | .flags = IORESOURCE_MEM, |
| 402 | }, |
| 403 | /* |
| 404 | * DMA Ring buffer |
| 405 | */ |
| 406 | { |
| 407 | .name = "BMM_Buffer", |
| 408 | .start = 0x00000000, |
| 409 | .end = 0x000AA000 - 1, |
| 410 | .flags = IORESOURCE_MEM, |
| 411 | }, |
| 412 | /* |
| 413 | * Display bins buffer for unit0 |
| 414 | */ |
| 415 | { |
| 416 | .name = "DisplayBins0", |
| 417 | .start = 0x00000000, |
| 418 | .end = 0x00000FFF, |
| 419 | .flags = IORESOURCE_MEM, |
| 420 | }, |
| 421 | /* |
| 422 | * PMEM |
| 423 | */ |
| 424 | { |
| 425 | .name = "DiagPersistentMemory", |
| 426 | .start = 0x00000000, |
| 427 | .end = 0x10000 - 1, |
| 428 | .flags = IORESOURCE_MEM, |
| 429 | }, |
| 430 | /* |
| 431 | * Smartcard |
| 432 | */ |
| 433 | { |
| 434 | .name = "SmartCardInfo", |
| 435 | .start = 0x00000000, |
| 436 | .end = 0x2800 - 1, |
| 437 | .flags = IORESOURCE_MEM, |
| 438 | }, |
| 439 | /* |
| 440 | * NAND Flash |
| 441 | */ |
| 442 | { |
| 443 | .name = "NandFlash", |
| 444 | .start = NAND_FLASH_BASE, |
| 445 | .end = NAND_FLASH_BASE+0x400 - 1, |
| 446 | .flags = IORESOURCE_MEM, |
| 447 | }, |
| 448 | /* |
| 449 | * Synopsys GMAC Memory Region |
| 450 | */ |
| 451 | { |
| 452 | .name = "GMAC", |
| 453 | .start = 0x00000000, |
| 454 | .end = 0x00010000 - 1, |
| 455 | .flags = IORESOURCE_MEM, |
| 456 | }, |
| 457 | /* |
| 458 | * Add other resources here |
| 459 | */ |
| 460 | { }, |
| 461 | }; |
| 462 | |
| 463 | struct resource non_dvr_vzf_calliope_resources[] __initdata = |
| 464 | { |
| 465 | /* |
| 466 | * VIDEO / LX1 |
| 467 | */ |
| 468 | { |
| 469 | .name = "ST231aImage", /*Delta-Mu 1 image and ram */ |
| 470 | .start = 0x24000000, |
| 471 | .end = 0x24200000 - 1, /*2MiB */ |
| 472 | .flags = IORESOURCE_MEM, |
| 473 | }, |
| 474 | { |
| 475 | .name = "ST231aMonitor", /*8KiB block ST231a monitor */ |
| 476 | .start = 0x24200000, |
| 477 | .end = 0x24202000 - 1, |
| 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 | /* |
| 488 | * Sysaudio Driver |
| 489 | */ |
| 490 | { |
| 491 | .name = "DSP_Image_Buff", |
| 492 | .start = 0x00000000, |
| 493 | .end = 0x000FFFFF, |
| 494 | .flags = IORESOURCE_MEM, |
| 495 | }, |
| 496 | { |
| 497 | .name = "ADSC_CPU_PCM_Buff", |
| 498 | .start = 0x00000000, |
| 499 | .end = 0x00009FFF, |
| 500 | .flags = IORESOURCE_MEM, |
| 501 | }, |
| 502 | { |
| 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 | /* |
| 515 | * STAVEM driver/STAPI |
| 516 | */ |
| 517 | { |
| 518 | .name = "AVMEMPartition0", |
| 519 | .start = 0x00000000, |
| 520 | .end = 0x00480000 - 1, /* 4.5 MB total */ |
| 521 | .flags = IORESOURCE_MEM, |
| 522 | }, |
| 523 | /* |
| 524 | * GHW HAL Driver |
| 525 | */ |
| 526 | { |
| 527 | .name = "GraphicsHeap", |
| 528 | .start = 0x22700000, |
| 529 | .end = 0x23500000 - 1, /* 14 MB total */ |
| 530 | .flags = IORESOURCE_MEM, |
| 531 | }, |
| 532 | /* |
| 533 | * multi com buffer area |
| 534 | */ |
| 535 | { |
| 536 | .name = "MulticomSHM", |
| 537 | .start = 0x23700000, |
| 538 | .end = 0x23720000 - 1, |
| 539 | .flags = IORESOURCE_MEM, |
| 540 | }, |
| 541 | /* |
| 542 | * DMA Ring buffer (don't need recording buffers) |
| 543 | */ |
| 544 | { |
| 545 | .name = "BMM_Buffer", |
| 546 | .start = 0x00000000, |
| 547 | .end = 0x000AA000 - 1, |
| 548 | .flags = IORESOURCE_MEM, |
| 549 | }, |
| 550 | /* |
| 551 | * Display bins buffer for unit0 |
| 552 | */ |
| 553 | { |
| 554 | .name = "DisplayBins0", |
| 555 | .start = 0x00000000, |
| 556 | .end = 0x00000FFF, /* 4 KB total */ |
| 557 | .flags = IORESOURCE_MEM, |
| 558 | }, |
| 559 | /* |
| 560 | * Display bins buffer for unit1 |
| 561 | */ |
| 562 | { |
| 563 | .name = "DisplayBins1", |
| 564 | .start = 0x00000000, |
| 565 | .end = 0x00000FFF, /* 4 KB total */ |
| 566 | .flags = IORESOURCE_MEM, |
| 567 | }, |
| 568 | /* |
| 569 | * |
| 570 | * AVFS: player HAL memory |
| 571 | * |
| 572 | * |
| 573 | */ |
| 574 | { |
| 575 | .name = "AvfsDmaMem", |
| 576 | .start = 0x00000000, |
| 577 | .end = 0x002c4c00 - 1, /* 945K * 3 for playback */ |
| 578 | .flags = IORESOURCE_MEM, |
| 579 | }, |
| 580 | /* |
| 581 | * PMEM |
| 582 | */ |
| 583 | { |
| 584 | .name = "DiagPersistentMemory", |
| 585 | .start = 0x00000000, |
| 586 | .end = 0x10000 - 1, |
| 587 | .flags = IORESOURCE_MEM, |
| 588 | }, |
| 589 | /* |
| 590 | * Smartcard |
| 591 | */ |
| 592 | { |
| 593 | .name = "SmartCardInfo", |
| 594 | .start = 0x00000000, |
| 595 | .end = 0x2800 - 1, |
| 596 | .flags = IORESOURCE_MEM, |
| 597 | }, |
| 598 | /* |
| 599 | * NAND Flash |
| 600 | */ |
| 601 | { |
| 602 | .name = "NandFlash", |
| 603 | .start = NAND_FLASH_BASE, |
| 604 | .end = NAND_FLASH_BASE + 0x400 - 1, |
| 605 | .flags = IORESOURCE_MEM, |
| 606 | }, |
| 607 | /* |
| 608 | * Synopsys GMAC Memory Region |
| 609 | */ |
| 610 | { |
| 611 | .name = "GMAC", |
| 612 | .start = 0x00000000, |
| 613 | .end = 0x00010000 - 1, |
| 614 | .flags = IORESOURCE_MEM, |
| 615 | }, |
| 616 | /* |
| 617 | * Add other resources here |
| 618 | */ |
| 619 | { }, |
| 620 | }; |