blob: 3fc5d46687a9ac93e7e81be5528dae205330ebfd [file] [log] [blame]
David VomLehna3a0f8c2009-08-30 17:15:11 -07001/*
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>
David VomLehn4f1e0992010-05-07 15:17:02 -070025#include <linux/ioport.h>
David VomLehna3a0f8c2009-08-30 17:15:11 -070026#include <asm/mach-powertv/asic.h>
David VomLehn4f1e0992010-05-07 15:17:02 -070027#include "prealloc.h"
David VomLehna3a0f8c2009-08-30 17:15:11 -070028
29/*
30 * NON_DVR_CAPABLE CALLIOPE RESOURCES
31 */
32struct resource non_dvr_calliope_resources[] __initdata =
33{
34 /*
35 * VIDEO / LX1
36 */
David VomLehn4f1e0992010-05-07 15:17:02 -070037 /* Delta-Mu 1 image (2MiB) */
38 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
39 IORESOURCE_MEM)
40 /* Delta-Mu 1 monitor (8KiB) */
41 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
42 IORESOURCE_MEM)
43 /* Delta-Mu 1 RAM (~36.9MiB (32MiB - (2MiB + 8KiB))) */
44 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26700000-1,
45 IORESOURCE_MEM)
46
David VomLehna3a0f8c2009-08-30 17:15:11 -070047 /*
48 * Sysaudio Driver
49 */
David VomLehn4f1e0992010-05-07 15:17:02 -070050 /* DSP code and data images (1MiB) */
51 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
52 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
53 /* ADSC CPU PCM buffer (40KiB) */
54 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
55 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
56 /* ADSC AUX buffer (128KiB) */
57 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
58 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
59 /* ADSC Main buffer (128KiB) */
60 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
61 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
62
David VomLehna3a0f8c2009-08-30 17:15:11 -070063 /*
64 * STAVEM driver/STAPI
65 */
David VomLehn4f1e0992010-05-07 15:17:02 -070066 /* 6MiB */
67 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
68 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
69
David VomLehna3a0f8c2009-08-30 17:15:11 -070070 /*
71 * DOCSIS Subsystem
72 */
David VomLehn4f1e0992010-05-07 15:17:02 -070073 /* 7MiB */
74 PREALLOC_DOCSIS("Docsis", 0x27500000, 0x27c00000-1, IORESOURCE_MEM)
75
David VomLehna3a0f8c2009-08-30 17:15:11 -070076 /*
77 * GHW HAL Driver
78 */
David VomLehn4f1e0992010-05-07 15:17:02 -070079 /* PowerTV Graphics Heap (14MiB) */
80 PREALLOC_NORMAL("GraphicsHeap", 0x26700000, 0x26700000+(14*1048576)-1,
81 IORESOURCE_MEM)
82
David VomLehna3a0f8c2009-08-30 17:15:11 -070083 /*
84 * multi com buffer area
85 */
David VomLehn4f1e0992010-05-07 15:17:02 -070086 /* 128KiB */
87 PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
88 IORESOURCE_MEM)
89
David VomLehna3a0f8c2009-08-30 17:15:11 -070090 /*
91 * DMA Ring buffer (don't need recording buffers)
92 */
David VomLehn4f1e0992010-05-07 15:17:02 -070093 /* 680KiB */
94 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
95 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
96
David VomLehna3a0f8c2009-08-30 17:15:11 -070097 /*
98 * Display bins buffer for unit0
99 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700100 /* 4KiB */
101 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
102 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
103
David VomLehna3a0f8c2009-08-30 17:15:11 -0700104 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700105 * AVFS: player HAL memory
David VomLehna3a0f8c2009-08-30 17:15:11 -0700106 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700107 /* 945K * 3 for playback */
108 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
109 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
110
David VomLehna3a0f8c2009-08-30 17:15:11 -0700111 /*
112 * PMEM
113 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700114 /* Persistent memory for diagnostics (64KiB) */
115 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
116 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
117
David VomLehna3a0f8c2009-08-30 17:15:11 -0700118 /*
119 * Smartcard
120 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700121 /* Read and write buffers for Internal/External cards (10KiB) */
122 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
123 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
124
David VomLehna3a0f8c2009-08-30 17:15:11 -0700125 /*
126 * NAND Flash
127 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700128 /* 10KiB */
129 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
130 IORESOURCE_MEM)
131
David VomLehna3a0f8c2009-08-30 17:15:11 -0700132 /*
133 * Synopsys GMAC Memory Region
134 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700135 /* 64KiB */
136 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
137 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
138
139 /*
140 * TFTPBuffer
141 *
142 * This buffer is used in some minimal configurations (e.g. two-way
143 * loader) for storing software images
144 */
145 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
146 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
147
David VomLehna3a0f8c2009-08-30 17:15:11 -0700148 /*
149 * Add other resources here
David VomLehna3a0f8c2009-08-30 17:15:11 -0700150 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700151
152 /*
153 * End of Resource marker
154 */
155 {
156 .flags = 0,
157 },
David VomLehna3a0f8c2009-08-30 17:15:11 -0700158};
159
David VomLehna3a0f8c2009-08-30 17:15:11 -0700160
161struct resource non_dvr_vze_calliope_resources[] __initdata =
162{
163 /*
164 * VIDEO / LX1
165 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700166 /* Delta-Mu 1 image (2MiB) */
167 PREALLOC_NORMAL("ST231aImage", 0x22000000, 0x22200000-1,
168 IORESOURCE_MEM)
169 /* Delta-Mu 1 monitor (8KiB) */
170 PREALLOC_NORMAL("ST231aMonitor", 0x22200000, 0x22202000-1,
171 IORESOURCE_MEM)
172 /* Delta-Mu 1 RAM (10.12MiB) */
173 PREALLOC_NORMAL("MediaMemory1", 0x22202000, 0x22C20B85-1,
174 IORESOURCE_MEM)
175
David VomLehna3a0f8c2009-08-30 17:15:11 -0700176 /*
177 * Sysaudio Driver
178 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700179 /* DSP code and data images (1MiB) */
180 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
181 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
182 /* ADSC CPU PCM buffer (40KiB) */
183 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
184 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
185 /* ADSC AUX buffer (16KiB) */
186 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
187 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
188 /* ADSC Main buffer (16KiB) */
189 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
190 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
191
David VomLehna3a0f8c2009-08-30 17:15:11 -0700192 /*
193 * STAVEM driver/STAPI
194 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700195 /* 3.125MiB */
196 PREALLOC_NORMAL("AVMEMPartition0", 0x20396000, 0x206B6000-1,
197 IORESOURCE_MEM)
198
David VomLehna3a0f8c2009-08-30 17:15:11 -0700199 /*
200 * GHW HAL Driver
201 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700202 /* PowerTV Graphics Heap (2.59MiB) */
203 PREALLOC_NORMAL("GraphicsHeap", 0x20100000, 0x20396000-1,
204 IORESOURCE_MEM)
205
David VomLehna3a0f8c2009-08-30 17:15:11 -0700206 /*
207 * multi com buffer area
208 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700209 /* 128KiB */
210 PREALLOC_NORMAL("MulticomSHM", 0x206B6000, 0x206D6000-1,
211 IORESOURCE_MEM)
212
David VomLehna3a0f8c2009-08-30 17:15:11 -0700213 /*
David VomLehn4f1e0992010-05-07 15:17:02 -0700214 * DMA Ring buffer (don't need recording buffers)
David VomLehna3a0f8c2009-08-30 17:15:11 -0700215 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700216 /* 680KiB */
217 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
218 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
219
David VomLehna3a0f8c2009-08-30 17:15:11 -0700220 /*
221 * Display bins buffer for unit0
222 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700223 /* 4KiB */
224 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
225 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
226
David VomLehna3a0f8c2009-08-30 17:15:11 -0700227 /*
228 * PMEM
229 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700230 /* Persistent memory for diagnostics (64KiB) */
231 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
232 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
233
David VomLehna3a0f8c2009-08-30 17:15:11 -0700234 /*
235 * Smartcard
236 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700237 /* Read and write buffers for Internal/External cards (10KiB) */
238 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
239 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
240
David VomLehna3a0f8c2009-08-30 17:15:11 -0700241 /*
242 * NAND Flash
243 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700244 /* 10KiB */
245 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
246 IORESOURCE_MEM)
247
David VomLehna3a0f8c2009-08-30 17:15:11 -0700248 /*
249 * Synopsys GMAC Memory Region
250 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700251 /* 64KiB */
252 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
253 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
254
David VomLehna3a0f8c2009-08-30 17:15:11 -0700255 /*
256 * Add other resources here
257 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700258
259 /*
260 * End of Resource marker
261 */
262 {
263 .flags = 0,
264 },
David VomLehna3a0f8c2009-08-30 17:15:11 -0700265};
266
267struct resource non_dvr_vzf_calliope_resources[] __initdata =
268{
269 /*
270 * VIDEO / LX1
271 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700272 /* Delta-Mu 1 image (2MiB) */
273 PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
274 IORESOURCE_MEM)
275 /* Delta-Mu 1 monitor (8KiB) */
276 PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
277 IORESOURCE_MEM)
278 /* Delta-Mu 1 RAM (~19.4 (21.5MiB - (2MiB + 8KiB))) */
279 PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x25580000-1,
280 IORESOURCE_MEM)
281
David VomLehna3a0f8c2009-08-30 17:15:11 -0700282 /*
283 * Sysaudio Driver
284 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700285 /* DSP code and data images (1MiB) */
286 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
287 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
288 /* ADSC CPU PCM buffer (40KiB) */
289 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
290 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
291 /* ADSC AUX buffer (128KiB) */
292 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
293 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
294 /* ADSC Main buffer (128KiB) */
295 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
296 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
297
David VomLehna3a0f8c2009-08-30 17:15:11 -0700298 /*
299 * STAVEM driver/STAPI
300 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700301 /* 4.5MiB */
302 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00480000-1,
303 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
304
David VomLehna3a0f8c2009-08-30 17:15:11 -0700305 /*
306 * GHW HAL Driver
307 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700308 /* PowerTV Graphics Heap (14MiB) */
309 PREALLOC_NORMAL("GraphicsHeap", 0x25600000, 0x25600000+(14*1048576)-1,
310 IORESOURCE_MEM)
311
David VomLehna3a0f8c2009-08-30 17:15:11 -0700312 /*
313 * multi com buffer area
314 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700315 /* 128KiB */
316 PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
317 IORESOURCE_MEM)
318
David VomLehna3a0f8c2009-08-30 17:15:11 -0700319 /*
320 * DMA Ring buffer (don't need recording buffers)
321 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700322 /* 680KiB */
323 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
324 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
325
David VomLehna3a0f8c2009-08-30 17:15:11 -0700326 /*
327 * Display bins buffer for unit0
328 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700329 /* 4KiB */
330 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
331 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
332
David VomLehna3a0f8c2009-08-30 17:15:11 -0700333 /*
334 * Display bins buffer for unit1
335 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700336 /* 4KiB */
337 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
338 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
339
David VomLehna3a0f8c2009-08-30 17:15:11 -0700340 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700341 * AVFS: player HAL memory
David VomLehna3a0f8c2009-08-30 17:15:11 -0700342 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700343 /* 945K * 3 for playback */
344 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
345 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
346
David VomLehna3a0f8c2009-08-30 17:15:11 -0700347 /*
348 * PMEM
349 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700350 /* Persistent memory for diagnostics (64KiB) */
351 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
352 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
353
David VomLehna3a0f8c2009-08-30 17:15:11 -0700354 /*
355 * Smartcard
356 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700357 /* Read and write buffers for Internal/External cards (10KiB) */
358 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
359 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
360
David VomLehna3a0f8c2009-08-30 17:15:11 -0700361 /*
362 * NAND Flash
363 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700364 /* 10KiB */
365 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
366 IORESOURCE_MEM)
367
David VomLehna3a0f8c2009-08-30 17:15:11 -0700368 /*
369 * Synopsys GMAC Memory Region
370 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700371 /* 64KiB */
372 PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
373 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
374
David VomLehna3a0f8c2009-08-30 17:15:11 -0700375 /*
376 * Add other resources here
377 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700378
379 /*
380 * End of Resource marker
381 */
382 {
383 .flags = 0,
384 },
David VomLehna3a0f8c2009-08-30 17:15:11 -0700385};