2 * QEMU PowerPC PowerNV Emulation of some CHIPTOD behaviour
4 * Copyright (c) 2022-2023, IBM Corporation.
6 * SPDX-License-Identifier: GPL-2.0-or-later
9 #ifndef PPC_PNV_CHIPTOD_H
10 #define PPC_PNV_CHIPTOD_H
12 #include "qom/object.h"
14 #define TYPE_PNV_CHIPTOD "pnv-chiptod"
15 OBJECT_DECLARE_TYPE(PnvChipTOD
, PnvChipTODClass
, PNV_CHIPTOD
)
16 #define TYPE_PNV9_CHIPTOD TYPE_PNV_CHIPTOD "-POWER9"
17 DECLARE_INSTANCE_CHECKER(PnvChipTOD
, PNV9_CHIPTOD
, TYPE_PNV9_CHIPTOD
)
18 #define TYPE_PNV10_CHIPTOD TYPE_PNV_CHIPTOD "-POWER10"
19 DECLARE_INSTANCE_CHECKER(PnvChipTOD
, PNV10_CHIPTOD
, TYPE_PNV10_CHIPTOD
)
28 typedef struct PnvCore PnvCore
;
34 MemoryRegion xscom_regs
;
38 enum tod_state tod_state
;
40 uint64_t pss_mss_ctrl_reg
;
41 PnvCore
*slave_pc_target
;
44 struct PnvChipTODClass
{
45 DeviceClass parent_class
;
47 void (*broadcast_ttype
)(PnvChipTOD
*sender
, uint32_t trigger
);
48 PnvCore
*(*tx_ttype_target
)(PnvChipTOD
*chiptod
, uint64_t val
);
53 #endif /* PPC_PNV_CHIPTOD_H */