aboutsummaryrefslogtreecommitdiff
path: root/include/hw/char
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-02-20 12:51:08 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-02-27 13:27:05 +0000
commit11f2ee1db6ed333a74a71fa38ce66fda926e230d (patch)
tree860dcff34e80949ce32b21c1f5e66521182aaf2a /include/hw/char
parentcb4c33f014925d860387ecef4d74a7f03cab6626 (diff)
downloadqemu-11f2ee1db6ed333a74a71fa38ce66fda926e230d.zip
qemu-11f2ee1db6ed333a74a71fa38ce66fda926e230d.tar.gz
qemu-11f2ee1db6ed333a74a71fa38ce66fda926e230d.tar.bz2
hw/char/pl011: Un-inline pl011_create()
pl011_create() is only used in DeviceRealize handlers, not a hot-path. Inlining is not justified. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230220115114.25237-3-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/char')
-rw-r--r--include/hw/char/pl011.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h
index 926322e..d82870c 100644
--- a/include/hw/char/pl011.h
+++ b/include/hw/char/pl011.h
@@ -15,10 +15,8 @@
#ifndef HW_PL011_H
#define HW_PL011_H
-#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
-#include "qapi/error.h"
#include "qom/object.h"
#define TYPE_PL011 "pl011"
@@ -57,22 +55,7 @@ struct PL011State {
const unsigned char *id;
};
-static inline DeviceState *pl011_create(hwaddr addr,
- qemu_irq irq,
- Chardev *chr)
-{
- DeviceState *dev;
- SysBusDevice *s;
-
- dev = qdev_new("pl011");
- s = SYS_BUS_DEVICE(dev);
- qdev_prop_set_chr(dev, "chardev", chr);
- sysbus_realize_and_unref(s, &error_fatal);
- sysbus_mmio_map(s, 0, addr);
- sysbus_connect_irq(s, 0, irq);
-
- return dev;
-}
+DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr);
static inline DeviceState *pl011_luminary_create(hwaddr addr,
qemu_irq irq,