QEMU provides a device tree, which is passed to U-Boot using register a1. We are now able to directly select the device tree with the configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in qemu-riscv with it. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
21 lines
379 B
C
21 lines
379 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <fdtdec.h>
|
|
#include <virtio_types.h>
|
|
#include <virtio.h>
|
|
|
|
int board_init(void)
|
|
{
|
|
/*
|
|
* Make sure virtio bus is enumerated so that peripherals
|
|
* on the virtio bus can be discovered by their drivers
|
|
*/
|
|
virtio_init();
|
|
|
|
return 0;
|
|
}
|