Revision 31410948
b/hw/arm/vexpress.c | ||
---|---|---|
154 | 154 |
hwaddr loader_start; |
155 | 155 |
const hwaddr gic_cpu_if_addr; |
156 | 156 |
uint32_t proc_id; |
157 |
uint32_t num_voltage_sensors; |
|
158 |
const uint32_t *voltages; |
|
157 | 159 |
DBoardInitFn *init; |
158 | 160 |
}; |
159 | 161 |
|
... | ... | |
246 | 248 |
sysbus_create_varargs("l2x0", 0x1e00a000, NULL); |
247 | 249 |
} |
248 | 250 |
|
251 |
/* Voltage values for SYS_CFG_VOLT daughterboard registers; |
|
252 |
* values are in microvolts. |
|
253 |
*/ |
|
254 |
static const uint32_t a9_voltages[] = { |
|
255 |
1000000, /* VD10 : 1.0V : SoC internal logic voltage */ |
|
256 |
1000000, /* VD10_S2 : 1.0V : PL310, L2 cache, RAM, non-PL310 logic */ |
|
257 |
1000000, /* VD10_S3 : 1.0V : Cortex-A9, cores, MPEs, SCU, PL310 logic */ |
|
258 |
1800000, /* VCC1V8 : 1.8V : DDR2 SDRAM, test chip DDR2 I/O supply */ |
|
259 |
900000, /* DDR2VTT : 0.9V : DDR2 SDRAM VTT termination voltage */ |
|
260 |
3300000, /* VCC3V3 : 3.3V : local board supply for misc external logic */ |
|
261 |
}; |
|
262 |
|
|
249 | 263 |
static const VEDBoardInfo a9_daughterboard = { |
250 | 264 |
.motherboard_map = motherboard_legacy_map, |
251 | 265 |
.loader_start = 0x60000000, |
252 | 266 |
.gic_cpu_if_addr = 0x1e000100, |
253 | 267 |
.proc_id = 0x0c000191, |
268 |
.num_voltage_sensors = ARRAY_SIZE(a9_voltages), |
|
269 |
.voltages = a9_voltages, |
|
254 | 270 |
.init = a9_daughterboard_init, |
255 | 271 |
}; |
256 | 272 |
|
... | ... | |
338 | 354 |
/* 0x7ffd0000: PL354 static memory controller: not modelled */ |
339 | 355 |
} |
340 | 356 |
|
357 |
static const uint32_t a15_voltages[] = { |
|
358 |
900000, /* Vcore: 0.9V : CPU core voltage */ |
|
359 |
}; |
|
360 |
|
|
341 | 361 |
static const VEDBoardInfo a15_daughterboard = { |
342 | 362 |
.motherboard_map = motherboard_aseries_map, |
343 | 363 |
.loader_start = 0x80000000, |
344 | 364 |
.gic_cpu_if_addr = 0x2c002000, |
345 | 365 |
.proc_id = 0x14000237, |
366 |
.num_voltage_sensors = ARRAY_SIZE(a15_voltages), |
|
367 |
.voltages = a15_voltages, |
|
346 | 368 |
.init = a15_daughterboard_init, |
347 | 369 |
}; |
348 | 370 |
|
... | ... | |
358 | 380 |
MemoryRegion *vram = g_new(MemoryRegion, 1); |
359 | 381 |
MemoryRegion *sram = g_new(MemoryRegion, 1); |
360 | 382 |
const hwaddr *map = daughterboard->motherboard_map; |
383 |
int i; |
|
361 | 384 |
|
362 | 385 |
daughterboard->init(daughterboard, args->ram_size, args->cpu_model, pic); |
363 | 386 |
|
... | ... | |
370 | 393 |
sysctl = qdev_create(NULL, "realview_sysctl"); |
371 | 394 |
qdev_prop_set_uint32(sysctl, "sys_id", sys_id); |
372 | 395 |
qdev_prop_set_uint32(sysctl, "proc_id", daughterboard->proc_id); |
396 |
qdev_prop_set_uint32(sysctl, "len-db-voltage", |
|
397 |
daughterboard->num_voltage_sensors); |
|
398 |
for (i = 0; i < daughterboard->num_voltage_sensors; i++) { |
|
399 |
char *propname = g_strdup_printf("db-voltage[%d]", i); |
|
400 |
qdev_prop_set_uint32(sysctl, propname, daughterboard->voltages[i]); |
|
401 |
g_free(propname); |
|
402 |
} |
|
373 | 403 |
qdev_init_nofail(sysctl); |
374 | 404 |
sysbus_mmio_map(SYS_BUS_DEVICE(sysctl), 0, map[VE_SYSREGS]); |
375 | 405 |
|
Also available in: Unified diff