summaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-05-14 16:29:17 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-05-15 16:21:49 +0000
commit1d914fa0af66024faee8cc6fa3043a935f95f775 (patch)
tree76fe5f88cb67e1f4e5f322fda4c44eb81b3a4859 /hw/pc.c
parente1460e4707cd80982add597f5cb421289db84e4e (diff)
rtc: make rtc_xxx accept/return ISADevice instead of RTCState.
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice instead of RTCState. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 4f650498c..20dc7fdb5 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -34,6 +34,7 @@
#include "loader.h"
#include "elf.h"
#include "multiboot.h"
+#include "mc146818rtc.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
@@ -192,7 +193,7 @@ static int cmos_get_fd_drive_type(int fd0)
}
static void cmos_init_hd(int type_ofs, int info_ofs, BlockDriverState *hd,
- RTCState *s)
+ ISADevice *s)
{
int cylinders, heads, sectors;
bdrv_get_geometry_hint(hd, &cylinders, &heads, &sectors);
@@ -225,7 +226,7 @@ static int boot_device2nibble(char boot_device)
return 0;
}
-static int set_boot_dev(RTCState *s, const char *boot_device, int fd_bootchk)
+static int set_boot_dev(ISADevice *s, const char *boot_device, int fd_bootchk)
{
#define PC_MAX_BOOT_DEVICES 3
int nbds, bds[3] = { 0, };
@@ -257,7 +258,7 @@ static int pc_boot_set(void *opaque, const char *boot_device)
/* hd_table must contain 4 block drivers */
void pc_cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
const char *boot_device, DriveInfo **hd_table,
- FDCtrl *floppy_controller, RTCState *s)
+ FDCtrl *floppy_controller, ISADevice *s)
{
int val;
int fd0, fd1, nb;
@@ -752,7 +753,7 @@ int cpu_is_bsp(CPUState *env)
BIOS will read it and start S3 resume at POST Entry */
void pc_cmos_set_s3_resume(void *opaque, int irq, int level)
{
- RTCState *s = opaque;
+ ISADevice *s = opaque;
if (level) {
rtc_set_memory(s, 0xF, 0xFE);
@@ -929,7 +930,7 @@ void pc_vga_init(PCIBus *pci_bus)
void pc_basic_device_init(qemu_irq *isa_irq,
FDCtrl **floppy_controller,
- RTCState **rtc_state)
+ ISADevice **rtc_state)
{
int i;
DriveInfo *fd[MAX_FD];