All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/14] hw/riscv: trivial code dup work (riscv-server-ref prep)
@ 2026-08-27 22:25 Daniel Henrique Barboza
  2026-08-27 22:25 ` [PATCH v4 01/14] hw/riscv/fdt-common: prepend helpers with "riscv_" Daniel Henrique Barboza
                   ` (13 more replies)
  0 siblings, 14 replies; 30+ messages in thread
From: Daniel Henrique Barboza @ 2026-08-27 22:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, liwei1518, zhiwei_liu, chao.liu,
	Daniel Henrique Barboza, Michael Tokarev, Laurent Vivier,
	open list:Trivial patches

Hello,

In this version the most notable change is in patch 9, where we left the
tt-atlantis out of the changes being done.  The reason is that the board
will have UART related changes soon, and the UART FDT will be most
likely impacted, thus it's better to wait for the DT to stabilize first.

Other change done is the "local phandle" handling.  For all helpers that
receives a 'next_phandle' pointer we'll check if the pointer is valid
and use its val as next phandle.  Otherwise we'll use
qemu_fdt_alloc_phandle().

Other minor changes were also done following the discussions in v3.

Patches based on alistair/riscv-to-apply.next.

Changes from v3:
- patch 3:
  - renamed 'phandle' to 'next_phandle'.  If non-null the helper will
    use (*next_phandle) as the phandle value for the new subnode.
    Otherwise the helper will retrieve a phandle via qemu_fdt_alloc_phandle().
- patch 4:
  - added a new 'next_phandle' optional pointer.  If non-null the helper
    will use (*next_phandle) as the phandle value for the new subnode.
    Otherwise the helper will retrieve a phandle via qemu_fdt_alloc_phandle();
  - removed the iommu_irq_map array;
  - instead of returning 'void' return the DT iommu phandle.
- patch 6:
  - renamed 'phandle' to 'next_phandle'.  If non-null the helper will
    use (*next_phandle) as the phandle value for the new subnode.
    Otherwise the helper will retrieve a phandle via qemu_fdt_alloc_phandle().
- patch 7:
  - renamed 'phandle' to 'next_phandle'.  If non-null the helper will
    use (*next_phandle) as the phandle value for the new subnode.
    Otherwise the helper will retrieve a phandle via qemu_fdt_alloc_phandle().
- patch 9:
  - removed all tt-atlantis.c changes;
  - renamed irq_mmio_phandle to irq_phandle;
  - removed both bool flags;
  - "/chosen" and "/alias" are now set manually by the board;
  - a new riscv_fdt_get_uart_nodename() helper were added;
  - added an UART_STD_CLOCK_FREQ to hide the magic 3.6864 MHz hardcoded
    clock value.
- patch 10:
  - renamed irq_mmio_phandle to irq_phandle.
- v3 link: https://lore.kernel.org/qemu-devel/20260826214643.122728-1-daniel.barboza@oss.qualcomm.com/

Daniel Henrique Barboza (14):
  hw/riscv/fdt-common: prepend helpers with "riscv_"
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_flash()
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_syscon()
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_riscv_iommu_sys()
  hw/riscv/fdt_common, virt.c: add riscv_create_fdt_pcie()
  hw/riscv/fdt_common, virt.c: add riscv_create_fdt_imsic()
  hw/riscv/fdt_common, virt.c: add riscv_create_fdt_socket_aplic()
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_socket_aclint()
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_uart()
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_rtc()
  hw/riscv/device-common, virt.c: add riscv_create_platform_bus()
  hw/riscv/device-common, virt.c: add flash helpers
  hw/riscv/device-common, virt.c: add riscv_gpex_pcie_init()
  hw/riscv/riscv-iommu-sys.c, virt.c: add riscv_create_iommu_sys()

 hw/riscv/device-common.c         | 168 ++++++
 hw/riscv/fdt-common.c            | 612 +++++++++++++++++++++-
 hw/riscv/meson.build             |   1 +
 hw/riscv/riscv-iommu-sys.c       |  25 +
 hw/riscv/riscv-iommu.h           |   3 +
 hw/riscv/sifive_u.c              |  34 +-
 hw/riscv/spike.c                 |  30 +-
 hw/riscv/tt_atlantis.c           |  22 +-
 hw/riscv/virt.c                  | 861 +++++--------------------------
 include/hw/riscv/device-common.h |  32 ++
 include/hw/riscv/fdt-common.h    | 146 +++++-
 include/hw/riscv/virt.h          |  15 -
 12 files changed, 1111 insertions(+), 838 deletions(-)
 create mode 100644 hw/riscv/device-common.c
 create mode 100644 include/hw/riscv/device-common.h

-- 
2.43.0



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2026-08-28 19:52 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 22:25 [PATCH v4 00/14] hw/riscv: trivial code dup work (riscv-server-ref prep) Daniel Henrique Barboza
2026-08-27 22:25 ` [PATCH v4 01/14] hw/riscv/fdt-common: prepend helpers with "riscv_" Daniel Henrique Barboza
2026-08-28  2:54   ` Chao Liu via
2026-08-28  2:54     ` Chao Liu via qemu development
2026-08-28  7:16   ` Philippe Mathieu-Daudé
2026-08-27 22:25 ` [PATCH v4 02/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_flash() Daniel Henrique Barboza
2026-08-28  2:55   ` Chao Liu via qemu development
2026-08-28  2:55     ` Chao Liu via
2026-08-27 22:25 ` [PATCH v4 03/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_syscon() Daniel Henrique Barboza
2026-08-28  2:56   ` Chao Liu via qemu development
2026-08-28  2:56     ` Chao Liu via
2026-08-27 22:25 ` [PATCH v4 04/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_riscv_iommu_sys() Daniel Henrique Barboza
2026-08-28  2:57   ` Chao Liu via qemu development
2026-08-28  2:57     ` Chao Liu via
2026-08-27 22:25 ` [PATCH v4 05/14] hw/riscv/fdt_common, virt.c: add riscv_create_fdt_pcie() Daniel Henrique Barboza
2026-08-27 22:25 ` [PATCH v4 06/14] hw/riscv/fdt_common, virt.c: add riscv_create_fdt_imsic() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 07/14] hw/riscv/fdt_common, virt.c: add riscv_create_fdt_socket_aplic() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 08/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_socket_aclint() Daniel Henrique Barboza
2026-08-28  4:13   ` Chao Liu via
2026-08-28  4:13     ` Chao Liu via qemu development
2026-08-28 15:40     ` Daniel Henrique Barboza
2026-08-28 19:01       ` Chao Liu via
2026-08-28 19:01         ` Chao Liu via qemu development
2026-08-28 19:52         ` Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 09/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_uart() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 10/14] hw/riscv/fdt-common, virt.c: add riscv_create_fdt_rtc() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 11/14] hw/riscv/device-common, virt.c: add riscv_create_platform_bus() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 12/14] hw/riscv/device-common, virt.c: add flash helpers Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 13/14] hw/riscv/device-common, virt.c: add riscv_gpex_pcie_init() Daniel Henrique Barboza
2026-08-27 22:26 ` [PATCH v4 14/14] hw/riscv/riscv-iommu-sys.c, virt.c: add riscv_create_iommu_sys() Daniel Henrique Barboza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.