prealloc-calliope.c 9.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*
 * Memory pre-allocations for Calliope boxes.
 *
 * Copyright (C) 2005-2009 Scientific-Atlanta, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
R
Ralf Baechle 已提交
20 21
 * Author:	 Ken Eppinett
 *		 David Schleef <ds@schleef.org>
22 23 24
 */

#include <linux/init.h>
25
#include <linux/ioport.h>
26
#include <asm/mach-powertv/asic.h>
27
#include "prealloc.h"
28 29 30 31 32 33 34 35 36

/*
 * NON_DVR_CAPABLE CALLIOPE RESOURCES
 */
struct resource non_dvr_calliope_resources[] __initdata =
{
	/*
	 * VIDEO / LX1
	 */
37 38 39 40 41 42 43 44 45 46
	/* Delta-Mu 1 image (2MiB) */
	PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 monitor (8KiB) */
	PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 RAM (~36.9MiB (32MiB - (2MiB + 8KiB))) */
	PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x26700000-1,
		IORESOURCE_MEM)

47 48 49
	/*
	 * Sysaudio Driver
	 */
50 51 52 53 54 55 56 57 58 59 60 61 62
	/* DSP code and data images (1MiB) */
	PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC CPU PCM buffer (40KiB) */
	PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC AUX buffer (128KiB) */
	PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC Main buffer (128KiB) */
	PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

63 64 65
	/*
	 * STAVEM driver/STAPI
	 */
66 67 68 69
	/* 6MiB */
	PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

70 71 72
	/*
	 * DOCSIS Subsystem
	 */
73 74 75
	/* 7MiB */
	PREALLOC_DOCSIS("Docsis", 0x27500000, 0x27c00000-1, IORESOURCE_MEM)

76 77 78
	/*
	 * GHW HAL Driver
	 */
79 80 81 82
	/* PowerTV Graphics Heap (14MiB) */
	PREALLOC_NORMAL("GraphicsHeap", 0x26700000, 0x26700000+(14*1048576)-1,
		IORESOURCE_MEM)

83 84 85
	/*
	 * multi com buffer area
	 */
86 87 88 89
	/* 128KiB */
	PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
		IORESOURCE_MEM)

90 91 92
	/*
	 * DMA Ring buffer (don't need recording buffers)
	 */
93 94 95 96
	/* 680KiB */
	PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

97 98 99
	/*
	 * Display bins buffer for unit0
	 */
100 101 102 103
	/* 4KiB */
	PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

104 105 106
	/*
	 * AVFS: player HAL memory
	 */
107 108 109 110
	/* 945K * 3 for playback */
	PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

111 112 113
	/*
	 * PMEM
	 */
114 115 116 117
	/* Persistent memory for diagnostics (64KiB) */
	PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
	     (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

118 119 120
	/*
	 * Smartcard
	 */
121 122 123 124
	/* Read and write buffers for Internal/External cards (10KiB) */
	PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

125 126 127
	/*
	 * NAND Flash
	 */
128 129 130 131
	/* 10KiB */
	PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
		IORESOURCE_MEM)

132 133 134
	/*
	 * Synopsys GMAC Memory Region
	 */
135 136 137 138
	/* 64KiB */
	PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

139
	/*
140
	 * TFTPBuffer
141
	 *
142 143
	 *  This buffer is used in some minimal configurations (e.g. two-way
	 *  loader) for storing software images
144
	 */
145 146
	PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
147 148

	/*
149
	 * Add other resources here
150
	 */
151

152
	/*
153
	 * End of Resource marker
154 155
	 */
	{
R
Ralf Baechle 已提交
156
		.flags	= 0,
157 158 159
	},
};

160

161 162 163 164 165
struct resource non_dvr_vze_calliope_resources[] __initdata =
{
	/*
	 * VIDEO / LX1
	 */
166 167 168 169 170 171 172 173 174 175
	/* Delta-Mu 1 image (2MiB) */
	PREALLOC_NORMAL("ST231aImage", 0x22000000, 0x22200000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 monitor (8KiB) */
	PREALLOC_NORMAL("ST231aMonitor", 0x22200000, 0x22202000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 RAM (10.12MiB) */
	PREALLOC_NORMAL("MediaMemory1", 0x22202000, 0x22C20B85-1,
		IORESOURCE_MEM)

176 177 178
	/*
	 * Sysaudio Driver
	 */
179 180 181 182 183 184 185 186 187 188 189 190 191
	/* DSP code and data images (1MiB) */
	PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC CPU PCM buffer (40KiB) */
	PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC AUX buffer (16KiB) */
	PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC Main buffer (16KiB) */
	PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

192 193 194
	/*
	 * STAVEM driver/STAPI
	 */
195 196 197 198
	/* 3.125MiB */
	PREALLOC_NORMAL("AVMEMPartition0", 0x20396000, 0x206B6000-1,
		IORESOURCE_MEM)

199 200 201
	/*
	 * GHW HAL Driver
	 */
202 203 204 205
	/* PowerTV Graphics Heap (2.59MiB) */
	PREALLOC_NORMAL("GraphicsHeap", 0x20100000, 0x20396000-1,
		IORESOURCE_MEM)

206 207 208
	/*
	 * multi com buffer area
	 */
209 210 211 212
	/* 128KiB */
	PREALLOC_NORMAL("MulticomSHM", 0x206B6000, 0x206D6000-1,
		IORESOURCE_MEM)

213
	/*
214
	 * DMA Ring buffer (don't need recording buffers)
215
	 */
216 217 218 219
	/* 680KiB */
	PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

220 221 222
	/*
	 * Display bins buffer for unit0
	 */
223 224 225 226
	/* 4KiB */
	PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

227 228 229
	/*
	 * PMEM
	 */
230 231 232 233
	/* Persistent memory for diagnostics (64KiB) */
	PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
	     (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

234 235 236
	/*
	 * Smartcard
	 */
237 238 239 240
	/* Read and write buffers for Internal/External cards (10KiB) */
	PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

241 242 243
	/*
	 * NAND Flash
	 */
244 245 246 247
	/* 10KiB */
	PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
		IORESOURCE_MEM)

248 249 250
	/*
	 * Synopsys GMAC Memory Region
	 */
251 252 253 254
	/* 64KiB */
	PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

255 256 257
	/*
	 * Add other resources here
	 */
258 259 260 261 262

	/*
	 * End of Resource marker
	 */
	{
R
Ralf Baechle 已提交
263
		.flags	= 0,
264
	},
265 266 267 268 269 270 271
};

struct resource non_dvr_vzf_calliope_resources[] __initdata =
{
	/*
	 * VIDEO / LX1
	 */
272 273 274 275 276 277 278 279 280 281
	/* Delta-Mu 1 image (2MiB) */
	PREALLOC_NORMAL("ST231aImage", 0x24000000, 0x24200000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 monitor (8KiB) */
	PREALLOC_NORMAL("ST231aMonitor", 0x24200000, 0x24202000-1,
		IORESOURCE_MEM)
	/* Delta-Mu 1 RAM (~19.4 (21.5MiB - (2MiB + 8KiB))) */
	PREALLOC_NORMAL("MediaMemory1", 0x24202000, 0x25580000-1,
		IORESOURCE_MEM)

282 283 284
	/*
	 * Sysaudio Driver
	 */
285 286 287 288 289 290 291 292 293 294 295 296 297
	/* DSP code and data images (1MiB) */
	PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC CPU PCM buffer (40KiB) */
	PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC AUX buffer (128KiB) */
	PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
	/* ADSC Main buffer (128KiB) */
	PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

298 299 300
	/*
	 * STAVEM driver/STAPI
	 */
301 302 303 304
	/* 4.5MiB */
	PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00480000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

305 306 307
	/*
	 * GHW HAL Driver
	 */
308 309 310 311
	/* PowerTV Graphics Heap (14MiB) */
	PREALLOC_NORMAL("GraphicsHeap", 0x25600000, 0x25600000+(14*1048576)-1,
		IORESOURCE_MEM)

312 313 314
	/*
	 * multi com buffer area
	 */
315 316 317 318
	/* 128KiB */
	PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
		IORESOURCE_MEM)

319 320 321
	/*
	 * DMA Ring buffer (don't need recording buffers)
	 */
322 323 324 325
	/* 680KiB */
	PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

326 327 328
	/*
	 * Display bins buffer for unit0
	 */
329 330 331 332
	/* 4KiB */
	PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

333 334 335
	/*
	 * Display bins buffer for unit1
	 */
336 337 338 339
	/* 4KiB */
	PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

340 341 342
	/*
	 * AVFS: player HAL memory
	 */
343 344 345 346
	/* 945K * 3 for playback */
	PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

347 348 349
	/*
	 * PMEM
	 */
350 351 352 353
	/* Persistent memory for diagnostics (64KiB) */
	PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
	     (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

354 355 356
	/*
	 * Smartcard
	 */
357 358 359 360
	/* Read and write buffers for Internal/External cards (10KiB) */
	PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

361 362 363
	/*
	 * NAND Flash
	 */
364 365 366 367
	/* 10KiB */
	PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
		IORESOURCE_MEM)

368 369 370
	/*
	 * Synopsys GMAC Memory Region
	 */
371 372 373 374
	/* 64KiB */
	PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
		(IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))

375 376 377
	/*
	 * Add other resources here
	 */
378 379 380 381 382

	/*
	 * End of Resource marker
	 */
	{
R
Ralf Baechle 已提交
383
		.flags	= 0,
384
	},
385
};