aboutsummaryrefslogtreecommitdiff
path: root/hw/mips_jazz.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2011-07-18 23:34:22 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-07-20 20:54:51 +0000
commitcd3e2409a3605b89b6bea2e67fc128c6a9f8d921 (patch)
treea4a1896e4b5a1d7c4b39d65161ec16ae24145595 /hw/mips_jazz.c
parentd43ed9ec2566922e76420b4ac914df6b2d473c4b (diff)
ds1225y: convert to qdev device, and use it in MIPS Jazz emulation
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/mips_jazz.c')
-rw-r--r--hw/mips_jazz.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index a1003945fd..f6ab6dc455 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -37,6 +37,7 @@
#include "loader.h"
#include "mc146818rtc.h"
#include "blockdev.h"
+#include "sysbus.h"
enum jazz_model_e
{
@@ -115,6 +116,8 @@ void mips_jazz_init (ram_addr_t ram_size,
void* rc4030_opaque;
int s_rtc, s_dma_dummy;
NICInfo *nd;
+ DeviceState *dev;
+ SysBusDevice *sysbus;
ISADevice *pit;
DriveInfo *fds[MAX_FD];
qemu_irq esp_reset, dma_enable;
@@ -266,8 +269,11 @@ void mips_jazz_init (ram_addr_t ram_size,
/* FIXME: missing Jazz sound at 0x8000c000, rc4030[2] */
audio_init(i8259, NULL);
- /* NVRAM: Unprotected at 0x9000, Protected at 0xa000, Read only at 0xb000 */
- ds1225y_init(0x80009000, "nvram");
+ /* NVRAM */
+ dev = qdev_create(NULL, "ds1225y");
+ qdev_init_nofail(dev);
+ sysbus = sysbus_from_qdev(dev);
+ sysbus_mmio_map(sysbus, 0, 0x80009000);
/* LED indicator */
jazz_led_init(0x8000f000);