hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h'
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 9 Feb 2023 22:33:35 +0000 (23:33 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 27 Feb 2023 21:29:02 +0000 (22:29 +0100)
ide_get_geometry() and ide_get_bios_chs_trans() are only
used by the TYPE_PC_MACHINE.
"hw/ide.h" is a mixed bag of lost IDE declarations. In order
to remove this (almost) pointless header soon, move these
declarations to "hw/ide/internal.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230220091358.17038-18-philmd@linaro.org>

hw/i386/pc.c
include/hw/ide.h
include/hw/ide/internal.h

index 98c2becc1190e890ab36c6d15b87a2b544414b0b..992951c107bd58c73f843691fe818e7a4758b30d 100644 (file)
@@ -33,7 +33,8 @@
 #include "hw/i386/vmport.h"
 #include "sysemu/cpus.h"
 #include "hw/block/fdc.h"
-#include "hw/ide.h"
+#include "hw/ide/internal.h"
+#include "hw/ide/isa.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci-bridge/pci_expander_bridge.h"
index 24a7aa2925803600b8f54e78d98b262a54029082..db963bdb770697770aa0720d4f8594f4a6f21e6f 100644 (file)
@@ -3,10 +3,6 @@
 
 #include "exec/memory.h"
 
-int ide_get_geometry(BusState *bus, int unit,
-                     int16_t *cyls, int8_t *heads, int8_t *secs);
-int ide_get_bios_chs_trans(BusState *bus, int unit);
-
 /* ide/core.c */
 void ide_drive_get(DriveInfo **hd, int max_bus);
 
index c2b794150fd77f14934511b632b25d5e72b2ac1d..d9f1f77dd504442ec3ab3171d6155a199a1d4593 100644 (file)
@@ -647,6 +647,10 @@ void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev,
                   int bus_id, int max_units);
 IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive);
 
+int ide_get_geometry(BusState *bus, int unit,
+                     int16_t *cyls, int8_t *heads, int8_t *secs);
+int ide_get_bios_chs_trans(BusState *bus, int unit);
+
 int ide_handle_rw_error(IDEState *s, int error, int op);
 
 #endif /* HW_IDE_INTERNAL_H */