qemu-patch-raspberry4/hw/char
Peter Maydell 1bbd1511b6 Clean-ups: qom-ify serial and remove QDEV_PROP_PTR
Hi,
 
 QDEV_PROP_PTR is marked in multiple places as "FIXME/TODO/remove
 me". In most cases, it can be easily replaced with QDEV_PROP_LINK when
 the pointer points to an Object.
 
 There are a few places where such substitution isn't possible. For
 those places, it seems reasonable to use a specific setter method
 instead, and keep the user_creatable = false. In other places,
 proper usage of qdev or other facilies is the solution.
 
 The serial code wasn't converted to qdev, which makes it a bit more
 archaic to deal with. Let's convert it first, so we can more easily
 embed it from other devices, and re-export some properties and drop
 QDEV_PROP_PTR usage.
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAl4UnUYcHG1hcmNhbmRy
 ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5cfYEACcTfXklXdxLDj94Q5/
 d6MxYqZWckO+vyMqOwonodl9BS3clpDDxbYzyfTpqwKS2cVg1eUUBPR7/eioX6zT
 grM0rlgsKWJf9UurJwJWw7Zys7dXZMVJ2BdigLUEZrv9hFF15t344qoKgk4wYmBj
 2wC7l7j2WZZ0vtXN7IH4/ZXnaN5/kdoPj6BrF0oNSJaq1AjPByQxmOJhvrxVsm6y
 gn3la4XbfMIC68qPjcDJAScGXtCWG1Vydw9cFHwRpMfcvPyL70l6FMjIwrLYNQ9b
 j1AkcEXeev5nWT+gLGxt+TGXB0Sd2ID9uRYxhyZRA4fdjHFtlWfdOwepOOlSlTO+
 yfpf9STDLuDQGLTJyNZpYGGDDcm4xsJ8arD/7/Mq/35BQl9ZUT+m6uC1tDhxEHzf
 +AD/Kh8rMptyAjwtqD2XbqyLoaFJCsPjZbjTj3SY08WaeqClmaAbSD2eaJiNXy4H
 +rFg9P/eOB+71R1AoMKfiBFzdGV6TG5PLZOJ/oN02yqp0oW8eDWYcETB3j0tIgS1
 u2WVCS2cd8IqYa+UQ7COOpoX0UwICmIWV64kxioD7uFQiK/1nQYw4UnPHv29qY6k
 fTa8jUC5hPiDN1rRYqNpNoVJsstSZfSgpo5jV75sxSyDucupu+SM9qmo3+fBab+q
 Eol3Ypz4virkNU8IYCYFFiG4Qg==
 =iYVd
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/elmarco/tags/prop-ptr-pull-request' into staging

Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

Hi,

QDEV_PROP_PTR is marked in multiple places as "FIXME/TODO/remove
me". In most cases, it can be easily replaced with QDEV_PROP_LINK when
the pointer points to an Object.

There are a few places where such substitution isn't possible. For
those places, it seems reasonable to use a specific setter method
instead, and keep the user_creatable = false. In other places,
proper usage of qdev or other facilies is the solution.

The serial code wasn't converted to qdev, which makes it a bit more
archaic to deal with. Let's convert it first, so we can more easily
embed it from other devices, and re-export some properties and drop
QDEV_PROP_PTR usage.

# gpg: Signature made Tue 07 Jan 2020 15:01:26 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/elmarco/tags/prop-ptr-pull-request: (37 commits)
  qdev/qom: remove some TODO limitations now that PROP_PTR is gone
  qdev: remove QDEV_PROP_PTR
  qdev: remove PROP_MEMORY_REGION
  omap-gpio: remove PROP_PTR
  omap-i2c: remove PROP_PTR
  omap-intc: remove PROP_PTR
  smbus-eeprom: remove PROP_PTR
  cris: improve passing PIC interrupt vector to the CPU
  mips/cps: fix setting saar property
  qdev: use g_strcmp0() instead of open-coding it
  leon3: use qdev gpio facilities for the PIL
  leon3: use qemu_irq framework instead of callback as property
  dp8393x: replace PROP_PTR with PROP_LINK
  etraxfs: remove PROP_PTR usage
  lance: replace PROP_PTR with PROP_LINK
  vmmouse: replace PROP_PTR with PROP_LINK
  sm501: make SerialMM a child, export chardev property
  mips: use sysbus_mmio_get_region() instead of internal fields
  mips: use sysbus_add_io()
  mips: baudbase is 115200 by default
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-07 17:54:29 +00:00
..
bcm2835_aux.c hw/arm/bcm2835_peripherals: Improve logging 2019-10-15 18:09:05 +01:00
cadence_uart.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
cmsdk-apb-uart.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
debugcon.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
digic-uart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
escc.c escc: introduce a selector for the register bit 2019-09-07 08:32:12 +02:00
etraxfs_ser.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
exynos4210_uart.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
grlib_apbuart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
imx_serial.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
ipoctal232.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
Kconfig hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
lm32_juart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
lm32_uart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
Makefile.objs hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
mcf_uart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
milkymist-uart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
nrf51_uart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
omap_uart.c serial: start making SerialMM a sysbus device 2020-01-07 17:23:30 +04:00
parallel-isa.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
parallel.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pl011.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
sclpconsole-lm.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
sclpconsole.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
serial-isa.c serial: realize the serial device 2020-01-07 16:50:48 +04:00
serial-pci-multi.c serial: replace serial_exit_core() with unrealize 2020-01-07 16:50:48 +04:00
serial-pci.c serial: replace serial_exit_core() with unrealize 2020-01-07 16:50:48 +04:00
serial.c mips: use sysbus_mmio_get_region() instead of internal fields 2020-01-07 17:24:29 +04:00
sh_serial.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
spapr_vty.c spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper 2019-10-04 19:08:22 +10:00
stm32f2xx_usart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
terminal3270.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
virtio-console.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio-serial-bus.c virtio-serial-bus: fix memory leak while attach virtio-serial-bus 2020-01-05 07:03:03 -05:00
xen_console.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xilinx_uartlite.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00