hw/timer/i8254: rename pit_init() -> i8254_pit_init()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 17 Oct 2017 16:44:15 +0000 (13:44 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 18 Dec 2017 14:07:02 +0000 (17:07 +0300)
and remove the old i386/pc dependency

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/alpha/dp264.c
hw/i386/pc.c
hw/isa/i82378.c
hw/mips/mips_fulong2e.c
hw/mips/mips_jazz.c
hw/mips/mips_malta.c
hw/mips/mips_r4k.c
hw/timer/i8254.c
hw/timer/i8254_common.c
include/hw/timer/i8254.h
include/hw/timer/i8254_internal.h

index babd6ea514f684b836f46ebe605365c65787d2e2..887a7401f13380b289aa2ea783f4e79d980c6f4b 100644 (file)
@@ -80,7 +80,7 @@ static void clipper_init(MachineState *machine)
     /* Since we have an SRM-compatible PALcode, use the SRM epoch.  */
     rtc_init(isa_bus, 1900, rtc_irq);
 
-    pit_init(isa_bus, 0x40, 0, NULL);
+    i8254_pit_init(isa_bus, 0x40, 0, NULL);
     isa_create_simple(isa_bus, "i8042");
 
     /* VGA setup.  Don't bother loading the bios.  */
index 186545d2a4e56d874eebb542bf61bb5f59618e36..6a6041573f915e0bff2f1800fe69863327bfc0d1 100644 (file)
@@ -1573,7 +1573,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
         if (kvm_pit_in_kernel()) {
             pit = kvm_pit_init(isa_bus, 0x40);
         } else {
-            pit = pit_init(isa_bus, 0x40, pit_isa_irq, pit_alt_irq);
+            pit = i8254_pit_init(isa_bus, 0x40, pit_isa_irq, pit_alt_irq);
         }
         if (hpet) {
             /* connect PIT to output control line of the HPET */
index d20ea4c2ee7813fe03668ab98b6e8e7577098908..a9c15f858ddec4a030ccac46248db94f9ede8a21 100644 (file)
@@ -97,7 +97,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
     isa_bus_irqs(isabus, s->i8259);
 
     /* 1 82C54 (pit) */
-    isa = pit_init(isabus, 0x40, 0, NULL);
+    isa = i8254_pit_init(isabus, 0x40, 0, NULL);
 
     /* speaker */
     pcspk_init(isabus, isa);
index 146cf0fccd71bb627a9ed7a5576a79d0e2a63d5f..2a2a09c9de66ebfb39ad85d7283339eed72a3bb8 100644 (file)
@@ -359,7 +359,7 @@ static void mips_fulong2e_init(MachineState *machine)
     smbus_eeprom_init(smbus, 1, eeprom_spd, sizeof(eeprom_spd));
 
     /* init other devices */
-    pit = pit_init(isa_bus, 0x40, 0, NULL);
+    pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
     DMA_init(isa_bus, 0);
 
     /* Super I/O */
index fe4f17389f71bcca850740d240637f3347f1a336..995419344d40ed838cc43d3989adb8fa119cc56c 100644 (file)
@@ -218,7 +218,7 @@ static void mips_jazz_init(MachineState *machine,
     i8259 = i8259_init(isa_bus, env->irq[4]);
     isa_bus_irqs(isa_bus, i8259);
     DMA_init(isa_bus, 0);
-    pit = pit_init(isa_bus, 0x40, 0, NULL);
+    pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
     pcspk_init(isa_bus, pit);
 
     /* Video card */
index ec6af4a2779e7568ce6f640d72a3f9e9798c52d1..88b4733743dfd36d9795629e9cc90f27c3cabe51 100644 (file)
@@ -1208,7 +1208,7 @@ void mips_malta_init(MachineState *machine)
                           isa_get_irq(NULL, 9), NULL, 0, NULL);
     smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);
     g_free(smbus_eeprom_buf);
-    pit = pit_init(isa_bus, 0x40, 0, NULL);
+    pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
     DMA_init(isa_bus, 0);
 
     /* Super I/O */
index 3bbb1827e12235fce7d64e673969f1a4d8707ead..58d7bac18b83a9a75a68b875082f8db136d7454d 100644 (file)
@@ -272,7 +272,7 @@ void mips_r4k_init(MachineState *machine)
 
     rtc_init(isa_bus, 2000, NULL);
 
-    pit = pit_init(isa_bus, 0x40, 0, NULL);
+    pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
 
     serial_hds_isa_init(isa_bus, 0, MAX_SERIAL_PORTS);
 
index 5e61ad50a82959e763237794fb4b995bf207db77..dbc4a0baecbcdc5edb27896580525646cd6df5b7 100644 (file)
@@ -23,7 +23,6 @@
  */
 #include "qemu/osdep.h"
 #include "hw/hw.h"
-#include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
 #include "qemu/timer.h"
 #include "hw/timer/i8254.h"
index b623c96198ec5582043353490de36335de157c1b..6190b6fc5d75c63d6993955973f0670d07c8c452 100644 (file)
@@ -24,7 +24,6 @@
  */
 #include "qemu/osdep.h"
 #include "hw/hw.h"
-#include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
 #include "qemu/timer.h"
 #include "hw/timer/i8254.h"
index 5adae9fa449bf7061bd5dbb96511b6fa90023db4..5b12eb918eaa613b57fbf276f9917efcbf82b75c 100644 (file)
@@ -26,6 +26,7 @@
 #define HW_I8254_H
 
 #include "hw/hw.h"
+#include "hw/qdev.h"
 #include "hw/isa/isa.h"
 
 #define PIT_FREQ 1193182
@@ -48,8 +49,8 @@ typedef struct PITChannelInfo {
 #define TYPE_I8254 "isa-pit"
 #define TYPE_KVM_I8254 "kvm-pit"
 
-static inline ISADevice *pit_init(ISABus *bus, int base, int isa_irq,
-                                  qemu_irq alt_irq)
+static inline ISADevice *i8254_pit_init(ISABus *bus, int base, int isa_irq,
+                                        qemu_irq alt_irq)
 {
     DeviceState *dev;
     ISADevice *d;
index dc09cc0467989d64de1e95dfd5aca1bcb65efc10..c37a438f82e293733db3d87853d392a7e6b5e50e 100644 (file)
@@ -26,8 +26,8 @@
 #define QEMU_I8254_INTERNAL_H
 
 #include "hw/hw.h"
-#include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
+#include "qemu/timer.h"
 
 typedef struct PITChannelState {
     int count; /* can be 65536 */