]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/ppc/40p: Move the MC146818 RTC to the board where it belongs
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Sun, 5 May 2019 15:28:38 +0000 (17:28 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 May 2019 01:39:44 +0000 (11:39 +1000)
The MC146818 RTC was incorrectly added to the i82378 chipset in
commit a04ff940974a. In the next commit (506b7ddf8893) the PReP
machine use the i82378.
Since the MC146818 is specific to the PReP machine, move its use
there.

Fixes: a04ff940974a
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190505152839.18650-3-philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/isa/i82378.c
hw/ppc/prep.c

index a5d67bc6d7a5928efd3a2d7738920d939add47ff..c08970b24a2cc84f6b22ef6145f42758d60674cf 100644 (file)
@@ -21,7 +21,6 @@
 #include "hw/pci/pci.h"
 #include "hw/i386/pc.h"
 #include "hw/timer/i8254.h"
-#include "hw/timer/mc146818rtc.h"
 #include "hw/audio/pcspk.h"
 
 #define TYPE_I82378 "i82378"
@@ -105,9 +104,6 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
 
     /* 2 82C37 (dma) */
     isa = isa_create_simple(isabus, "i82374");
-
-    /* timer */
-    isa_create_simple(isabus, TYPE_MC146818_RTC);
 }
 
 static void i82378_init(Object *obj)
index ebee3211480d7ee5a9cacb87cd6b3d66e91d491c..7a0d311d43c9d8d1759ca05019602293013d1d8b 100644 (file)
@@ -675,6 +675,9 @@ static void ibm_40p_init(MachineState *machine)
     qdev_prop_set_uint32(dev, "ram-size", machine->ram_size);
     qdev_init_nofail(dev);
 
+    /* RTC */
+    isa_create_simple(isa_bus, TYPE_MC146818_RTC);
+
     /* initialize CMOS checksums */
     cmos_checksum = 0x6aa9;
     qbus_walk_children(BUS(isa_bus), prep_set_cmos_checksum, NULL, NULL, NULL,