Lines Matching +full:exynos4210 +full:- +full:sdhci
2 * Samsung exynos4210 SoC emulation
35 #include "hw/qdev-properties.h"
36 #include "hw/arm/exynos4210.h"
37 #include "hw/sd/sdhci.h"
38 #include "hw/usb/hcd-ehci.h"
39 #include "target/arm/cpu-qom.h"
197 combiner_grp_to_gic_id[64 - EXYNOS4210_MAX_EXT_COMBINER_OUT_IRQ][8] = {
198 /* int combiner groups 16-19 */
242 /* groups 38-50 */
250 /* groups 54-63 */
257 ((irq) - 8 * EXYNOS4210_COMBINER_GET_GRP_NUM(irq))
288 /* Multi-core timer */
336 DeviceState *extgicdev = DEVICE(&s->ext_gic); in exynos4210_init_board_irqs()
337 DeviceState *intcdev = DEVICE(&s->int_combiner); in exynos4210_init_board_irqs()
338 DeviceState *extcdev = DEVICE(&s->ext_combiner); in exynos4210_init_board_irqs()
355 if (s->irq_table[n]) { in exynos4210_init_board_irqs()
357 * This must be some non-first entry in a combinermap line, in exynos4210_init_board_irqs()
372 splitter = DEVICE(&s->splitter[splitcount]); in exynos4210_init_board_irqs()
373 qdev_prop_set_uint16(splitter, "num-lines", numlines); in exynos4210_init_board_irqs()
380 s->irq_table[in] = qdev_get_gpio_in(splitter, 0); in exynos4210_init_board_irqs()
397 qdev_get_gpio_in(extgicdev, irq_id - 32)); in exynos4210_init_board_irqs()
404 irq_id = combiner_grp_to_gic_id[grp - in exynos4210_init_board_irqs()
407 if (s->irq_table[n]) { in exynos4210_init_board_irqs()
409 * This must be some non-first entry in a combinermap line, in exynos4210_init_board_irqs()
417 splitter = DEVICE(&s->splitter[splitcount]); in exynos4210_init_board_irqs()
418 qdev_prop_set_uint16(splitter, "num-lines", 2); in exynos4210_init_board_irqs()
421 s->irq_table[n] = qdev_get_gpio_in(splitter, 0); in exynos4210_init_board_irqs()
424 qdev_get_gpio_in(extgicdev, irq_id - 32)); in exynos4210_init_board_irqs()
426 s->irq_table[n] = qdev_get_gpio_in(intcdev, n); in exynos4210_init_board_irqs()
438 * Get IRQ number from exynos4210 IRQ subsystem stub.
440 * grp - group number
441 * bit - bit number inside group
497 smpboot[ARRAY_SIZE(smpboot) - 1] = info->smp_bootreg_addr; in exynos4210_write_secondary()
498 smpboot[ARRAY_SIZE(smpboot) - 2] = info->gic_cpu_if_addr; in exynos4210_write_secondary()
503 info->smp_loader_start); in exynos4210_write_secondary()
508 /* Exynos4210 has 0x9 as cluster ID */ in exynos4210_calc_affinity()
537 object_property_set_int(OBJECT(orgate), "num-lines", nevents + 1, in pl330_create()
557 Object *cpuobj = object_new(ARM_CPU_TYPE_NAME("cortex-a9")); in exynos4210_realize()
567 s->cpu[n] = ARM_CPU(cpuobj); in exynos4210_realize()
568 object_property_set_int(cpuobj, "mp-affinity", in exynos4210_realize()
570 object_property_set_int(cpuobj, "reset-cbar", in exynos4210_realize()
578 DeviceState *orgate = DEVICE(&s->cpu_irq_orgate[i]); in exynos4210_realize()
579 object_property_set_int(OBJECT(orgate), "num-lines", in exynos4210_realize()
584 qdev_get_gpio_in(DEVICE(s->cpu[i]), ARM_CPU_IRQ)); in exynos4210_realize()
588 qdev_prop_set_uint32(DEVICE(&s->a9mpcore), "num-cpu", EXYNOS4210_NCPUS); in exynos4210_realize()
589 busdev = SYS_BUS_DEVICE(&s->a9mpcore); in exynos4210_realize()
594 qdev_get_gpio_in(DEVICE(&s->cpu_irq_orgate[n]), 0)); in exynos4210_realize()
601 qdev_prop_set_uint32(DEVICE(&s->ext_gic), "num-cpu", EXYNOS4210_NCPUS); in exynos4210_realize()
602 busdev = SYS_BUS_DEVICE(&s->ext_gic); in exynos4210_realize()
610 qdev_get_gpio_in(DEVICE(&s->cpu_irq_orgate[n]), 1)); in exynos4210_realize()
614 busdev = SYS_BUS_DEVICE(&s->int_combiner); in exynos4210_realize()
618 qdev_get_gpio_in(DEVICE(&s->a9mpcore), n)); in exynos4210_realize()
623 qdev_prop_set_uint32(DEVICE(&s->ext_combiner), "external", 1); in exynos4210_realize()
624 busdev = SYS_BUS_DEVICE(&s->ext_combiner); in exynos4210_realize()
627 sysbus_connect_irq(busdev, n, qdev_get_gpio_in(DEVICE(&s->ext_gic), n)); in exynos4210_realize()
636 /* Chip-ID and OMR */ in exynos4210_realize()
637 memory_region_init_io(&s->chipid_mem, OBJECT(socdev), in exynos4210_realize()
639 "exynos4210.chipid", sizeof(chipid_and_omr)); in exynos4210_realize()
641 &s->chipid_mem); in exynos4210_realize()
644 memory_region_init_rom(&s->irom_mem, OBJECT(socdev), "exynos4210.irom", in exynos4210_realize()
647 &s->irom_mem); in exynos4210_realize()
649 memory_region_init_alias(&s->irom_alias_mem, OBJECT(socdev), in exynos4210_realize()
650 "exynos4210.irom_alias", &s->irom_mem, 0, in exynos4210_realize()
653 &s->irom_alias_mem); in exynos4210_realize()
656 memory_region_init_ram(&s->iram_mem, NULL, "exynos4210.iram", in exynos4210_realize()
659 &s->iram_mem); in exynos4210_realize()
665 sysbus_create_simple("exynos4210.pmu", EXYNOS4210_PMU_BASE_ADDR, NULL); in exynos4210_realize()
667 sysbus_create_simple("exynos4210.clk", EXYNOS4210_CLK_BASE_ADDR, NULL); in exynos4210_realize()
668 sysbus_create_simple("exynos4210.rng", EXYNOS4210_RNG_BASE_ADDR, NULL); in exynos4210_realize()
671 sysbus_create_varargs("exynos4210.pwm", EXYNOS4210_PWM_BASE_ADDR, in exynos4210_realize()
672 s->irq_table[exynos4210_get_irq(22, 0)], in exynos4210_realize()
673 s->irq_table[exynos4210_get_irq(22, 1)], in exynos4210_realize()
674 s->irq_table[exynos4210_get_irq(22, 2)], in exynos4210_realize()
675 s->irq_table[exynos4210_get_irq(22, 3)], in exynos4210_realize()
676 s->irq_table[exynos4210_get_irq(22, 4)], in exynos4210_realize()
679 sysbus_create_varargs("exynos4210.rtc", EXYNOS4210_RTC_BASE_ADDR, in exynos4210_realize()
680 s->irq_table[exynos4210_get_irq(23, 0)], in exynos4210_realize()
681 s->irq_table[exynos4210_get_irq(23, 1)], in exynos4210_realize()
685 dev = qdev_new("exynos4210.mct"); in exynos4210_realize()
691 s->irq_table[exynos4210_get_irq(1, 4 + n)]); in exynos4210_realize()
695 s->irq_table[exynos4210_get_irq(51, 0)]); in exynos4210_realize()
697 s->irq_table[exynos4210_get_irq(35, 3)]); in exynos4210_realize()
706 i2c_irq = s->irq_table[exynos4210_get_irq(EXYNOS4210_I2C_INTG, n)]; in exynos4210_realize()
708 i2c_irq = s->irq_table[exynos4210_get_irq(EXYNOS4210_HDMI_INTG, 1)]; in exynos4210_realize()
711 dev = qdev_new("exynos4210.i2c"); in exynos4210_realize()
716 s->i2c_if[n] = (I2CBus *)qdev_get_child_bus(dev, "i2c"); in exynos4210_realize()
723 s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 0)]); in exynos4210_realize()
727 s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 1)]); in exynos4210_realize()
731 s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 2)]); in exynos4210_realize()
735 s->irq_table[exynos4210_get_irq(EXYNOS4210_UART_INT_GRP, 3)]); in exynos4210_realize()
744 * - SD Host Controller Specification Version 2.0 in exynos4210_realize()
745 * - SDIO Specification Version 2.0 in exynos4210_realize()
746 * - MMC Specification Version 4.3 in exynos4210_realize()
747 * - SDMA in exynos4210_realize()
748 * - ADMA2 in exynos4210_realize()
750 * As this part of the Exynos4210 is not publicly available, in exynos4210_realize()
751 * we used the "HS-MMC Controller S3C2416X RISC Microprocessor" in exynos4210_realize()
761 sysbus_connect_irq(busdev, 0, s->irq_table[exynos4210_get_irq(29, n)]); in exynos4210_realize()
767 qdev_realize_and_unref(carddev, qdev_get_child_bus(dev, "sd-bus"), in exynos4210_realize()
772 dev = qdev_new("exynos4210.fimd"); in exynos4210_realize()
773 object_property_set_link(OBJECT(dev), "framebuffer-memory", in exynos4210_realize()
779 sysbus_connect_irq(busdev, n, s->irq_table[exynos4210_get_irq(11, n)]); in exynos4210_realize()
783 s->irq_table[exynos4210_get_irq(28, 3)]); in exynos4210_realize()
787 &s->pl330_irq_orgate[0], in exynos4210_realize()
788 s->irq_table[exynos4210_get_irq(21, 0)], in exynos4210_realize()
791 &s->pl330_irq_orgate[1], in exynos4210_realize()
792 s->irq_table[exynos4210_get_irq(21, 1)], in exynos4210_realize()
795 &s->pl330_irq_orgate[2], in exynos4210_realize()
796 s->irq_table[exynos4210_get_irq(20, 1)], in exynos4210_realize()
814 for (i = 0; i < ARRAY_SIZE(s->pl330_irq_orgate); i++) { in exynos4210_init()
815 char *name = g_strdup_printf("pl330-irq-orgate%d", i); in exynos4210_init()
816 OrIRQState *orgate = &s->pl330_irq_orgate[i]; in exynos4210_init()
822 for (i = 0; i < ARRAY_SIZE(s->cpu_irq_orgate); i++) { in exynos4210_init()
823 g_autofree char *name = g_strdup_printf("cpu-irq-orgate%d", i); in exynos4210_init()
824 object_initialize_child(obj, name, &s->cpu_irq_orgate[i], TYPE_OR_IRQ); in exynos4210_init()
827 for (i = 0; i < ARRAY_SIZE(s->splitter); i++) { in exynos4210_init()
828 g_autofree char *name = g_strdup_printf("irq-splitter%d", i); in exynos4210_init()
829 object_initialize_child(obj, name, &s->splitter[i], TYPE_SPLIT_IRQ); in exynos4210_init()
832 object_initialize_child(obj, "a9mpcore", &s->a9mpcore, TYPE_A9MPCORE_PRIV); in exynos4210_init()
833 object_initialize_child(obj, "ext-gic", &s->ext_gic, TYPE_EXYNOS4210_GIC); in exynos4210_init()
834 object_initialize_child(obj, "int-combiner", &s->int_combiner, in exynos4210_init()
836 object_initialize_child(obj, "ext-combiner", &s->ext_combiner, in exynos4210_init()
844 dc->realize = exynos4210_realize; in exynos4210_class_init()