mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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
+10
-10
@@ -136,7 +136,7 @@ config MUSICPAL
|
||||
select MARVELL_88W8618
|
||||
select PTIMER
|
||||
select PFLASH_CFI02
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select WM8750
|
||||
|
||||
config NETDUINO2
|
||||
@@ -179,13 +179,13 @@ config OMAP
|
||||
select NAND
|
||||
select PFLASH_CFI01
|
||||
select SD
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
|
||||
config PXA2XX
|
||||
bool
|
||||
select FRAMEBUFFER
|
||||
select I2C
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SD
|
||||
select SSI
|
||||
select USB_OHCI_SYSBUS
|
||||
@@ -399,7 +399,7 @@ config ALLWINNER_A10
|
||||
select ALLWINNER_EMAC
|
||||
select ALLWINNER_I2C
|
||||
select AXP2XX_PMU
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select UNIMP
|
||||
select USB_OHCI_SYSBUS
|
||||
|
||||
@@ -411,7 +411,7 @@ config ALLWINNER_H3
|
||||
select ALLWINNER_SUN8I_EMAC
|
||||
select ALLWINNER_I2C
|
||||
select ALLWINNER_WDT
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select ARM_TIMER
|
||||
select ARM_GIC
|
||||
select UNIMP
|
||||
@@ -427,7 +427,7 @@ config ALLWINNER_R40
|
||||
select ALLWINNER_A10_PIT
|
||||
select ALLWINNER_WDT
|
||||
select AXP2XX_PMU
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select ARM_TIMER
|
||||
select ARM_GIC
|
||||
select UNIMP
|
||||
@@ -542,7 +542,7 @@ config NPCM7XX
|
||||
select ISL_PMBUS_VR
|
||||
select PL310 # cache controller
|
||||
select PMBUS
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SSI
|
||||
select UNIMP
|
||||
select PCA954X
|
||||
@@ -564,7 +564,7 @@ config FSL_IMX31
|
||||
default y
|
||||
depends on TCG && ARM
|
||||
imply I2C_DEVICES
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select IMX
|
||||
select IMX_I2C
|
||||
select WDT_IMX2
|
||||
@@ -593,7 +593,7 @@ config ASPEED_SOC
|
||||
select I2C
|
||||
select DPS310
|
||||
select PCA9552
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SMBUS_EEPROM
|
||||
select PCA954X
|
||||
select SSI
|
||||
@@ -681,7 +681,7 @@ config MSF2
|
||||
bool
|
||||
select ARM_V7M
|
||||
select PTIMER
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SSI
|
||||
select UNIMP
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/arm/allwinner-a10.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "qemu/units.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/usb/hcd-ehci.h"
|
||||
#include "hw/loader.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "hw/boards.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/usb/hcd-ehci.h"
|
||||
#include "hw/loader.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/arm/aspeed_soc.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "hw/i2c/aspeed_i2c.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/arm/aspeed_soc.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
|
||||
|
||||
const char *aspeed_soc_cpu_type(AspeedSoCClass *sc)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include "exec/address-spaces.h"
|
||||
#include "net/net.h"
|
||||
#include "hw/net/lan9118.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
#include "qemu/units.h"
|
||||
#include "qapi/error.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/arm/msf2-soc.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/qdev-clock.h"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include "net/net.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "hw/ptimer.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "hw/arm/boot.h"
|
||||
#include "hw/arm/npcm7xx.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "hw/qdev-clock.h"
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#include "migration/vmstate.h"
|
||||
#include "hw/arm/pxa.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "hw/irq.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
|
||||
@@ -21,6 +21,10 @@ config SERIAL_ISA
|
||||
depends on ISA_BUS
|
||||
select SERIAL
|
||||
|
||||
config SERIAL_MM
|
||||
bool
|
||||
select SERIAL
|
||||
|
||||
config SERIAL_PCI
|
||||
bool
|
||||
default y if PCI_DEVICES
|
||||
|
||||
@@ -13,6 +13,7 @@ system_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c'))
|
||||
system_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c'))
|
||||
system_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c'))
|
||||
system_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c'))
|
||||
system_ss.add(when: 'CONFIG_SERIAL_MM', if_true: files('serial-mm.c'))
|
||||
system_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c'))
|
||||
system_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c'))
|
||||
system_ss.add(when: 'CONFIG_SHAKTI_UART', if_true: files('shakti_uart.c'))
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "chardev/char.h"
|
||||
#include "hw/arm/omap.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "exec/address-spaces.h"
|
||||
|
||||
/* UARTs */
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* QEMU 16550A UART emulation
|
||||
*
|
||||
* Copyright (c) 2003-2004 Fabrice Bellard
|
||||
* Copyright (c) 2008 Citrix Systems, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
|
||||
static uint64_t serial_mm_read(void *opaque, hwaddr addr, unsigned size)
|
||||
{
|
||||
SerialMM *s = SERIAL_MM(opaque);
|
||||
return serial_io_ops.read(&s->serial, addr >> s->regshift, 1);
|
||||
}
|
||||
|
||||
static void serial_mm_write(void *opaque, hwaddr addr,
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
SerialMM *s = SERIAL_MM(opaque);
|
||||
value &= 255;
|
||||
serial_io_ops.write(&s->serial, addr >> s->regshift, value, 1);
|
||||
}
|
||||
|
||||
static const MemoryRegionOps serial_mm_ops[3] = {
|
||||
[DEVICE_NATIVE_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_LITTLE_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_BIG_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_BIG_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
};
|
||||
|
||||
static void serial_mm_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(dev);
|
||||
SerialState *s = &smm->serial;
|
||||
|
||||
if (!qdev_realize(DEVICE(s), NULL, errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
memory_region_init_io(&s->io, OBJECT(dev),
|
||||
&serial_mm_ops[smm->endianness], smm, "serial",
|
||||
8 << smm->regshift);
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(smm), &s->io);
|
||||
sysbus_init_irq(SYS_BUS_DEVICE(smm), &smm->serial.irq);
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_serial_mm = {
|
||||
.name = "serial",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(serial, SerialMM, 0, vmstate_serial, SerialState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
SerialMM *serial_mm_init(MemoryRegion *address_space,
|
||||
hwaddr base, int regshift,
|
||||
qemu_irq irq, int baudbase,
|
||||
Chardev *chr, enum device_endian end)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(qdev_new(TYPE_SERIAL_MM));
|
||||
MemoryRegion *mr;
|
||||
|
||||
qdev_prop_set_uint8(DEVICE(smm), "regshift", regshift);
|
||||
qdev_prop_set_uint32(DEVICE(smm), "baudbase", baudbase);
|
||||
qdev_prop_set_chr(DEVICE(smm), "chardev", chr);
|
||||
qdev_set_legacy_instance_id(DEVICE(smm), base, 2);
|
||||
qdev_prop_set_uint8(DEVICE(smm), "endianness", end);
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(smm), &error_fatal);
|
||||
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(smm), 0, irq);
|
||||
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(smm), 0);
|
||||
memory_region_add_subregion(address_space, base, mr);
|
||||
|
||||
return smm;
|
||||
}
|
||||
|
||||
static void serial_mm_instance_init(Object *o)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(o);
|
||||
|
||||
object_initialize_child(o, "serial", &smm->serial, TYPE_SERIAL);
|
||||
|
||||
qdev_alias_all_properties(DEVICE(&smm->serial), o);
|
||||
}
|
||||
|
||||
static Property serial_mm_properties[] = {
|
||||
/*
|
||||
* Set the spacing between adjacent memory-mapped UART registers.
|
||||
* Each register will be at (1 << regshift) bytes after the previous one.
|
||||
*/
|
||||
DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0),
|
||||
DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_ENDIAN),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void serial_mm_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
device_class_set_props(dc, serial_mm_properties);
|
||||
dc->realize = serial_mm_realize;
|
||||
dc->vmsd = &vmstate_serial_mm;
|
||||
}
|
||||
|
||||
static const TypeInfo types[] = {
|
||||
{
|
||||
.name = TYPE_SERIAL_MM,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.class_init = serial_mm_class_init,
|
||||
.instance_init = serial_mm_instance_init,
|
||||
.instance_size = sizeof(SerialMM),
|
||||
},
|
||||
};
|
||||
|
||||
DEFINE_TYPES(types)
|
||||
@@ -996,135 +996,9 @@ static const TypeInfo serial_info = {
|
||||
.class_init = serial_class_init,
|
||||
};
|
||||
|
||||
/* Memory mapped interface */
|
||||
static uint64_t serial_mm_read(void *opaque, hwaddr addr,
|
||||
unsigned size)
|
||||
{
|
||||
SerialMM *s = SERIAL_MM(opaque);
|
||||
return serial_ioport_read(&s->serial, addr >> s->regshift, 1);
|
||||
}
|
||||
|
||||
static void serial_mm_write(void *opaque, hwaddr addr,
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
SerialMM *s = SERIAL_MM(opaque);
|
||||
value &= 255;
|
||||
serial_ioport_write(&s->serial, addr >> s->regshift, value, 1);
|
||||
}
|
||||
|
||||
static const MemoryRegionOps serial_mm_ops[3] = {
|
||||
[DEVICE_NATIVE_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_LITTLE_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_BIG_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_BIG_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
};
|
||||
|
||||
static void serial_mm_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(dev);
|
||||
SerialState *s = &smm->serial;
|
||||
|
||||
if (!qdev_realize(DEVICE(s), NULL, errp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
memory_region_init_io(&s->io, OBJECT(dev),
|
||||
&serial_mm_ops[smm->endianness], smm, "serial",
|
||||
8 << smm->regshift);
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(smm), &s->io);
|
||||
sysbus_init_irq(SYS_BUS_DEVICE(smm), &smm->serial.irq);
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_serial_mm = {
|
||||
.name = "serial",
|
||||
.version_id = 3,
|
||||
.minimum_version_id = 2,
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_STRUCT(serial, SerialMM, 0, vmstate_serial, SerialState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
SerialMM *serial_mm_init(MemoryRegion *address_space,
|
||||
hwaddr base, int regshift,
|
||||
qemu_irq irq, int baudbase,
|
||||
Chardev *chr, enum device_endian end)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(qdev_new(TYPE_SERIAL_MM));
|
||||
MemoryRegion *mr;
|
||||
|
||||
qdev_prop_set_uint8(DEVICE(smm), "regshift", regshift);
|
||||
qdev_prop_set_uint32(DEVICE(smm), "baudbase", baudbase);
|
||||
qdev_prop_set_chr(DEVICE(smm), "chardev", chr);
|
||||
qdev_set_legacy_instance_id(DEVICE(smm), base, 2);
|
||||
qdev_prop_set_uint8(DEVICE(smm), "endianness", end);
|
||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(smm), &error_fatal);
|
||||
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(smm), 0, irq);
|
||||
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(smm), 0);
|
||||
memory_region_add_subregion(address_space, base, mr);
|
||||
|
||||
return smm;
|
||||
}
|
||||
|
||||
static void serial_mm_instance_init(Object *o)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(o);
|
||||
|
||||
object_initialize_child(o, "serial", &smm->serial, TYPE_SERIAL);
|
||||
|
||||
qdev_alias_all_properties(DEVICE(&smm->serial), o);
|
||||
}
|
||||
|
||||
static Property serial_mm_properties[] = {
|
||||
/*
|
||||
* Set the spacing between adjacent memory-mapped UART registers.
|
||||
* Each register will be at (1 << regshift) bytes after the
|
||||
* previous one.
|
||||
*/
|
||||
DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0),
|
||||
DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_ENDIAN),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void serial_mm_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
|
||||
device_class_set_props(dc, serial_mm_properties);
|
||||
dc->realize = serial_mm_realize;
|
||||
dc->vmsd = &vmstate_serial_mm;
|
||||
}
|
||||
|
||||
static const TypeInfo serial_mm_info = {
|
||||
.name = TYPE_SERIAL_MM,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.class_init = serial_mm_class_init,
|
||||
.instance_init = serial_mm_instance_init,
|
||||
.instance_size = sizeof(SerialMM),
|
||||
};
|
||||
|
||||
static void serial_register_types(void)
|
||||
{
|
||||
type_register_static(&serial_info);
|
||||
type_register_static(&serial_mm_info);
|
||||
}
|
||||
|
||||
type_init(serial_register_types)
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ config SM501
|
||||
bool
|
||||
select I2C
|
||||
select DDC
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select USB_OHCI_SYSBUS
|
||||
|
||||
config TCX
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
#include "hw/usb/hcd-ohci.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "ui/console.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "migration/vmstate.h"
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ config HPPA_B160L
|
||||
select ASTRO
|
||||
select DINO
|
||||
select LASI
|
||||
select SERIAL
|
||||
select SERIAL_MM
|
||||
select SERIAL_PCI
|
||||
select ISA_BUS
|
||||
select I8259
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#include "sysemu/runstate.h"
|
||||
#include "hw/rtc/mc146818rtc.h"
|
||||
#include "hw/timer/i8254.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/char/serial-mm.h"
|
||||
#include "hw/char/parallel.h"
|
||||
#include "hw/intc/i8259.h"
|
||||
#include "hw/input/lasips2.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user