On 19/02/2024 12.45, BALATON Zoltan wrote:
On Mon, 19 Feb 2024, Thomas Huth wrote:
qdev.c is a mixture between IDE bus specific functions and IDE device
functions. Let's split it up to make it more obvious which part is
related to bus handling and which part is related to device handling.
Signed-off-by: Thomas Huth <th...@redhat.com>
---
hw/ide/ide-bus.c | 111 +++++++++++++++++++++++++++++++++++
hw/ide/{qdev.c => ide-dev.c} | 87 +--------------------------
hw/arm/Kconfig | 2 +
hw/ide/Kconfig | 30 ++++++----
hw/ide/meson.build | 3 +-
5 files changed, 134 insertions(+), 99 deletions(-)
create mode 100644 hw/ide/ide-bus.c
rename hw/ide/{qdev.c => ide-dev.c} (78%)
[...]
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 29abe1da29..b372b819a4 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -275,6 +275,8 @@ config SBSA_REF
select USB_XHCI_SYSBUS
select WDT_SBSA
select BOCHS_DISPLAY
+ select IDE_BUS
+ select IDE_DEV
config SABRELITE
bool
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index b93d6743d5..6dfc5a2129 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -1,51 +1,58 @@
config IDE_CORE
bool
-config IDE_QDEV
+config IDE_BUS
bool
select IDE_CORE
Maybe we can assume if something has an IDE bus it also wants to connect IDE
devices to it so just select IDE_DEV here and not at every place IDE_BUS is
selected? Or is there a place that only wants IDE_BUS?
Currently not, but I think it's conceptually much cleaner if we are explicit
here.
Thomas