summaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-10-23 15:29:55 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-07 17:24:29 +0400
commit9fac5d88ee1a81dca643a62bfce5a2364b437bfa (patch)
tree8e79afdcc67803fa30097a426165f7eddc7e8019 /hw/char
parent10315a70896fb82000cc4b2a1198b70c775c7a59 (diff)
downloadqemu-9fac5d88ee1a81dca643a62bfce5a2364b437bfa.zip
mips: inline serial_init()
The function is specific to mipssim, let's inline it. (when inlining, we use a DeviceState variable instead of SerialIO, as it is the most common type used, and avoids having too many casts) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/serial.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 3bcb7a6268..7746dfcee8 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -1028,22 +1028,6 @@ static const TypeInfo serial_io_info = {
.class_init = serial_io_class_init,
};
-SerialIO *serial_init(int base, qemu_irq irq, int baudbase,
- Chardev *chr, MemoryRegion *system_io)
-{
- SerialIO *sio = SERIAL_IO(qdev_create(NULL, TYPE_SERIAL_IO));
-
- qdev_prop_set_uint32(DEVICE(sio), "baudbase", baudbase);
- qdev_prop_set_chr(DEVICE(sio), "chardev", chr);
- qdev_set_legacy_instance_id(DEVICE(sio), base, 2);
- qdev_init_nofail(DEVICE(sio));
-
- sysbus_connect_irq(SYS_BUS_DEVICE(sio), 0, irq);
- memory_region_add_subregion(system_io, base, &sio->serial.io);
-
- return sio;
-}
-
static Property serial_properties[] = {
DEFINE_PROP_CHR("chardev", SerialState, chr),
DEFINE_PROP_UINT32("baudbase", SerialState, baudbase, 115200),