xilinx: Inline usage of xilinx_ethlite_create()
Inline the only usage. Converts this init to at least a semi-recent QOM styling. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
29873712e6
commit
b8d4e1c43b
@ -119,7 +119,14 @@ petalogix_s3adsp1800_init(QEMUMachineInitArgs *args)
|
|||||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, TIMER_BASEADDR);
|
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, TIMER_BASEADDR);
|
||||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]);
|
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_IRQ]);
|
||||||
|
|
||||||
xilinx_ethlite_create(&nd_table[0], ETHLITE_BASEADDR, irq[1], 0, 0);
|
qemu_check_nic_model(&nd_table[0], "xlnx.xps-ethernetlite");
|
||||||
|
dev = qdev_create(NULL, "xlnx.xps-ethernetlite");
|
||||||
|
qdev_set_nic_properties(dev, &nd_table[0]);
|
||||||
|
qdev_prop_set_uint32(dev, "tx-ping-pong", 0);
|
||||||
|
qdev_prop_set_uint32(dev, "rx-ping-pong", 0);
|
||||||
|
qdev_init_nofail(dev);
|
||||||
|
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, ETHLITE_BASEADDR);
|
||||||
|
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[ETHLITE_IRQ]);
|
||||||
|
|
||||||
microblaze_load_kernel(cpu, ddr_base, ram_size,
|
microblaze_load_kernel(cpu, ddr_base, ram_size,
|
||||||
args->initrd_filename,
|
args->initrd_filename,
|
||||||
|
@ -7,25 +7,6 @@
|
|||||||
#include "hw/stream.h"
|
#include "hw/stream.h"
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
|
|
||||||
/* XPS Ethernet Lite MAC. */
|
|
||||||
static inline DeviceState *
|
|
||||||
xilinx_ethlite_create(NICInfo *nd, hwaddr base, qemu_irq irq,
|
|
||||||
int txpingpong, int rxpingpong)
|
|
||||||
{
|
|
||||||
DeviceState *dev;
|
|
||||||
|
|
||||||
qemu_check_nic_model(nd, "xlnx.xps-ethernetlite");
|
|
||||||
|
|
||||||
dev = qdev_create(NULL, "xlnx.xps-ethernetlite");
|
|
||||||
qdev_set_nic_properties(dev, nd);
|
|
||||||
qdev_prop_set_uint32(dev, "tx-ping-pong", txpingpong);
|
|
||||||
qdev_prop_set_uint32(dev, "rx-ping-pong", rxpingpong);
|
|
||||||
qdev_init_nofail(dev);
|
|
||||||
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
|
||||||
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
|
|
||||||
return dev;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
xilinx_axiethernet_init(DeviceState *dev, NICInfo *nd, StreamSlave *ds,
|
xilinx_axiethernet_init(DeviceState *dev, NICInfo *nd, StreamSlave *ds,
|
||||||
StreamSlave *cs, hwaddr base, qemu_irq irq, int txmem,
|
StreamSlave *cs, hwaddr base, qemu_irq irq, int txmem,
|
||||||
|
Loading…
Reference in New Issue
Block a user