Lines Matching +full:- +full:- +full:-
4 * Copyright (c) 2016-2019, IBM Corporation.
7 * the COPYING file in the top-level directory.
15 #include "qemu/error-report.h"
19 #include "target/arm/cpu-qom.h"
89 /* Shared Peripheral Interrupt values below are offset by -32 from datasheet */
129 [ASPEED_DEV_I2C] = 110, /* 110 -> 125 */
136 [ASPEED_DEV_KCS] = 138, /* 138 -> 142 */
140 [ASPEED_DEV_I3C] = 102, /* 102 -> 107 */
148 return qdev_get_gpio_in(DEVICE(&a->a7mpcore), sc->irqmap[dev]); in aspeed_soc_ast2600_get_irq()
164 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2600_init()
165 object_initialize_child(obj, "cpu[*]", &a->cpu[i], in aspeed_soc_ast2600_init()
169 snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname); in aspeed_soc_ast2600_init()
170 object_initialize_child(obj, "scu", &s->scu, typename); in aspeed_soc_ast2600_init()
171 qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev", in aspeed_soc_ast2600_init()
172 sc->silicon_rev); in aspeed_soc_ast2600_init()
173 object_property_add_alias(obj, "hw-strap1", OBJECT(&s->scu), in aspeed_soc_ast2600_init()
174 "hw-strap1"); in aspeed_soc_ast2600_init()
175 object_property_add_alias(obj, "hw-strap2", OBJECT(&s->scu), in aspeed_soc_ast2600_init()
176 "hw-strap2"); in aspeed_soc_ast2600_init()
177 object_property_add_alias(obj, "hw-prot-key", OBJECT(&s->scu), in aspeed_soc_ast2600_init()
178 "hw-prot-key"); in aspeed_soc_ast2600_init()
180 object_initialize_child(obj, "a7mpcore", &a->a7mpcore, in aspeed_soc_ast2600_init()
183 object_initialize_child(obj, "rtc", &s->rtc, TYPE_ASPEED_RTC); in aspeed_soc_ast2600_init()
185 snprintf(typename, sizeof(typename), "aspeed.timer-%s", socname); in aspeed_soc_ast2600_init()
186 object_initialize_child(obj, "timerctrl", &s->timerctrl, typename); in aspeed_soc_ast2600_init()
188 snprintf(typename, sizeof(typename), "aspeed.adc-%s", socname); in aspeed_soc_ast2600_init()
189 object_initialize_child(obj, "adc", &s->adc, typename); in aspeed_soc_ast2600_init()
191 snprintf(typename, sizeof(typename), "aspeed.i2c-%s", socname); in aspeed_soc_ast2600_init()
192 object_initialize_child(obj, "i2c", &s->i2c, typename); in aspeed_soc_ast2600_init()
194 object_initialize_child(obj, "peci", &s->peci, TYPE_ASPEED_PECI); in aspeed_soc_ast2600_init()
196 snprintf(typename, sizeof(typename), "aspeed.fmc-%s", socname); in aspeed_soc_ast2600_init()
197 object_initialize_child(obj, "fmc", &s->fmc, typename); in aspeed_soc_ast2600_init()
199 for (i = 0; i < sc->spis_num; i++) { in aspeed_soc_ast2600_init()
200 snprintf(typename, sizeof(typename), "aspeed.spi%d-%s", i + 1, socname); in aspeed_soc_ast2600_init()
201 object_initialize_child(obj, "spi[*]", &s->spi[i], typename); in aspeed_soc_ast2600_init()
204 for (i = 0; i < sc->ehcis_num; i++) { in aspeed_soc_ast2600_init()
205 object_initialize_child(obj, "ehci[*]", &s->ehci[i], in aspeed_soc_ast2600_init()
209 snprintf(typename, sizeof(typename), "aspeed.sdmc-%s", socname); in aspeed_soc_ast2600_init()
210 object_initialize_child(obj, "sdmc", &s->sdmc, typename); in aspeed_soc_ast2600_init()
211 object_property_add_alias(obj, "ram-size", OBJECT(&s->sdmc), in aspeed_soc_ast2600_init()
212 "ram-size"); in aspeed_soc_ast2600_init()
214 for (i = 0; i < sc->wdts_num; i++) { in aspeed_soc_ast2600_init()
215 snprintf(typename, sizeof(typename), "aspeed.wdt-%s", socname); in aspeed_soc_ast2600_init()
216 object_initialize_child(obj, "wdt[*]", &s->wdt[i], typename); in aspeed_soc_ast2600_init()
219 for (i = 0; i < sc->macs_num; i++) { in aspeed_soc_ast2600_init()
220 object_initialize_child(obj, "ftgmac100[*]", &s->ftgmac100[i], in aspeed_soc_ast2600_init()
223 object_initialize_child(obj, "mii[*]", &s->mii[i], TYPE_ASPEED_MII); in aspeed_soc_ast2600_init()
226 for (i = 0; i < sc->uarts_num; i++) { in aspeed_soc_ast2600_init()
227 object_initialize_child(obj, "uart[*]", &s->uart[i], TYPE_SERIAL_MM); in aspeed_soc_ast2600_init()
230 snprintf(typename, sizeof(typename), TYPE_ASPEED_XDMA "-%s", socname); in aspeed_soc_ast2600_init()
231 object_initialize_child(obj, "xdma", &s->xdma, typename); in aspeed_soc_ast2600_init()
233 snprintf(typename, sizeof(typename), "aspeed.gpio-%s", socname); in aspeed_soc_ast2600_init()
234 object_initialize_child(obj, "gpio", &s->gpio, typename); in aspeed_soc_ast2600_init()
236 snprintf(typename, sizeof(typename), "aspeed.gpio-%s-1_8v", socname); in aspeed_soc_ast2600_init()
237 object_initialize_child(obj, "gpio_1_8v", &s->gpio_1_8v, typename); in aspeed_soc_ast2600_init()
239 snprintf(typename, sizeof(typename), "aspeed.sdhci-%s", socname); in aspeed_soc_ast2600_init()
240 object_initialize_child(obj, "sd-controller", &s->sdhci, typename); in aspeed_soc_ast2600_init()
242 object_property_set_int(OBJECT(&s->sdhci), "num-slots", 2, &error_abort); in aspeed_soc_ast2600_init()
246 object_initialize_child(obj, "sd-controller.sdhci[*]", in aspeed_soc_ast2600_init()
247 &s->sdhci.slots[i], TYPE_SYSBUS_SDHCI); in aspeed_soc_ast2600_init()
250 object_initialize_child(obj, "emmc-controller", &s->emmc, typename); in aspeed_soc_ast2600_init()
252 object_property_set_int(OBJECT(&s->emmc), "num-slots", 1, &error_abort); in aspeed_soc_ast2600_init()
254 object_initialize_child(obj, "emmc-controller.sdhci", &s->emmc.slots[0], in aspeed_soc_ast2600_init()
257 object_initialize_child(obj, "lpc", &s->lpc, TYPE_ASPEED_LPC); in aspeed_soc_ast2600_init()
259 snprintf(typename, sizeof(typename), "aspeed.hace-%s", socname); in aspeed_soc_ast2600_init()
260 object_initialize_child(obj, "hace", &s->hace, typename); in aspeed_soc_ast2600_init()
262 object_initialize_child(obj, "i3c", &s->i3c, TYPE_ASPEED_I3C); in aspeed_soc_ast2600_init()
264 object_initialize_child(obj, "sbc", &s->sbc, TYPE_ASPEED_SBC); in aspeed_soc_ast2600_init()
266 object_initialize_child(obj, "iomem", &s->iomem, TYPE_UNIMPLEMENTED_DEVICE); in aspeed_soc_ast2600_init()
267 object_initialize_child(obj, "video", &s->video, TYPE_UNIMPLEMENTED_DEVICE); in aspeed_soc_ast2600_init()
268 object_initialize_child(obj, "dpmcu", &s->dpmcu, TYPE_UNIMPLEMENTED_DEVICE); in aspeed_soc_ast2600_init()
269 object_initialize_child(obj, "emmc-boot-controller", in aspeed_soc_ast2600_init()
270 &s->emmc_boot_controller, in aspeed_soc_ast2600_init()
274 object_initialize_child(obj, "fsi[*]", &s->fsi[i], TYPE_ASPEED_APB2OPB); in aspeed_soc_ast2600_init()
281 …ocumentation/ddi0388/e/the-system-control-coprocessors/summary-of-system-control-coprocessor-regis…
298 memory_region_init(&s->spi_boot_container, OBJECT(s), in aspeed_soc_ast2600_realize()
300 memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SPI_BOOT], in aspeed_soc_ast2600_realize()
301 &s->spi_boot_container); in aspeed_soc_ast2600_realize()
304 aspeed_mmio_map_unimplemented(s, SYS_BUS_DEVICE(&s->iomem), "aspeed.io", in aspeed_soc_ast2600_realize()
305 sc->memmap[ASPEED_DEV_IOMEM], in aspeed_soc_ast2600_realize()
309 aspeed_mmio_map_unimplemented(s, SYS_BUS_DEVICE(&s->video), "aspeed.video", in aspeed_soc_ast2600_realize()
310 sc->memmap[ASPEED_DEV_VIDEO], 0x1000); in aspeed_soc_ast2600_realize()
313 aspeed_mmio_map_unimplemented(s, SYS_BUS_DEVICE(&s->emmc_boot_controller), in aspeed_soc_ast2600_realize()
314 "aspeed.emmc-boot-controller", in aspeed_soc_ast2600_realize()
315 sc->memmap[ASPEED_DEV_EMMC_BC], 0x1000); in aspeed_soc_ast2600_realize()
318 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2600_realize()
319 if (sc->num_cpus > 1) { in aspeed_soc_ast2600_realize()
320 object_property_set_int(OBJECT(&a->cpu[i]), "reset-cbar", in aspeed_soc_ast2600_realize()
323 object_property_set_int(OBJECT(&a->cpu[i]), "mp-affinity", in aspeed_soc_ast2600_realize()
326 object_property_set_int(OBJECT(&a->cpu[i]), "cntfrq", 1125000000, in aspeed_soc_ast2600_realize()
328 object_property_set_bool(OBJECT(&a->cpu[i]), "neon", false, in aspeed_soc_ast2600_realize()
330 object_property_set_bool(OBJECT(&a->cpu[i]), "vfp-d32", false, in aspeed_soc_ast2600_realize()
332 object_property_set_link(OBJECT(&a->cpu[i]), "memory", in aspeed_soc_ast2600_realize()
333 OBJECT(s->memory), &error_abort); in aspeed_soc_ast2600_realize()
335 if (!qdev_realize(DEVICE(&a->cpu[i]), NULL, errp)) { in aspeed_soc_ast2600_realize()
341 object_property_set_int(OBJECT(&a->a7mpcore), "num-cpu", sc->num_cpus, in aspeed_soc_ast2600_realize()
343 object_property_set_int(OBJECT(&a->a7mpcore), "num-irq", in aspeed_soc_ast2600_realize()
347 sysbus_realize(SYS_BUS_DEVICE(&a->a7mpcore), &error_abort); in aspeed_soc_ast2600_realize()
348 aspeed_mmio_map(s, SYS_BUS_DEVICE(&a->a7mpcore), 0, ASPEED_A7MPCORE_ADDR); in aspeed_soc_ast2600_realize()
350 for (i = 0; i < sc->num_cpus; i++) { in aspeed_soc_ast2600_realize()
351 SysBusDevice *sbd = SYS_BUS_DEVICE(&a->a7mpcore); in aspeed_soc_ast2600_realize()
352 DeviceState *d = DEVICE(&a->cpu[i]); in aspeed_soc_ast2600_realize()
357 sysbus_connect_irq(sbd, i + sc->num_cpus, irq); in aspeed_soc_ast2600_realize()
359 sysbus_connect_irq(sbd, i + 2 * sc->num_cpus, irq); in aspeed_soc_ast2600_realize()
361 sysbus_connect_irq(sbd, i + 3 * sc->num_cpus, irq); in aspeed_soc_ast2600_realize()
365 sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index); in aspeed_soc_ast2600_realize()
366 if (!memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size, in aspeed_soc_ast2600_realize()
370 memory_region_add_subregion(s->memory, in aspeed_soc_ast2600_realize()
371 sc->memmap[ASPEED_DEV_SRAM], &s->sram); in aspeed_soc_ast2600_realize()
374 aspeed_mmio_map_unimplemented(s, SYS_BUS_DEVICE(&s->dpmcu), "aspeed.dpmcu", in aspeed_soc_ast2600_realize()
375 sc->memmap[ASPEED_DEV_DPMCU], in aspeed_soc_ast2600_realize()
379 if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { in aspeed_soc_ast2600_realize()
382 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->scu), 0, sc->memmap[ASPEED_DEV_SCU]); in aspeed_soc_ast2600_realize()
385 if (!sysbus_realize(SYS_BUS_DEVICE(&s->rtc), errp)) { in aspeed_soc_ast2600_realize()
388 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->rtc), 0, sc->memmap[ASPEED_DEV_RTC]); in aspeed_soc_ast2600_realize()
389 sysbus_connect_irq(SYS_BUS_DEVICE(&s->rtc), 0, in aspeed_soc_ast2600_realize()
393 object_property_set_link(OBJECT(&s->timerctrl), "scu", OBJECT(&s->scu), in aspeed_soc_ast2600_realize()
395 if (!sysbus_realize(SYS_BUS_DEVICE(&s->timerctrl), errp)) { in aspeed_soc_ast2600_realize()
398 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->timerctrl), 0, in aspeed_soc_ast2600_realize()
399 sc->memmap[ASPEED_DEV_TIMER1]); in aspeed_soc_ast2600_realize()
402 sysbus_connect_irq(SYS_BUS_DEVICE(&s->timerctrl), i, irq); in aspeed_soc_ast2600_realize()
406 if (!sysbus_realize(SYS_BUS_DEVICE(&s->adc), errp)) { in aspeed_soc_ast2600_realize()
409 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->adc), 0, sc->memmap[ASPEED_DEV_ADC]); in aspeed_soc_ast2600_realize()
410 sysbus_connect_irq(SYS_BUS_DEVICE(&s->adc), 0, in aspeed_soc_ast2600_realize()
419 object_property_set_link(OBJECT(&s->i2c), "dram", OBJECT(s->dram_mr), in aspeed_soc_ast2600_realize()
421 if (!sysbus_realize(SYS_BUS_DEVICE(&s->i2c), errp)) { in aspeed_soc_ast2600_realize()
424 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i2c), 0, sc->memmap[ASPEED_DEV_I2C]); in aspeed_soc_ast2600_realize()
425 for (i = 0; i < ASPEED_I2C_GET_CLASS(&s->i2c)->num_busses; i++) { in aspeed_soc_ast2600_realize()
426 irq = qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
427 sc->irqmap[ASPEED_DEV_I2C] + i); in aspeed_soc_ast2600_realize()
429 sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c.busses[i]), 0, irq); in aspeed_soc_ast2600_realize()
433 if (!sysbus_realize(SYS_BUS_DEVICE(&s->peci), errp)) { in aspeed_soc_ast2600_realize()
436 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->peci), 0, in aspeed_soc_ast2600_realize()
437 sc->memmap[ASPEED_DEV_PECI]); in aspeed_soc_ast2600_realize()
438 sysbus_connect_irq(SYS_BUS_DEVICE(&s->peci), 0, in aspeed_soc_ast2600_realize()
442 object_property_set_link(OBJECT(&s->fmc), "dram", OBJECT(s->dram_mr), in aspeed_soc_ast2600_realize()
444 if (!sysbus_realize(SYS_BUS_DEVICE(&s->fmc), errp)) { in aspeed_soc_ast2600_realize()
447 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->fmc), 0, sc->memmap[ASPEED_DEV_FMC]); in aspeed_soc_ast2600_realize()
448 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->fmc), 1, in aspeed_soc_ast2600_realize()
449 ASPEED_SMC_GET_CLASS(&s->fmc)->flash_window_base); in aspeed_soc_ast2600_realize()
450 sysbus_connect_irq(SYS_BUS_DEVICE(&s->fmc), 0, in aspeed_soc_ast2600_realize()
454 MemoryRegion *fmc0_mmio = &s->fmc.flashes[0].mmio; in aspeed_soc_ast2600_realize()
455 memory_region_init_alias(&s->spi_boot, OBJECT(s), "aspeed.spi_boot", in aspeed_soc_ast2600_realize()
457 memory_region_add_subregion(&s->spi_boot_container, 0x0, &s->spi_boot); in aspeed_soc_ast2600_realize()
460 for (i = 0; i < sc->spis_num; i++) { in aspeed_soc_ast2600_realize()
461 object_property_set_link(OBJECT(&s->spi[i]), "dram", in aspeed_soc_ast2600_realize()
462 OBJECT(s->dram_mr), &error_abort); in aspeed_soc_ast2600_realize()
463 if (!sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), errp)) { in aspeed_soc_ast2600_realize()
466 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->spi[i]), 0, in aspeed_soc_ast2600_realize()
467 sc->memmap[ASPEED_DEV_SPI1 + i]); in aspeed_soc_ast2600_realize()
468 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->spi[i]), 1, in aspeed_soc_ast2600_realize()
469 ASPEED_SMC_GET_CLASS(&s->spi[i])->flash_window_base); in aspeed_soc_ast2600_realize()
473 for (i = 0; i < sc->ehcis_num; i++) { in aspeed_soc_ast2600_realize()
474 if (!sysbus_realize(SYS_BUS_DEVICE(&s->ehci[i]), errp)) { in aspeed_soc_ast2600_realize()
477 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->ehci[i]), 0, in aspeed_soc_ast2600_realize()
478 sc->memmap[ASPEED_DEV_EHCI1 + i]); in aspeed_soc_ast2600_realize()
479 sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci[i]), 0, in aspeed_soc_ast2600_realize()
483 /* SDMC - SDRAM Memory Controller */ in aspeed_soc_ast2600_realize()
484 if (!sysbus_realize(SYS_BUS_DEVICE(&s->sdmc), errp)) { in aspeed_soc_ast2600_realize()
487 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->sdmc), 0, in aspeed_soc_ast2600_realize()
488 sc->memmap[ASPEED_DEV_SDMC]); in aspeed_soc_ast2600_realize()
491 for (i = 0; i < sc->wdts_num; i++) { in aspeed_soc_ast2600_realize()
492 AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(&s->wdt[i]); in aspeed_soc_ast2600_realize()
493 hwaddr wdt_offset = sc->memmap[ASPEED_DEV_WDT] + i * awc->iosize; in aspeed_soc_ast2600_realize()
495 object_property_set_link(OBJECT(&s->wdt[i]), "scu", OBJECT(&s->scu), in aspeed_soc_ast2600_realize()
497 if (!sysbus_realize(SYS_BUS_DEVICE(&s->wdt[i]), errp)) { in aspeed_soc_ast2600_realize()
500 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->wdt[i]), 0, wdt_offset); in aspeed_soc_ast2600_realize()
509 for (i = 0; i < sc->macs_num; i++) { in aspeed_soc_ast2600_realize()
510 object_property_set_bool(OBJECT(&s->ftgmac100[i]), "aspeed", true, in aspeed_soc_ast2600_realize()
512 if (!sysbus_realize(SYS_BUS_DEVICE(&s->ftgmac100[i]), errp)) { in aspeed_soc_ast2600_realize()
515 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->ftgmac100[i]), 0, in aspeed_soc_ast2600_realize()
516 sc->memmap[ASPEED_DEV_ETH1 + i]); in aspeed_soc_ast2600_realize()
517 sysbus_connect_irq(SYS_BUS_DEVICE(&s->ftgmac100[i]), 0, in aspeed_soc_ast2600_realize()
520 object_property_set_link(OBJECT(&s->mii[i]), "nic", in aspeed_soc_ast2600_realize()
521 OBJECT(&s->ftgmac100[i]), &error_abort); in aspeed_soc_ast2600_realize()
522 if (!sysbus_realize(SYS_BUS_DEVICE(&s->mii[i]), errp)) { in aspeed_soc_ast2600_realize()
526 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->mii[i]), 0, in aspeed_soc_ast2600_realize()
527 sc->memmap[ASPEED_DEV_MII1 + i]); in aspeed_soc_ast2600_realize()
531 if (!sysbus_realize(SYS_BUS_DEVICE(&s->xdma), errp)) { in aspeed_soc_ast2600_realize()
534 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->xdma), 0, in aspeed_soc_ast2600_realize()
535 sc->memmap[ASPEED_DEV_XDMA]); in aspeed_soc_ast2600_realize()
536 sysbus_connect_irq(SYS_BUS_DEVICE(&s->xdma), 0, in aspeed_soc_ast2600_realize()
540 if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio), errp)) { in aspeed_soc_ast2600_realize()
543 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->gpio), 0, in aspeed_soc_ast2600_realize()
544 sc->memmap[ASPEED_DEV_GPIO]); in aspeed_soc_ast2600_realize()
545 sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio), 0, in aspeed_soc_ast2600_realize()
548 if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio_1_8v), errp)) { in aspeed_soc_ast2600_realize()
551 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->gpio_1_8v), 0, in aspeed_soc_ast2600_realize()
552 sc->memmap[ASPEED_DEV_GPIO_1_8V]); in aspeed_soc_ast2600_realize()
553 sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio_1_8v), 0, in aspeed_soc_ast2600_realize()
557 if (!sysbus_realize(SYS_BUS_DEVICE(&s->sdhci), errp)) { in aspeed_soc_ast2600_realize()
560 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->sdhci), 0, in aspeed_soc_ast2600_realize()
561 sc->memmap[ASPEED_DEV_SDHCI]); in aspeed_soc_ast2600_realize()
562 sysbus_connect_irq(SYS_BUS_DEVICE(&s->sdhci), 0, in aspeed_soc_ast2600_realize()
566 if (!sysbus_realize(SYS_BUS_DEVICE(&s->emmc), errp)) { in aspeed_soc_ast2600_realize()
569 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->emmc), 0, in aspeed_soc_ast2600_realize()
570 sc->memmap[ASPEED_DEV_EMMC]); in aspeed_soc_ast2600_realize()
571 sysbus_connect_irq(SYS_BUS_DEVICE(&s->emmc), 0, in aspeed_soc_ast2600_realize()
575 if (!sysbus_realize(SYS_BUS_DEVICE(&s->lpc), errp)) { in aspeed_soc_ast2600_realize()
578 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->lpc), 0, sc->memmap[ASPEED_DEV_LPC]); in aspeed_soc_ast2600_realize()
581 sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 0, in aspeed_soc_ast2600_realize()
592 sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_1, in aspeed_soc_ast2600_realize()
593 qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
594 sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_1)); in aspeed_soc_ast2600_realize()
596 sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_2, in aspeed_soc_ast2600_realize()
597 qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
598 sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_2)); in aspeed_soc_ast2600_realize()
600 sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_3, in aspeed_soc_ast2600_realize()
601 qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
602 sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_3)); in aspeed_soc_ast2600_realize()
604 sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_4, in aspeed_soc_ast2600_realize()
605 qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
606 sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_4)); in aspeed_soc_ast2600_realize()
609 object_property_set_link(OBJECT(&s->hace), "dram", OBJECT(s->dram_mr), in aspeed_soc_ast2600_realize()
611 if (!sysbus_realize(SYS_BUS_DEVICE(&s->hace), errp)) { in aspeed_soc_ast2600_realize()
614 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->hace), 0, in aspeed_soc_ast2600_realize()
615 sc->memmap[ASPEED_DEV_HACE]); in aspeed_soc_ast2600_realize()
616 sysbus_connect_irq(SYS_BUS_DEVICE(&s->hace), 0, in aspeed_soc_ast2600_realize()
620 if (!sysbus_realize(SYS_BUS_DEVICE(&s->i3c), errp)) { in aspeed_soc_ast2600_realize()
623 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i3c), 0, sc->memmap[ASPEED_DEV_I3C]); in aspeed_soc_ast2600_realize()
625 irq = qdev_get_gpio_in(DEVICE(&a->a7mpcore), in aspeed_soc_ast2600_realize()
626 sc->irqmap[ASPEED_DEV_I3C] + i); in aspeed_soc_ast2600_realize()
628 sysbus_connect_irq(SYS_BUS_DEVICE(&s->i3c.devices[i]), 0, irq); in aspeed_soc_ast2600_realize()
632 if (!sysbus_realize(SYS_BUS_DEVICE(&s->sbc), errp)) { in aspeed_soc_ast2600_realize()
635 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->sbc), 0, sc->memmap[ASPEED_DEV_SBC]); in aspeed_soc_ast2600_realize()
639 if (!sysbus_realize(SYS_BUS_DEVICE(&s->fsi[i]), errp)) { in aspeed_soc_ast2600_realize()
642 aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->fsi[i]), 0, in aspeed_soc_ast2600_realize()
643 sc->memmap[ASPEED_DEV_FSI1 + i]); in aspeed_soc_ast2600_realize()
644 sysbus_connect_irq(SYS_BUS_DEVICE(&s->fsi[i]), 0, in aspeed_soc_ast2600_realize()
651 uint32_t hw_strap1 = object_property_get_uint(OBJECT(&s->scu), in aspeed_soc_ast2600_boot_from_emmc()
652 "hw-strap1", &error_abort); in aspeed_soc_ast2600_boot_from_emmc()
659 ARM_CPU_TYPE_NAME("cortex-a7"), in aspeed_soc_ast2600_class_init()
665 dc->realize = aspeed_soc_ast2600_realize; in aspeed_soc_ast2600_class_init()
667 dc->user_creatable = false; in aspeed_soc_ast2600_class_init()
669 sc->valid_cpu_types = valid_cpu_types; in aspeed_soc_ast2600_class_init()
670 sc->silicon_rev = AST2600_A3_SILICON_REV; in aspeed_soc_ast2600_class_init()
671 sc->sram_size = 0x16400; in aspeed_soc_ast2600_class_init()
672 sc->spis_num = 2; in aspeed_soc_ast2600_class_init()
673 sc->ehcis_num = 2; in aspeed_soc_ast2600_class_init()
674 sc->wdts_num = 4; in aspeed_soc_ast2600_class_init()
675 sc->macs_num = 4; in aspeed_soc_ast2600_class_init()
676 sc->uarts_num = 13; in aspeed_soc_ast2600_class_init()
677 sc->uarts_base = ASPEED_DEV_UART1; in aspeed_soc_ast2600_class_init()
678 sc->irqmap = aspeed_soc_ast2600_irqmap; in aspeed_soc_ast2600_class_init()
679 sc->memmap = aspeed_soc_ast2600_memmap; in aspeed_soc_ast2600_class_init()
680 sc->num_cpus = 2; in aspeed_soc_ast2600_class_init()
681 sc->get_irq = aspeed_soc_ast2600_get_irq; in aspeed_soc_ast2600_class_init()
682 sc->boot_from_emmc = aspeed_soc_ast2600_boot_from_emmc; in aspeed_soc_ast2600_class_init()
692 .name = "ast2600-a3",