hw/timer: Move HPET_INTCAP definition to "hpet.h"

HPET_INTCAP is specific to TYPE_HPET, so define it there.
hpet.c doesn't need to include "hw/i386/pc.h" anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Luc Michel <luc.michel@amd.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Philippe Mathieu-Daudé 2024-02-13 13:01:47 +01:00 committed by Michael Tokarev
parent 22942c1060
commit e62f8ffb29
3 changed files with 2 additions and 3 deletions

View File

@ -25,7 +25,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "hw/i386/pc.h"
#include "hw/irq.h" #include "hw/irq.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"

View File

@ -15,8 +15,6 @@
#include "hw/firmware/smbios.h" #include "hw/firmware/smbios.h"
#include "hw/cxl/cxl.h" #include "hw/cxl/cxl.h"
#define HPET_INTCAP "hpet-intcap"
/** /**
* PCMachineState: * PCMachineState:
* @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling * @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling

View File

@ -78,6 +78,8 @@ extern struct hpet_fw_config hpet_cfg;
#define TYPE_HPET "hpet" #define TYPE_HPET "hpet"
#define HPET_INTCAP "hpet-intcap"
static inline bool hpet_find(void) static inline bool hpet_find(void)
{ {
return object_resolve_path_type("", TYPE_HPET, NULL); return object_resolve_path_type("", TYPE_HPET, NULL);