qemu-e2k/hw/arm
Peter Delevoryas d2b3eaefb4 aspeed: Refactor UART init for multi-SoC machines
This change moves the code that connects the SoC UART's to serial_hd's
to the machine.

It makes each UART a proper child member of the SoC, and then allows the
machine to selectively initialize the chardev for each UART with a
serial_hd.

This should preserve backwards compatibility, but also allow multi-SoC
boards to completely change the wiring of serial devices from the
command line to specific SoC UART's.

This also removes the uart-default property from the SoC, since the SoC
doesn't need to know what UART is the "default" on the machine anymore.

I tested this using the images and commands from the previous
refactoring, and another test image for the ast1030:

    wget https://github.com/facebook/openbmc/releases/download/v2021.49.0/fuji.mtd
    wget https://github.com/facebook/openbmc/releases/download/v2021.49.0/wedge100.mtd
    wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-cl-2022.13.01/Y35BCL.elf

Fuji uses UART1:

    qemu-system-arm -machine fuji-bmc \
        -drive file=fuji.mtd,format=raw,if=mtd \
        -nographic

ast2600-evb uses uart-default=UART5:

    qemu-system-arm -machine ast2600-evb \
        -drive file=fuji.mtd,format=raw,if=mtd \
        -serial null -serial mon:stdio -display none

Wedge100 uses UART3:

    qemu-system-arm -machine palmetto-bmc \
        -drive file=wedge100.mtd,format=raw,if=mtd \
        -serial null -serial null -serial null \
        -serial mon:stdio -display none

AST1030 EVB uses UART5:

    qemu-system-arm -machine ast1030-evb \
        -kernel Y35BCL.elf -nographic

Fixes: 6827ff20b2 ("hw: aspeed: Init all UART's with serial devices")
Signed-off-by: Peter Delevoryas <peter@pjd.dev>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220705191400.41632-4-peter@pjd.dev>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-07-14 16:24:38 +02:00
..
Kconfig hw/arm/aspeed: Add MAX31785 Fan controllers 2022-06-30 09:21:13 +02:00
allwinner-a10.c arm/allwinner-a10: replace snprintf() with g_strdup_printf() 2022-04-21 17:03:51 +04:00
allwinner-h3.c block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
armsse.c
armv7m.c hw/core/loader: return image sizes as ssize_t 2022-06-10 09:31:42 +10:00
aspeed.c aspeed: Refactor UART init for multi-SoC machines 2022-07-14 16:24:38 +02:00
aspeed_ast10x0.c aspeed: Refactor UART init for multi-SoC machines 2022-07-14 16:24:38 +02:00
aspeed_ast2600.c aspeed: Refactor UART init for multi-SoC machines 2022-07-14 16:24:38 +02:00
aspeed_soc.c aspeed: Refactor UART init for multi-SoC machines 2022-07-14 16:24:38 +02:00
bcm2835_peripherals.c
bcm2836.c
boot.c hw/core/loader: return image sizes as ssize_t 2022-06-10 09:31:42 +10:00
collie.c
cubieboard.c hw: Replace trivial drive_get_next() by drive_get() 2021-12-15 08:38:16 +01:00
digic.c arm/digic: replace snprintf() with g_strdup_printf() 2022-04-21 17:03:51 +04:00
digic_boards.c hw/arm: Don't include qemu-common.h unnecessarily 2021-12-15 10:35:26 +00:00
exynos4_boards.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
exynos4210.c hw/arm/exynos4210: Drop Exynos4210Irq struct 2022-04-21 11:37:04 +01:00
fsl-imx6.c
fsl-imx6ul.c hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3 2022-02-08 10:56:27 +00:00
fsl-imx7.c hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3 2022-02-08 10:56:27 +00:00
fsl-imx25.c
fsl-imx31.c
gumstix.c
highbank.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
imx25_pdk.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
integratorcp.c hw: Replace trivial drive_get_next() by drive_get() 2021-12-15 08:38:16 +01:00
kzm.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
mainstone.c
mcimx6ul-evk.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
mcimx7d-sabre.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
meson.build aspeed/soc : Add AST1030 support 2022-05-02 17:03:03 +02:00
microbit.c
mps2-tz.c hw/arm/mps2-tz.c: Update AN547 documentation URL 2022-03-02 19:27:36 +00:00
mps2.c
msf2-soc.c
msf2-som.c hw: Replace trivial drive_get_next() by drive_get() 2021-12-15 08:38:16 +01:00
musca.c
musicpal.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
netduino2.c
netduinoplus2.c
npcm7xx.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
npcm7xx_boards.c hw/arm: Use bit fields for NPCM7XX PWRON STRAPs 2022-04-21 11:37:05 +01:00
nrf51_soc.c
nseries.c machine: use QAPI struct for boot configuration 2022-05-12 12:29:43 +02:00
omap1.c exec/exec-all: Move 'qemu/log.h' include in units requiring it 2022-02-21 10:18:06 +01:00
omap2.c
omap_sx1.c
orangepi.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
palm.c
pxa2xx.c hw/i2c: add asynchronous send 2022-06-30 09:21:14 +02:00
pxa2xx_gpio.c
pxa2xx_pic.c target/arm: Replace sentinels with ARRAY_SIZE in cpregs.h 2022-05-05 09:35:50 +01:00
raspi.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
realview.c hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' 2022-04-21 11:37:04 +01:00
sabrelite.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
sbsa-ref.c hw/arm: add versioning to sbsa-ref machine DT 2022-05-09 11:47:54 +01:00
smmu-common.c dma: Let dma_memory_read/write() take MemTxAttrs argument 2021-12-30 17:16:32 +01:00
smmu-internal.h
smmuv3-internal.h hw/arm/smmuv3: Advertise support for SMMUv3.2-BBML2 2022-04-28 13:59:23 +01:00
smmuv3.c hw/arm/smmuv3: Advertise support for SMMUv3.2-BBML2 2022-04-28 13:59:23 +01:00
spitz.c
stellaris.c hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' 2022-04-21 11:37:04 +01:00
stm32f100_soc.c
stm32f205_soc.c
stm32f405_soc.c hw/arm: Don't include qemu-common.h unnecessarily 2021-12-15 10:35:26 +00:00
stm32vldiscovery.c
strongarm.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
strongarm.h
tosa.c
trace-events
trace.h
versatilepb.c hw/arm/versatilepb hw/arm/vexpress: Replace drive_get_next() by drive_get() 2021-12-15 08:38:16 +01:00
vexpress.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
virt-acpi-build.c hw/arm/virt: Drop superfluous checks against highmem 2022-01-20 11:47:53 +00:00
virt.c hw/arm/virt: dt: add rng-seed property 2022-07-07 11:36:07 +01:00
xilinx_zynq.c hw/arm/boot: Drop nb_cpus field from arm_boot_info 2022-02-08 10:56:28 +00:00
xlnx-versal-virt.c hw/core: Move the ARM sysbus-fdt to core 2022-04-29 10:48:26 +10:00
xlnx-versal.c hw/arm: versal: Connect the CRL 2022-04-21 11:37:03 +01:00
xlnx-zcu102.c hw/arm/xlnx-zcu102: Don't enable PSCI conduit when booting guest in EL3 2022-02-08 10:56:27 +00:00
xlnx-zynqmp.c xlnx-zynqmp: fix the irq mapping for the display port and its dma 2022-06-08 19:38:48 +01:00
z2.c