aboutsummaryrefslogtreecommitdiff
path: root/include/hw/cris
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-10-17 17:49:22 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2020-01-07 17:24:29 +0400
commit3af6eb8f9b489c72a1f540e752d8d5f1503b9a87 (patch)
tree9d0233802c451e576e2c6c9bfc2fea7512c7914f /include/hw/cris
parent4cc76287d81036909e43e29a7a42e8d9852041db (diff)
downloadqemu-3af6eb8f9b489c72a1f540e752d8d5f1503b9a87.zip
qemu-3af6eb8f9b489c72a1f540e752d8d5f1503b9a87.tar.gz
qemu-3af6eb8f9b489c72a1f540e752d8d5f1503b9a87.tar.bz2
etraxfs: remove PROP_PTR usage
etraxfs_dma_client are not Object, so can't be exposed to user with QOM path. Let's remove property usage and move the constructor to the .c unit, simplifying some code on the way. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/cris')
-rw-r--r--include/hw/cris/etraxfs.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/include/hw/cris/etraxfs.h b/include/hw/cris/etraxfs.h
index aa146a2..403e7f9 100644
--- a/include/hw/cris/etraxfs.h
+++ b/include/hw/cris/etraxfs.h
@@ -30,23 +30,9 @@
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
-/* Instantiate an ETRAXFS Ethernet MAC. */
-static inline DeviceState *
-etraxfs_eth_init(NICInfo *nd, hwaddr base, int phyaddr,
- void *dma_out, void *dma_in)
-{
- DeviceState *dev;
- qemu_check_nic_model(nd, "fseth");
-
- dev = qdev_create(NULL, "etraxfs-eth");
- qdev_set_nic_properties(dev, nd);
- qdev_prop_set_uint32(dev, "phyaddr", phyaddr);
- qdev_prop_set_ptr(dev, "dma_out", dma_out);
- qdev_prop_set_ptr(dev, "dma_in", dma_in);
- qdev_init_nofail(dev);
- sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
- return dev;
-}
+DeviceState *etraxfs_eth_init(NICInfo *nd, hwaddr base, int phyaddr,
+ struct etraxfs_dma_client *dma_out,
+ struct etraxfs_dma_client *dma_in);
static inline DeviceState *etraxfs_ser_create(hwaddr addr,
qemu_irq irq,