Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
[sfrench/cifs-2.6.git] / arch / mips / powertv / asic / prealloc-calliope.c
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 <linux/ioport.h>
26 #include <asm/mach-powertv/asic.h>
27 #include "prealloc.h"
28
29 /*
30  * NON_DVR_CAPABLE CALLIOPE RESOURCES
31  */
32 struct resource non_dvr_calliope_resources[] __initdata =
33 {
34         /*
35          * VIDEO / LX1
36          */
37         /* 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
47         /*
48          * Sysaudio Driver
49          */
50         /* 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
63         /*
64          * STAVEM driver/STAPI
65          */
66         /* 6MiB */
67         PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
68                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
69
70         /*
71          * DOCSIS Subsystem
72          */
73         /* 7MiB */
74         PREALLOC_DOCSIS("Docsis", 0x27500000, 0x27c00000-1, IORESOURCE_MEM)
75
76         /*
77          * GHW HAL Driver
78          */
79         /* PowerTV Graphics Heap (14MiB) */
80         PREALLOC_NORMAL("GraphicsHeap", 0x26700000, 0x26700000+(14*1048576)-1,
81                 IORESOURCE_MEM)
82
83         /*
84          * multi com buffer area
85          */
86         /* 128KiB */
87         PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
88                 IORESOURCE_MEM)
89
90         /*
91          * DMA Ring buffer (don't need recording buffers)
92          */
93         /* 680KiB */
94         PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
95                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
96
97         /*
98          * Display bins buffer for unit0
99          */
100         /* 4KiB */
101         PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
102                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
103
104         /*
105          * AVFS: player HAL memory
106          */
107         /* 945K * 3 for playback */
108         PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
109                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
110
111         /*
112          * PMEM
113          */
114         /* Persistent memory for diagnostics (64KiB) */
115         PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
116              (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
117
118         /*
119          * Smartcard
120          */
121         /* Read and write buffers for Internal/External cards (10KiB) */
122         PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
123                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
124
125         /*
126          * NAND Flash
127          */
128         /* 10KiB */
129         PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
130                 IORESOURCE_MEM)
131
132         /*
133          * Synopsys GMAC Memory Region
134          */
135         /* 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
148         /*
149          * Add other resources here
150          */
151
152         /*
153          * End of Resource marker
154          */
155         {
156                 .flags  = 0,
157         },
158 };
159
160
161 struct resource non_dvr_vze_calliope_resources[] __initdata =
162 {
163         /*
164          * VIDEO / LX1
165          */
166         /* 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
176         /*
177          * Sysaudio Driver
178          */
179         /* 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
192         /*
193          * STAVEM driver/STAPI
194          */
195         /* 3.125MiB */
196         PREALLOC_NORMAL("AVMEMPartition0", 0x20396000, 0x206B6000-1,
197                 IORESOURCE_MEM)
198
199         /*
200          * GHW HAL Driver
201          */
202         /* PowerTV Graphics Heap (2.59MiB) */
203         PREALLOC_NORMAL("GraphicsHeap", 0x20100000, 0x20396000-1,
204                 IORESOURCE_MEM)
205
206         /*
207          * multi com buffer area
208          */
209         /* 128KiB */
210         PREALLOC_NORMAL("MulticomSHM", 0x206B6000, 0x206D6000-1,
211                 IORESOURCE_MEM)
212
213         /*
214          * DMA Ring buffer (don't need recording buffers)
215          */
216         /* 680KiB */
217         PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
218                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
219
220         /*
221          * Display bins buffer for unit0
222          */
223         /* 4KiB */
224         PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
225                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
226
227         /*
228          * PMEM
229          */
230         /* Persistent memory for diagnostics (64KiB) */
231         PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
232              (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
233
234         /*
235          * Smartcard
236          */
237         /* Read and write buffers for Internal/External cards (10KiB) */
238         PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
239                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
240
241         /*
242          * NAND Flash
243          */
244         /* 10KiB */
245         PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
246                 IORESOURCE_MEM)
247
248         /*
249          * Synopsys GMAC Memory Region
250          */
251         /* 64KiB */
252         PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
253                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
254
255         /*
256          * Add other resources here
257          */
258
259         /*
260          * End of Resource marker
261          */
262         {
263                 .flags  = 0,
264         },
265 };
266
267 struct resource non_dvr_vzf_calliope_resources[] __initdata =
268 {
269         /*
270          * VIDEO / LX1
271          */
272         /* 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
282         /*
283          * Sysaudio Driver
284          */
285         /* 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
298         /*
299          * STAVEM driver/STAPI
300          */
301         /* 4.5MiB */
302         PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00480000-1,
303                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
304
305         /*
306          * GHW HAL Driver
307          */
308         /* PowerTV Graphics Heap (14MiB) */
309         PREALLOC_NORMAL("GraphicsHeap", 0x25600000, 0x25600000+(14*1048576)-1,
310                 IORESOURCE_MEM)
311
312         /*
313          * multi com buffer area
314          */
315         /* 128KiB */
316         PREALLOC_NORMAL("MulticomSHM", 0x23700000, 0x23720000-1,
317                 IORESOURCE_MEM)
318
319         /*
320          * DMA Ring buffer (don't need recording buffers)
321          */
322         /* 680KiB */
323         PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
324                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
325
326         /*
327          * Display bins buffer for unit0
328          */
329         /* 4KiB */
330         PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
331                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
332
333         /*
334          * Display bins buffer for unit1
335          */
336         /* 4KiB */
337         PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
338                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
339
340         /*
341          * AVFS: player HAL memory
342          */
343         /* 945K * 3 for playback */
344         PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
345                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
346
347         /*
348          * PMEM
349          */
350         /* Persistent memory for diagnostics (64KiB) */
351         PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
352              (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
353
354         /*
355          * Smartcard
356          */
357         /* Read and write buffers for Internal/External cards (10KiB) */
358         PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1,
359                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
360
361         /*
362          * NAND Flash
363          */
364         /* 10KiB */
365         PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
366                 IORESOURCE_MEM)
367
368         /*
369          * Synopsys GMAC Memory Region
370          */
371         /* 64KiB */
372         PREALLOC_NORMAL("GMAC", 0x00000000, 0x00010000-1,
373                 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
374
375         /*
376          * Add other resources here
377          */
378
379         /*
380          * End of Resource marker
381          */
382         {
383                 .flags  = 0,
384         },
385 };