pcihp: compose PCNT callchain right before its user _GPE._E01
[qemu.git] / include / hw / misc / allwinner-a10-ccm.h
blob7f22532efaaa2a4e2f77836e99e889c090e3ca89
1 /*
2 * Allwinner A10 Clock Control Module emulation
4 * Copyright (C) 2022 Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
6 * This file is derived from Allwinner H3 CCU,
7 * by Niek Linnenbank.
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef HW_MISC_ALLWINNER_A10_CCM_H
24 #define HW_MISC_ALLWINNER_A10_CCM_H
26 #include "qom/object.h"
27 #include "hw/sysbus.h"
29 /**
30 * @name Constants
31 * @{
34 /** Size of register I/O address space used by CCM device */
35 #define AW_A10_CCM_IOSIZE (0x400)
37 /** Total number of known registers */
38 #define AW_A10_CCM_REGS_NUM (AW_A10_CCM_IOSIZE / sizeof(uint32_t))
40 /** @} */
42 /**
43 * @name Object model
44 * @{
47 #define TYPE_AW_A10_CCM "allwinner-a10-ccm"
48 OBJECT_DECLARE_SIMPLE_TYPE(AwA10ClockCtlState, AW_A10_CCM)
50 /** @} */
52 /**
53 * Allwinner A10 CCM object instance state.
55 struct AwA10ClockCtlState {
56 /*< private >*/
57 SysBusDevice parent_obj;
58 /*< public >*/
60 /** Maps I/O registers in physical memory */
61 MemoryRegion iomem;
63 /** Array of hardware registers */
64 uint32_t regs[AW_A10_CCM_REGS_NUM];
67 #endif /* HW_MISC_ALLWINNER_H3_CCU_H */