aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/powertv/asic/prealloc-cronuslite.c
diff options
context:
space:
mode:
authorDavid VomLehn <dvomlehn@cisco.com>2010-05-07 18:17:02 -0400
committerRalf Baechle <ralf@linux-mips.org>2010-05-21 16:31:17 -0400
commit4f1e099582c119cf73d6a873b53e8edaa773d065 (patch)
treefa1f06b4a40d60ff2fa20445d553069096cb10c3 /arch/mips/powertv/asic/prealloc-cronuslite.c
parent3f135530448104c01153fe048024366203196798 (diff)
MIPS: Clean up tables for bootmem allocation
Modifications to the boot memory allocation structures to make them easier to read and maintain. Note that this will not pass checkpatch because it wants a structure element initializer to be enclosed in a do {...} while(...), which is obvious nonsensical. Signed-off-by: David VomLehn <dvomlehn@cisco.com> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/1207/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/powertv/asic/prealloc-cronuslite.c')
-rw-r--r--arch/mips/powertv/asic/prealloc-cronuslite.c302
1 files changed, 93 insertions, 209 deletions
diff --git a/arch/mips/powertv/asic/prealloc-cronuslite.c b/arch/mips/powertv/asic/prealloc-cronuslite.c
index 23a905613c04..b5537e49e7f5 100644
--- a/arch/mips/powertv/asic/prealloc-cronuslite.c
+++ b/arch/mips/powertv/asic/prealloc-cronuslite.c
@@ -22,7 +22,9 @@
22 */ 22 */
23 23
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/ioport.h>
25#include <asm/mach-powertv/asic.h> 26#include <asm/mach-powertv/asic.h>
27#include "prealloc.h"
26 28
27/* 29/*
28 * NON_DVR_CAPABLE CRONUSLITE RESOURCES 30 * NON_DVR_CAPABLE CRONUSLITE RESOURCES
@@ -30,261 +32,143 @@
30struct resource non_dvr_cronuslite_resources[] __initdata = 32struct resource non_dvr_cronuslite_resources[] __initdata =
31{ 33{
32 /* 34 /*
33 *
34 * VIDEO2 / LX2 35 * VIDEO2 / LX2
35 *
36 */ 36 */
37 { 37 /* Delta-Mu 1 image (2MiB) */
38 .name = "ST231aImage", /* Delta-Mu 2 image and ram */ 38 PREALLOC_NORMAL("ST231aImage", 0x60000000, 0x60200000-1,
39 .start = 0x60000000, 39 IORESOURCE_MEM)
40 .end = 0x601FFFFF, /* 2MiB */ 40 /* Delta-Mu 1 monitor (8KiB) */
41 .flags = IORESOURCE_IO, 41 PREALLOC_NORMAL("ST231aMonitor", 0x60200000, 0x60202000-1,
42 }, 42 IORESOURCE_MEM)
43 { 43 /* Delta-Mu 1 RAM (~29.9MiB (32MiB - (2MiB + 8KiB))) */
44 .name = "ST231aMonitor", /* 8KiB block ST231b monitor */ 44 PREALLOC_NORMAL("MediaMemory1", 0x60202000, 0x62000000-1,
45 .start = 0x60200000, 45 IORESOURCE_MEM)
46 .end = 0x60201FFF, 46
47 .flags = IORESOURCE_IO,
48 },
49 {
50 .name = "MediaMemory1",
51 .start = 0x60202000,
52 .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */
53 .flags = IORESOURCE_IO,
54 },
55 /* 47 /*
56 *
57 * Sysaudio Driver 48 * Sysaudio Driver
58 *
59 * This driver requires:
60 *
61 * Arbitrary Based Buffers:
62 * DSP_Image_Buff - DSP code and data images (1MB)
63 * ADSC_CPU_PCM_Buff - ADSC CPU PCM buffer (40KB)
64 * ADSC_AUX_Buff - ADSC AUX buffer (16KB)
65 * ADSC_Main_Buff - ADSC Main buffer (16KB)
66 *
67 */ 49 */
68 { 50 /* DSP code and data images (1MiB) */
69 .name = "DSP_Image_Buff", 51 PREALLOC_NORMAL("DSP_Image_Buff", 0x00000000, 0x00100000-1,
70 .start = 0x00000000, 52 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
71 .end = 0x000FFFFF, 53 /* ADSC CPU PCM buffer (40KiB) */
72 .flags = IORESOURCE_MEM, 54 PREALLOC_NORMAL("ADSC_CPU_PCM_Buff", 0x00000000, 0x0000A000-1,
73 }, 55 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
74 { 56 /* ADSC AUX buffer (128KiB) */
75 .name = "ADSC_CPU_PCM_Buff", 57 PREALLOC_NORMAL("ADSC_AUX_Buff", 0x00000000, 0x00020000-1,
76 .start = 0x00000000, 58 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
77 .end = 0x00009FFF, 59 /* ADSC Main buffer (128KiB) */
78 .flags = IORESOURCE_MEM, 60 PREALLOC_NORMAL("ADSC_Main_Buff", 0x00000000, 0x00020000-1,
79 }, 61 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
80 { 62
81 .name = "ADSC_AUX_Buff",
82 .start = 0x00000000,
83 .end = 0x00003FFF,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "ADSC_Main_Buff",
88 .start = 0x00000000,
89 .end = 0x00003FFF,
90 .flags = IORESOURCE_MEM,
91 },
92 /* 63 /*
93 *
94 * STAVEM driver/STAPI 64 * STAVEM driver/STAPI
95 * 65 *
96 * This driver requires:
97 *
98 * Arbitrary Based Buffers:
99 * This memory area is used for allocating buffers for Video decoding 66 * This memory area is used for allocating buffers for Video decoding
100 * purposes. Allocation/De-allocation within this buffer is managed 67 * purposes. Allocation/De-allocation within this buffer is managed
101 * by the STAVMEM driver of the STAPI. They could be Decimated 68 * by the STAVMEM driver of the STAPI. They could be Decimated
102 * Picture Buffers, Intermediate Buffers, as deemed necessary for 69 * Picture Buffers, Intermediate Buffers, as deemed necessary for
103 * video decoding purposes, for any video decoders on Zeus. 70 * video decoding purposes, for any video decoders on Zeus.
104 *
105 */ 71 */
106 { 72 /* 6MiB */
107 .name = "AVMEMPartition0", 73 PREALLOC_NORMAL("AVMEMPartition0", 0x00000000, 0x00600000-1,
108 .start = 0x63580000, 74 IORESOURCE_MEM)
109 .end = 0x63B80000 - 1, /* 6 MB total */ 75
110 .flags = IORESOURCE_IO,
111 },
112 /* 76 /*
113 *
114 * DOCSIS Subsystem 77 * DOCSIS Subsystem
115 *
116 * This driver requires:
117 *
118 * Arbitrary Based Buffers:
119 * Docsis -
120 *
121 */ 78 */
122 { 79 /* 7MiB */
123 .name = "Docsis", 80 PREALLOC_DOCSIS("Docsis", 0x67500000, 0x67c00000-1, IORESOURCE_MEM)
124 .start = 0x62000000, 81
125 .end = 0x62700000 - 1, /* 7 MB total */
126 .flags = IORESOURCE_IO,
127 },
128 /* 82 /*
129 *
130 * GHW HAL Driver 83 * GHW HAL Driver
131 *
132 * This driver requires:
133 *
134 * Arbitrary Based Buffers:
135 * GraphicsHeap - PowerTV Graphics Heap
136 *
137 */ 84 */
138 { 85 /* PowerTV Graphics Heap (14MiB) */
139 .name = "GraphicsHeap", 86 PREALLOC_NORMAL("GraphicsHeap", 0x62700000, 0x63500000-1,
140 .start = 0x62700000, 87 IORESOURCE_MEM)
141 .end = 0x63500000 - 1, /* 14 MB total */ 88
142 .flags = IORESOURCE_IO,
143 },
144 /* 89 /*
145 *
146 * multi com buffer area 90 * multi com buffer area
147 *
148 * This driver requires:
149 *
150 * Arbitrary Based Buffers:
151 * Docsis -
152 *
153 */ 91 */
154 { 92 /* 128KiB */
155 .name = "MulticomSHM", 93 PREALLOC_NORMAL("MulticomSHM", 0x26000000, 0x26020000-1,
156 .start = 0x26000000, 94 IORESOURCE_MEM)
157 .end = 0x26020000 - 1, 95
158 .flags = IORESOURCE_MEM,
159 },
160 /* 96 /*
161 * 97 * DMA Ring buffer (don't need recording buffers)
162 * DMA Ring buffer
163 *
164 * This driver requires:
165 *
166 * Arbitrary Based Buffers:
167 * Docsis -
168 *
169 */ 98 */
170 { 99 /* 680KiB */
171 .name = "BMM_Buffer", 100 PREALLOC_NORMAL("BMM_Buffer", 0x00000000, 0x000AA000-1,
172 .start = 0x00000000, 101 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
173 .end = 0x000AA000 - 1, 102
174 .flags = IORESOURCE_MEM,
175 },
176 /* 103 /*
177 *
178 * Display bins buffer for unit0 104 * Display bins buffer for unit0
179 *
180 * This driver requires:
181 *
182 * Arbitrary Based Buffers:
183 * Display Bins for unit0
184 *
185 */ 105 */
186 { 106 /* 4KiB */
187 .name = "DisplayBins0", 107 PREALLOC_NORMAL("DisplayBins0", 0x00000000, 0x00001000-1,
188 .start = 0x00000000, 108 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
189 .end = 0x00000FFF, /* 4 KB total */ 109
190 .flags = IORESOURCE_MEM,
191 },
192 /* 110 /*
193 * 111 * Display bins buffer for unit1
194 * Display bins buffer
195 *
196 * This driver requires:
197 *
198 * Arbitrary Based Buffers:
199 * Display Bins for unit1
200 *
201 */ 112 */
202 { 113 /* 4KiB */
203 .name = "DisplayBins1", 114 PREALLOC_NORMAL("DisplayBins1", 0x00000000, 0x00001000-1,
204 .start = 0x63B83000, 115 IORESOURCE_MEM)
205 .end = 0x63B84000 - 1, /* 4 KB total */ 116
206 .flags = IORESOURCE_IO,
207 },
208 /* 117 /*
209 *
210 * AVFS: player HAL memory 118 * AVFS: player HAL memory
211 *
212 *
213 */ 119 */
214 { 120 /* 945K * 3 for playback */
215 .name = "AvfsDmaMem", 121 PREALLOC_NORMAL("AvfsDmaMem", 0x00000000, 0x002c4c00-1,
216 .start = 0x63B84000, 122 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
217 .end = 0x63E48C00 - 1, /* 945K * 3 for playback */ 123
218 .flags = IORESOURCE_IO,
219 },
220 /* 124 /*
221 *
222 * PMEM 125 * PMEM
223 *
224 * This driver requires:
225 *
226 * Arbitrary Based Buffers:
227 * Persistent memory for diagnostics.
228 *
229 */ 126 */
230 { 127 /* Persistent memory for diagnostics (64KiB) */
231 .name = "DiagPersistentMemory", 128 PREALLOC_PMEM("DiagPersistentMemory", 0x00000000, 0x10000-1,
232 .start = 0x00000000, 129 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
233 .end = 0x10000 - 1, 130
234 .flags = IORESOURCE_MEM,
235 },
236 /* 131 /*
237 *
238 * Smartcard 132 * Smartcard
239 *
240 * This driver requires:
241 *
242 * Arbitrary Based Buffers:
243 * Read and write buffers for Internal/External cards
244 *
245 */ 133 */
246 { 134 /* Read and write buffers for Internal/External cards (10KiB) */
247 .name = "SmartCardInfo", 135 PREALLOC_NORMAL("SmartCardInfo", 0x00000000, 0x2800-1, IORESOURCE_MEM)
248 .start = 0x63B80000, 136
249 .end = 0x63B82800 - 1,
250 .flags = IORESOURCE_IO,
251 },
252 /* 137 /*
253 *
254 * KAVNET 138 * KAVNET
255 * NP Reset Vector - must be of the form xxCxxxxx
256 * NP Image - must be video bank 1
257 * NP IPC - must be video bank 2
258 */ 139 */
259 { 140 /* NP Reset Vector - must be of the form xxCxxxxx (4KiB) */
260 .name = "NP_Reset_Vector", 141 PREALLOC_NORMAL("NP_Reset_Vector", 0x27c00000, 0x27c01000-1,
261 .start = 0x27c00000, 142 IORESOURCE_MEM)
262 .end = 0x27c01000 - 1, 143 /* NP Image - must be video bank 1 (320KiB) */
263 .flags = IORESOURCE_MEM, 144 PREALLOC_NORMAL("NP_Image", 0x27020000, 0x27070000-1, IORESOURCE_MEM)
264 }, 145 /* NP IPC - must be video bank 2 (512KiB) */
265 { 146 PREALLOC_NORMAL("NP_IPC", 0x63500000, 0x63580000-1, IORESOURCE_MEM)
266 .name = "NP_Image", 147
267 .start = 0x27020000,
268 .end = 0x27060000 - 1,
269 .flags = IORESOURCE_MEM,
270 },
271 {
272 .name = "NP_IPC",
273 .start = 0x63500000,
274 .end = 0x63580000 - 1,
275 .flags = IORESOURCE_IO,
276 },
277 /* 148 /*
278 * NAND Flash 149 * NAND Flash
279 */ 150 */
280 { 151 /* 10KiB */
281 .name = "NandFlash", 152 PREALLOC_NORMAL("NandFlash", NAND_FLASH_BASE, NAND_FLASH_BASE+0x400-1,
282 .start = NAND_FLASH_BASE, 153 IORESOURCE_MEM)
283 .end = NAND_FLASH_BASE + 0x400 - 1, 154
284 .flags = IORESOURCE_IO, 155 /*
285 }, 156 * TFTPBuffer
157 *
158 * This buffer is used in some minimal configurations (e.g. two-way
159 * loader) for storing software images
160 */
161 PREALLOC_TFTP("TFTPBuffer", 0x00000000, MEBIBYTE(80)-1,
162 (IORESOURCE_MEM|IORESOURCE_PTV_RES_LOEXT))
163
286 /* 164 /*
287 * Add other resources here 165 * Add other resources here
288 */ 166 */
289 { }, 167
168 /*
169 * End of Resource marker
170 */
171 {
172 .flags = 0,
173 },
290}; 174};