[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/11] config: fix compile for CONFIG_FDC=n
From: |
David Ahern |
Subject: |
[Qemu-devel] [PATCH 09/11] config: fix compile for CONFIG_FDC=n |
Date: |
Fri, 14 Jan 2011 12:12:19 -0700 |
Signed-off-by: David Ahern <address@hidden>
---
hw/pc.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 11b570f..b50bbc4 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -191,6 +191,7 @@ static void pic_irq_request(void *opaque, int irq, int
level)
#define REG_EQUIPMENT_BYTE 0x14
+#ifdef CONFIG_FDC
static int cmos_get_fd_drive_type(int fd0)
{
int val;
@@ -214,6 +215,7 @@ static int cmos_get_fd_drive_type(int fd0)
}
return val;
}
+#endif
static void cmos_init_hd(int type_ofs, int info_ofs, BlockDriverState *hd,
ISADevice *s)
@@ -335,7 +337,9 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t
above_4g_mem_size,
FDCtrl *floppy_controller, ISADevice *s)
{
int val;
+#ifdef CONFIG_FDC
int fd0, fd1, nb;
+#endif
static pc_cmos_init_late_arg arg;
/* various important CMOS locations needed by PC/Bochs bios */
@@ -376,6 +380,7 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t
above_4g_mem_size,
exit(1);
}
+#ifdef CONFIG_FDC
/* floppy type */
fd0 = fdctrl_get_drive_type(floppy_controller, 0);
@@ -400,6 +405,9 @@ void pc_cmos_init(ram_addr_t ram_size, ram_addr_t
above_4g_mem_size,
val |= 0x41; /* 2 drives, ready for boot */
break;
}
+#else
+ val = 0;
+#endif
val |= 0x02; /* FPU is there */
val |= 0x04; /* PS/2 mouse installed */
rtc_set_memory(s, REG_EQUIPMENT_BYTE, val);
@@ -1162,7 +1170,9 @@ void pc_basic_device_init(qemu_irq *isa_irq,
for(i = 0; i < MAX_FD; i++) {
fd[i] = drive_get(IF_FLOPPY, 0, i);
}
+#ifdef CONFIG_FDC
*floppy_controller = fdctrl_init_isa(fd);
+#endif
}
void pc_pci_device_init(PCIBus *pci_bus)
--
1.7.3.4
- Re: [Qemu-devel] [PATCH 02/11] config: settings from default-configs need to be included in header files, (continued)
[Qemu-devel] [PATCH 03/11] config: fix compile for CONFIG_VMWARE_VGA=n, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 04/11] config: fix compile for CONFIG_PARALLEL=n, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 06/11] config: fix compile for CONFIG_NE2000_ISA=n, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 05/11] remove unused parallel_* variables from pc.c, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 07/11] config: handle CONFIG_VGA_ISA=n, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 08/11] config: fix compile for CONFIG_IDE_ISA=n, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 09/11] config: fix compile for CONFIG_FDC=n,
David Ahern <=
[Qemu-devel] [PATCH 10/11] config: add CONFIG_APPLESMC, David Ahern, 2011/01/14
[Qemu-devel] [PATCH 11/11] config: allow none as a configure option to disable all sound cards, David Ahern, 2011/01/14