@@ -162,31 +162,6 @@ static Aml *build_fdinfo_aml(int idx, FloppyDriveType type)
return dev;
}
-int cmos_get_fd_drive_type(FloppyDriveType fd0)
-{
- int val;
-
- switch (fd0) {
- case FLOPPY_DRIVE_TYPE_144:
- /* 1.44 Mb 3"5 drive */
- val = 4;
- break;
- case FLOPPY_DRIVE_TYPE_288:
- /* 2.88 Mb 3"5 drive */
- val = 5;
- break;
- case FLOPPY_DRIVE_TYPE_120:
- /* 1.2 Mb 5"5 drive */
- val = 2;
- break;
- case FLOPPY_DRIVE_TYPE_NONE:
- default:
- val = 0;
- break;
- }
- return val;
-}
-
static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope)
{
Aml *dev;
@@ -98,3 +98,28 @@ FloppyDriveType isa_fdc_get_drive_type(ISADevice *fdc, int i)
return isa->state.drives[i].drive;
}
+
+int cmos_get_fd_drive_type(FloppyDriveType fd0)
+{
+ int val;
+
+ switch (fd0) {
+ case FLOPPY_DRIVE_TYPE_144:
+ /* 1.44 Mb 3"5 drive */
+ val = 4;
+ break;
+ case FLOPPY_DRIVE_TYPE_288:
+ /* 2.88 Mb 3"5 drive */
+ val = 5;
+ break;
+ case FLOPPY_DRIVE_TYPE_120:
+ /* 1.2 Mb 5"5 drive */
+ val = 2;
+ break;
+ case FLOPPY_DRIVE_TYPE_NONE:
+ default:
+ val = 0;
+ break;
+ }
+ return val;
+}
Needed by pc machine init. Move to separate source file so we can keep it in core qemu when building floppy as module. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/block/fdc-isa.c | 25 ------------------------- hw/block/fdc-module.c | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-)