aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv/sifive_u.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-02 09:44:36 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-15 12:51:55 -0500
commitf2ce39b4f067fe8b8de6104a2d8ac558d35c330b (patch)
tree0d6c327eb7b5522347c7f465d403829af4f2ec6e /hw/riscv/sifive_u.c
parent55810e90cc9a5ca18289c25aa5c1e0e2dc77eadb (diff)
vl: make qemu_get_machine_opts static
Machine options can be retrieved as properties of the machine object. Encourage that by removing the "easy" accessor to machine options. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/riscv/sifive_u.c')
-rw-r--r--hw/riscv/sifive_u.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 2f19a9cda2..e7f6dc5fb3 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -100,14 +100,12 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap,
int cpu;
uint32_t *cells;
char *nodename;
- const char *dtb_filename;
char ethclk_names[] = "pclk\0hclk";
uint32_t plic_phandle, prci_phandle, gpio_phandle, phandle = 1;
uint32_t hfclk_phandle, rtcclk_phandle, phy_phandle;
- dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");
- if (dtb_filename) {
- fdt = s->fdt = load_device_tree(dtb_filename, &s->fdt_size);
+ if (ms->dtb) {
+ fdt = s->fdt = load_device_tree(ms->dtb, &s->fdt_size);
if (!fdt) {
error_report("load_device_tree() failed");
exit(1);