[PATCH v3 5/5] board: qemu: m68k: Create virtio mmio instances
Simon Glass
sjg at chromium.org
Sat Apr 11 22:31:04 CEST 2026
Hi Daniel,
On 2026-04-08T22:09:23, Daniel Palmer <daniel at thingy.jp> wrote:
> board: qemu: m68k: Create virtio mmio instances
>
> So that you can use virtio network, block etc create the virtio mmio
> instances. There are 128 of these even if they are not all used, a
> single mmio base value is passed via bootinfo.
>
> Signed-off-by: Daniel Palmer <daniel at thingy.jp>
>
> arch/m68k/Kconfig | 14 ++++++-----
> board/emulation/qemu-m68k/qemu-m68k.c | 47 +++++++++++++++++++++++++++++++++++
> 2 files changed, 55 insertions(+), 6 deletions(-)
> diff --git a/board/emulation/qemu-m68k/qemu-m68k.c b/board/emulation/qemu-m68k/qemu-m68k.c
> @@ -25,6 +30,38 @@ static struct qemu_virt_ctrl_plat reset_plat;
> +static inline int create_virtio_mmios(void)
Please can you drop the inline keyword here? It is not needed for a
function called only once and not in a header file.
> diff --git a/board/emulation/qemu-m68k/qemu-m68k.c b/board/emulation/qemu-m68k/qemu-m68k.c
> @@ -80,6 +120,13 @@ int board_early_init_f(void)
> +int board_early_init_r(void)
> +{
> + create_virtio_mmios();
> +
> + return 0;
> +}
The return value from create_virtio_mmios() is discarded - really this
should be checked. If not, perhaps log_debug() or log_warning() would
help report when virtio-mmio devices are not created?
Regards,
Simon
More information about the U-Boot
mailing list