mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-22 23:52:03 +00:00
riscv: qemu: Create a simple-bus driver for the soc node
To enumerate devices on the /soc/ node, create a "simple-bus" driver to match "riscv-virtio-soc". Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
b859694776
commit
27dc2c130e
1 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
|
||||
/*
|
||||
* cleanup_before_linux() is called just before we call linux
|
||||
|
@ -19,3 +20,16 @@ int cleanup_before_linux(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* To enumerate devices on the /soc/ node, create a "simple-bus" driver */
|
||||
static const struct udevice_id riscv_virtio_soc_ids[] = {
|
||||
{ .compatible = "riscv-virtio-soc" },
|
||||
{ }
|
||||
};
|
||||
|
||||
U_BOOT_DRIVER(riscv_virtio_soc) = {
|
||||
.name = "riscv_virtio_soc",
|
||||
.id = UCLASS_SIMPLE_BUS,
|
||||
.of_match = riscv_virtio_soc_ids,
|
||||
.flags = DM_FLAG_PRE_RELOC,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue