]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/char: Extract serial-mm
authorBernhard Beschow <shentey@gmail.com>
Thu, 5 Sep 2024 07:38:32 +0000 (09:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 3 Oct 2024 17:33:23 +0000 (19:33 +0200)
commit7e6b5497eaf29b5a615f5ee93a6cc2412df516a5
treef80c352e45a02678e8adf29b9eed22301694b2b9
parent37b724cdef8b68abdd5b80336f18798decd77e83
hw/char: Extract serial-mm

hw/char/serial currently contains the implementation of both TYPE_SERIAL and
TYPE_SERIAL_MM. According to serial_class_init(), TYPE_SERIAL is an internal
class while TYPE_SERIAL_MM is used by numerous machine types directly. Let's
move the latter into its own module which makes the dependencies more obvious
and the code more tidy.

The includes and the dependencies have been converted mechanically except in the
hw/char directories which were updated manually. The result was compile-tested.
Now, only hw/char makes direct use of TYPE_SERIAL:

  # grep -r -e "select SERIAL" | grep -v SERIAL_
  hw/char/Kconfig:    select SERIAL
  hw/char/Kconfig:    select SERIAL
  hw/char/Kconfig:    select SERIAL
  hw/char/Kconfig:    select SERIAL
  hw/char/Kconfig:    select SERIAL

  # grep -r -e "/serial\\.h"
  include/hw/char/serial-mm.h:#include "hw/char/serial.h"
  hw/char/serial-pci-multi.c:#include "hw/char/serial.h"
  hw/char/serial.c:#include "hw/char/serial.h"
  hw/char/serial-isa.c:#include "hw/char/serial.h"
  hw/char/serial-pci.c:#include "hw/char/serial.h"

Tested-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Link: https://lore.kernel.org/r/20240905073832.16222-4-shentey@gmail.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
50 files changed:
hw/arm/Kconfig
hw/arm/allwinner-a10.c
hw/arm/allwinner-h3.c
hw/arm/allwinner-r40.c
hw/arm/aspeed_ast2400.c
hw/arm/aspeed_soc_common.c
hw/arm/kzm.c
hw/arm/msf2-soc.c
hw/arm/musicpal.c
hw/arm/npcm7xx.c
hw/arm/pxa2xx.c
hw/char/Kconfig
hw/char/meson.build
hw/char/omap_uart.c
hw/char/serial-mm.c [new file with mode: 0644]
hw/char/serial.c
hw/display/Kconfig
hw/display/sm501.c
hw/hppa/Kconfig
hw/hppa/machine.c
hw/loongarch/Kconfig
hw/loongarch/virt.c
hw/microblaze/Kconfig
hw/microblaze/petalogix_ml605_mmu.c
hw/mips/Kconfig
hw/mips/boston.c
hw/mips/jazz.c
hw/mips/loongson3_virt.c
hw/mips/malta.c
hw/mips/mipssim.c
hw/openrisc/Kconfig
hw/openrisc/openrisc_sim.c
hw/openrisc/virt.c
hw/ppc/Kconfig
hw/ppc/e500.c
hw/ppc/ppc405_uc.c
hw/ppc/ppc440_bamboo.c
hw/ppc/sam460ex.c
hw/ppc/virtex_ml507.c
hw/riscv/Kconfig
hw/riscv/virt.c
hw/sparc64/Kconfig
hw/sparc64/niagara.c
hw/sparc64/sun4u.c
hw/xtensa/Kconfig
hw/xtensa/xtfpga.c
include/hw/arm/aspeed_soc.h
include/hw/char/mchp_pfsoc_mmuart.h
include/hw/char/serial-mm.h [new file with mode: 0644]
include/hw/char/serial.h