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>
This commit is contained in:
committed by
Paolo Bonzini
parent
37b724cdef
commit
7e6b5497ea
+5
-5
@@ -51,7 +51,7 @@ config PPC405
|
||||
select M48T59
|
||||
select PFLASH_CFI02
|
||||
select PPC4XX
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
|
||||
config PPC440
|
||||
bool
|
||||
@@ -63,7 +63,7 @@ config PPC440
|
||||
select PCI_EXPRESS
|
||||
select PPC440_PCIX
|
||||
select PPC4XX
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select FDT_PPC
|
||||
|
||||
config PPC4XX
|
||||
@@ -80,7 +80,7 @@ config SAM460EX
|
||||
select IDE_SII3112
|
||||
select M41T80
|
||||
select PPC440
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SM501
|
||||
select SMBUS_EEPROM
|
||||
select USB_EHCI_SYSBUS
|
||||
@@ -163,7 +163,7 @@ config E500
|
||||
select PLATFORM_BUS
|
||||
select PPCE500_PCI
|
||||
select SDHCI
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select MPC_I2C
|
||||
select FDT_PPC
|
||||
select DS1338
|
||||
@@ -187,7 +187,7 @@ config VIRTEX
|
||||
depends on PPC && FDT
|
||||
select PPC4XX
|
||||
select PFLASH_CFI01
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select XILINX
|
||||
select XILINX_ETHLITE
|
||||
select FDT_PPC
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
#include "net/net.h"
|
||||
#include "qemu/config-file.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "sysemu/block-backend-io.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
#include "hw/irq.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "ppc405.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "sysemu/reset.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "sysemu/device_tree.h"
|
||||
#include "hw/loader.h"
|
||||
#include "elf.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/ppc/ppc.h"
|
||||
#include "hw/pci-host/ppc4xx.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/reset.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/i2c/ppc4xx_i2c.h"
|
||||
#include "hw/i2c/smbus_eeprom.h"
|
||||
#include "hw/ide/pci.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "exec/page-protection.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/block/flash.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/reset.h"
|
||||
|
||||
Reference in New Issue
Block a user