On 3/2/23 14:50, BALATON Zoltan wrote:
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote:
On 3/2/23 14:05, BALATON Zoltan wrote:
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote:
No need to use an intermediate 'dma-offset' property in the
chipset object. Alias the property, so when the machine (here
r2d-plus) sets the value on the chipset, it is propagated to
the OHCI object.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
hw/display/sm501.c | 22 +++++++++++-----------
hw/sh4/r2d.c | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
It does not seem to be any simpler by the number of lines but maybe a
bit cleaner.
Well it also moves to the "Embed QOM objects" pattern which Peter
prefers.
Note this device doesn't implement unrealize().
True. Maybe worth mentioning in the commit message to make this more
explicit. I saw it in the patch but did not think about that.
I wonder if it would worth renaming the property to dma-offset to
match that of ohci so it's less confusing what it refers to. It's
only used by r2d and this patch already changing that so would be an
easy change.
We can't because TYPE_PCI_SM501 is user-creatable, so we need to
go thru the whole deprecation process and we don't have any API to
deprecate QOM properties yet.
But the sm501 PCI device only creates the display part hence it has no
base option only vram-size (see sm501_pci_properties) so only the sysbus
version has this property. Is this still a problem in that case?
Oh you are right, I misread the PCI/sysbus functions. Lucky me, thanks!