@@ -60,22 +60,6 @@
#define HPET_TN_INT_ROUTE_CAP_SHIFT 32
#define HPET_TN_CFG_BITS_READONLY_OR_RESERVED 0xffff80b1U
-struct hpet_fw_entry
-{
- uint32_t event_timer_block_id;
- uint64_t address;
- uint16_t min_tick;
- uint8_t page_prot;
-} QEMU_PACKED;
-
-struct hpet_fw_config
-{
- uint8_t count;
- struct hpet_fw_entry hpet[8];
-} QEMU_PACKED;
-
-extern struct hpet_fw_config hpet_cfg;
-
#define TYPE_HPET "hpet"
#define HPET_INTCAP "hpet-intcap"
@@ -41,6 +41,20 @@
#include "qom/object.h"
#include "trace.h"
+struct hpet_fw_entry
+{
+ uint32_t event_timer_block_id;
+ uint64_t address;
+ uint16_t min_tick;
+ uint8_t page_prot;
+} QEMU_PACKED;
+
+struct hpet_fw_config
+{
+ uint8_t count;
+ struct hpet_fw_entry hpet[8];
+} QEMU_PACKED;
+
#define HPET_MSI_SUPPORT 0
OBJECT_DECLARE_SIMPLE_TYPE(HPETState, HPET)
@@ -87,7 +101,7 @@ struct HPETState {
uint8_t hpet_id; /* instance id */
};
-struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
+static struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
static uint32_t hpet_in_legacy_mode(HPETState *s)
{
Now than hpet_cfg[] is only accessed within hpet.c, make it static. No need to expose the hpet_fw_entry/hpet_fw_config structure declarations outside of it, so move them in the source too. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/timer/hpet.h | 16 ---------------- hw/timer/hpet.c | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 17 deletions(-)