Skip to contentSkip to conversation

hw/riscv: virt: Move flash node to root

PATCH Applied Bin Meng 3 participants 4 messages Aug 7, 2021 – Aug 9, 2021 RISC-V

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 hw/riscv: virt: Move flash node to root

The flash is not inside the SoC, so it's inappropriate to put it under the /soc node. Move it to root instead.

---

 hw/riscv/virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/virt.c +1 -1
index 4a3cd2599a..89fb607c47 100644
@@ -455,7 +455,7 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap,
     qemu_fdt_setprop_cell(fdt, name, "interrupts", RTC_IRQ);
     g_free(name);
 
-    name = g_strdup_printf("/soc/flash@%" PRIx64, flashbase);
+    name = g_strdup_printf("/flash@%" PRIx64, flashbase);
     qemu_fdt_add_subnode(mc->fdt, name);
     qemu_fdt_setprop_string(mc->fdt, name, "compatible", "cfi-flash");
     qemu_fdt_setprop_sized_cells(mc->fdt, name, "reg",
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Bin Meng

The flash is not inside the SoC, so it's inappropriate to put it under the /soc node. Move it to root instead.

---

 hw/riscv/virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/virt.c +0 -0
index 4a3cd2599a..89fb607c47 100644

hw/riscv/virt.c static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap, · line 461

Quoted 8 lines
hw/riscv/virt.c +1 -1
@@ -455,7 +455,7 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap,
     qemu_fdt_setprop_cell(fdt, name, "interrupts", RTC_IRQ);
     g_free(name);
 
-    name = g_strdup_printf("/soc/flash@%" PRIx64, flashbase);
+    name = g_strdup_printf("/flash@%" PRIx64, flashbase);
     qemu_fdt_add_subnode(mc->fdt, name);
     qemu_fdt_setprop_string(mc->fdt, name, "compatible", "cfi-flash");
     qemu_fdt_setprop_sized_cells(mc->fdt, name, "reg",
Reviewed-by on v1 1/1
#2 lore raw
In reply to Bin Meng
Quoted 5 lines · Bin Meng

The flash is not inside the SoC, so it's inappropriate to put it under the /soc node. Move it to root instead.

Alistair

Quoted 22 lines

---

 hw/riscv/virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/virt.c +1 -2
index 4a3cd2599a..89fb607c47 100644
@@ -455,7 +455,7 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap,
     qemu_fdt_setprop_cell(fdt, name, "interrupts", RTC_IRQ);
     g_free(name);
 
-    name = g_strdup_printf("/soc/flash@%" PRIx64, flashbase);
+    name = g_strdup_printf("/flash@%" PRIx64, flashbase);
     qemu_fdt_add_subnode(mc->fdt, name);
     qemu_fdt_setprop_string(mc->fdt, name, "compatible", "cfi-flash");
     qemu_fdt_setprop_sized_cells(mc->fdt, name, "reg",
--

2.25.1

#3 lore raw
In reply to Bin Meng
Quoted 5 lines · Bin Meng

The flash is not inside the SoC, so it's inappropriate to put it under the /soc node. Move it to root instead.

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 22 lines

---

 hw/riscv/virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/virt.c +1 -2
index 4a3cd2599a..89fb607c47 100644
@@ -455,7 +455,7 @@ static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap,
     qemu_fdt_setprop_cell(fdt, name, "interrupts", RTC_IRQ);
     g_free(name);
 
-    name = g_strdup_printf("/soc/flash@%" PRIx64, flashbase);
+    name = g_strdup_printf("/flash@%" PRIx64, flashbase);
     qemu_fdt_add_subnode(mc->fdt, name);
     qemu_fdt_setprop_string(mc->fdt, name, "compatible", "cfi-flash");
     qemu_fdt_setprop_sized_cells(mc->fdt, name, "reg",
--

2.25.1