aboutsummaryrefslogtreecommitdiff
path: root/hw/stellaris.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:07 +0100
commita5580466257337e74e48124c185e4db9d29325ec (patch)
treeb45bc816375cd1201390883478d9207342ae0023 /hw/stellaris.c
parentcf21e106cd9b34a12a533191932a8a08a1f5ebe4 (diff)
Stellaris ethernet qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/stellaris.c')
-rw-r--r--hw/stellaris.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/stellaris.c b/hw/stellaris.c
index 31206c34f2..8d0995a99b 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -1356,8 +1356,17 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model,
pl022_init(0x40008000, pic[7], NULL, NULL);
}
}
- if (board->dc4 & (1 << 28))
- stellaris_enet_init(&nd_table[0], 0x40048000, pic[42]);
+ if (board->dc4 & (1 << 28)) {
+ DeviceState *enet;
+
+ qemu_check_nic_model(&nd_table[0], "stellaris");
+
+ enet = qdev_create(NULL, "stellaris_enet");
+ qdev_set_netdev(enet, &nd_table[0]);
+ qdev_init(enet);
+ sysbus_mmio_map(sysbus_from_qdev(enet), 0, 0x40048000);
+ sysbus_connect_irq(sysbus_from_qdev(enet), 0, pic[42]);
+ }
if (board->peripherals & BP_GAMEPAD) {
qemu_irq gpad_irq[5];
static const int gpad_keycode[5] = { 0xc8, 0xd0, 0xcb, 0xcd, 0x1d };