diff options
author | Paul Brook <paul@codesourcery.com> | 2009-05-18 16:45:48 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-05-18 18:27:44 +0100 |
commit | 340d96e7ce6e1c2e6d75504e9b4d8153896d5b42 (patch) | |
tree | 054165cbcda56a5f3ae54fc37e4c4367c287d9d3 /hw/syborg.c | |
parent | 53c25cea7d59525ca9aa3fb01cc6947bafbbfb61 (diff) | |
download | qemu-340d96e7ce6e1c2e6d75504e9b4d8153896d5b42.zip qemu-340d96e7ce6e1c2e6d75504e9b4d8153896d5b42.tar.gz qemu-340d96e7ce6e1c2e6d75504e9b4d8153896d5b42.tar.bz2 |
Syborg virtio bindings.
Implement Syborg device bindings for virtio-net.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/syborg.c')
-rw-r--r-- | hw/syborg.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/syborg.c b/hw/syborg.c index e54fc95..99f9dbb 100644 --- a/hw/syborg.c +++ b/hw/syborg.c @@ -26,6 +26,7 @@ #include "boards.h" #include "arm-misc.h" #include "sysemu.h" +#include "net.h" static struct arm_boot_info syborg_binfo; @@ -76,6 +77,19 @@ static void syborg_init(ram_addr_t ram_size, sysbus_create_simple("syborg,serial", 0xC0008000, pic[7]); sysbus_create_simple("syborg,serial", 0xC0009000, pic[8]); + if (nd_table[0].vlan) { + DeviceState *dev; + SysBusDevice *s; + + qemu_check_nic_model(&nd_table[0], "virtio"); + dev = qdev_create(NULL, "syborg,virtio-net"); + qdev_set_netdev(dev, &nd_table[0]); + qdev_init(dev); + s = sysbus_from_qdev(dev); + sysbus_mmio_map(s, 0, 0xc000c000); + sysbus_connect_irq(s, 0, pic[9]); + } + syborg_binfo.ram_size = ram_size; syborg_binfo.kernel_filename = kernel_filename; syborg_binfo.kernel_cmdline = kernel_cmdline; |