blob: 96480a2395c0c5ccc41c38cb512dd2b85544615e [file] [log] [blame]
David VomLehna3a0f8c2009-08-30 17:15:11 -07001/*
2 * Memory pre-allocations for Zeus 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 * DVR_CAPABLE RESOURCES
31 */
32struct resource dvr_zeus_resources[] __initdata =
33{
34 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070035 * VIDEO1 / LX1
David VomLehna3a0f8c2009-08-30 17:15:11 -070036 */
David VomLehn4f1e0992010-05-07 15:17:02 -070037 /* Delta-Mu 1 image (2MiB) */
38 PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
39 IORESOURCE_MEM)
40 /* Delta-Mu 1 monitor (8KiB) */
41 PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
42 IORESOURCE_MEM)
43 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
44 PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
45 IORESOURCE_MEM)
46
David VomLehna3a0f8c2009-08-30 17:15:11 -070047 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070048 * VIDEO2 / LX2
David VomLehna3a0f8c2009-08-30 17:15:11 -070049 */
David VomLehn4f1e0992010-05-07 15:17:02 -070050 /* Delta-Mu 2 image (2MiB) */
51 PREALLOC_NORMAL("ST231bImage", 0x30000000, 0x30200000-1,
52 IORESOURCE_MEM)
53 /* Delta-Mu 2 monitor (8KiB) */
54 PREALLOC_NORMAL("ST231bMonitor", 0x30200000, 0x30202000-1,
55 IORESOURCE_MEM)
56 /* Delta-Mu 2 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
57 PREALLOC_NORMAL("MediaMemory2", 0x30202000, 0x32000000-1,
58 IORESOURCE_MEM)
59
David VomLehna3a0f8c2009-08-30 17:15:11 -070060 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070061 * Sysaudio Driver
David VomLehna3a0f8c2009-08-30 17:15:11 -070062 */
David VomLehn4f1e0992010-05-07 15:17:02 -070063 /* DSP code and data images (1MiB) */
64 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
65 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
66 /* ADSC CPU PCM buffer (40KiB) */
67 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
68 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
69 /* ADSC AUX buffer (16KiB) */
70 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
71 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
72 /* ADSC Main buffer (16KiB) */
73 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
74 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
75
David VomLehna3a0f8c2009-08-30 17:15:11 -070076 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070077 * STAVEM driver/STAPI
78 *
David VomLehna3a0f8c2009-08-30 17:15:11 -070079 * This memory area is used for allocating buffers for Video decoding
80 * purposes. Allocation/De-allocation within this buffer is managed
81 * by the STAVMEM driver of the STAPI. They could be Decimated
82 * Picture Buffers, Intermediate Buffers, as deemed necessary for
83 * video decoding purposes, for any video decoders on Zeus.
David VomLehna3a0f8c2009-08-30 17:15:11 -070084 */
David VomLehn4f1e0992010-05-07 15:17:02 -070085 /* 12MiB */
86 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00c00000-1,
87 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
88
David VomLehna3a0f8c2009-08-30 17:15:11 -070089 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070090 * DOCSIS Subsystem
David VomLehna3a0f8c2009-08-30 17:15:11 -070091 */
David VomLehn4f1e0992010-05-07 15:17:02 -070092 /* 7MiB */
93 PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
94
David VomLehna3a0f8c2009-08-30 17:15:11 -070095 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -070096 * GHW HAL Driver
David VomLehna3a0f8c2009-08-30 17:15:11 -070097 */
David VomLehn4f1e0992010-05-07 15:17:02 -070098 /* PowerTV Graphics Heap (14MiB) */
99 PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
100 IORESOURCE_MEM)
101
David VomLehna3a0f8c2009-08-30 17:15:11 -0700102 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700103 * multi com buffer area
David VomLehna3a0f8c2009-08-30 17:15:11 -0700104 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700105 /* 128KiB */
106 PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
107 IORESOURCE_MEM)
108
David VomLehna3a0f8c2009-08-30 17:15:11 -0700109 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700110 * DMA Ring buffer
David VomLehna3a0f8c2009-08-30 17:15:11 -0700111 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700112 /* 2.5MiB */
113 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
114 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
115
David VomLehna3a0f8c2009-08-30 17:15:11 -0700116 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700117 * Display bins buffer for unit0
David VomLehna3a0f8c2009-08-30 17:15:11 -0700118 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700119 /* 4KiB */
120 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
121 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
122
David VomLehna3a0f8c2009-08-30 17:15:11 -0700123 /*
David VomLehn4f1e0992010-05-07 15:17:02 -0700124 * Display bins buffer for unit1
David VomLehna3a0f8c2009-08-30 17:15:11 -0700125 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700126 /* 4KiB */
127 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
128 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
129
David VomLehna3a0f8c2009-08-30 17:15:11 -0700130 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700131 * ITFS
David VomLehna3a0f8c2009-08-30 17:15:11 -0700132 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700133 /* 815,104 bytes each for 2 ITFS partitions. */
134 PREALLOC_NORMAL("ITFS", 0x00000000, 0x0018E000-1,
135 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
136
David VomLehna3a0f8c2009-08-30 17:15:11 -0700137 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700138 * AVFS
David VomLehna3a0f8c2009-08-30 17:15:11 -0700139 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700140 /* (945K * 8) = (128K * 3) 5 playbacks / 3 server */
141 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x007c2000-1,
142 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
143 /* 4KiB */
144 PREALLOC_NORMAL("AvfsFileSys", 0x00000000, 0x00001000-1,
145 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
146
David VomLehna3a0f8c2009-08-30 17:15:11 -0700147 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700148 * PMEM
David VomLehna3a0f8c2009-08-30 17:15:11 -0700149 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700150 /* Persistent memory for diagnostics (64KiB) */
151 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
152 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
153
David VomLehna3a0f8c2009-08-30 17:15:11 -0700154 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700155 * Smartcard
David VomLehna3a0f8c2009-08-30 17:15:11 -0700156 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700157 /* 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
163 *
164 * This buffer is used in some minimal configurations (e.g. two-way
165 * loader) for storing software images
166 */
167 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
168 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
169
David VomLehna3a0f8c2009-08-30 17:15:11 -0700170 /*
171 * Add other resources here
172 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700173
174 /*
175 * End of Resource marker
176 */
177 {
178 .flags = 0,
179 },
David VomLehna3a0f8c2009-08-30 17:15:11 -0700180};
181
182/*
183 * NON_DVR_CAPABLE ZEUS RESOURCES
184 */
185struct resource non_dvr_zeus_resources[] __initdata =
186{
187 /*
188 * VIDEO1 / LX1
189 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700190 /* Delta-Mu 1 image (2MiB) */
191 PREALLOC_NORMAL("ST231aImage", 0x20000000, 0x20200000-1,
192 IORESOURCE_MEM)
193 /* Delta-Mu 1 monitor (8KiB) */
194 PREALLOC_NORMAL("ST231aMonitor", 0x20200000, 0x20202000-1,
195 IORESOURCE_MEM)
196 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
197 PREALLOC_NORMAL("MediaMemory1", 0x20202000, 0x22000000-1,
198 IORESOURCE_MEM)
199
David VomLehna3a0f8c2009-08-30 17:15:11 -0700200 /*
201 * Sysaudio Driver
202 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700203 /* DSP code and data images (1MiB) */
204 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
205 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
206 /* ADSC CPU PCM buffer (40KiB) */
207 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
208 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
209 /* ADSC AUX buffer (16KiB) */
210 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00004000-1,
211 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
212 /* ADSC Main buffer (16KiB) */
213 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00004000-1,
214 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
215
David VomLehna3a0f8c2009-08-30 17:15:11 -0700216 /*
217 * STAVEM driver/STAPI
218 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700219 /* 6MiB */
220 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
221 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
222
David VomLehna3a0f8c2009-08-30 17:15:11 -0700223 /*
224 * DOCSIS Subsystem
225 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700226 /* 7MiB */
227 PREALLOC_DOCSIS("Docsis", 0x40100000, 0x40800000-1, IORESOURCE_MEM)
228
David VomLehna3a0f8c2009-08-30 17:15:11 -0700229 /*
230 * GHW HAL Driver
231 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700232 /* PowerTV Graphics Heap (14MiB) */
233 PREALLOC_NORMAL("GraphicsHeap", 0x46900000, 0x47700000-1,
234 IORESOURCE_MEM)
235
David VomLehna3a0f8c2009-08-30 17:15:11 -0700236 /*
237 * multi com buffer area
238 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700239 /* 128KiB */
240 PREALLOC_NORMAL("MulticomSHM", 0x47900000, 0x47920000-1,
241 IORESOURCE_MEM)
242
David VomLehna3a0f8c2009-08-30 17:15:11 -0700243 /*
244 * DMA Ring buffer
245 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700246 /* 2.5MiB */
247 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x00280000-1,
248 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
249
David VomLehna3a0f8c2009-08-30 17:15:11 -0700250 /*
251 * Display bins buffer for unit0
252 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700253 /* 4KiB */
254 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
255 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
256
David VomLehna3a0f8c2009-08-30 17:15:11 -0700257 /*
David VomLehna3a0f8c2009-08-30 17:15:11 -0700258 * AVFS: player HAL memory
David VomLehna3a0f8c2009-08-30 17:15:11 -0700259 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700260 /* 945K * 3 for playback */
261 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
262 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
263
David VomLehna3a0f8c2009-08-30 17:15:11 -0700264 /*
265 * PMEM
266 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700267 /* Persistent memory for diagnostics (64KiB) */
268 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
269 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
270
David VomLehna3a0f8c2009-08-30 17:15:11 -0700271 /*
272 * Smartcard
273 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700274 /* Read and write buffers for Internal/External cards (10KiB) */
275 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
276 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
277
David VomLehna3a0f8c2009-08-30 17:15:11 -0700278 /*
279 * NAND Flash
280 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700281 /* 10KiB */
282 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
283 IORESOURCE_MEM)
284
285 /*
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
David VomLehna3a0f8c2009-08-30 17:15:11 -0700294 /*
295 * Add other resources here
296 */
David VomLehn4f1e0992010-05-07 15:17:02 -0700297
298 /*
299 * End of Resource marker
300 */
301 {
302 .flags = 0,
303 },
David VomLehna3a0f8c2009-08-30 17:15:11 -0700304};