xref: /openbmc/qemu/include/hw/fsi/cfam.h (revision 0cc14182)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Copyright (C) 2024 IBM Corp.
4  *
5  * IBM Common FRU Access Macro
6  */
7 #ifndef FSI_CFAM_H
8 #define FSI_CFAM_H
9 
10 #include "exec/memory.h"
11 
12 #include "hw/fsi/fsi.h"
13 #include "hw/fsi/lbus.h"
14 
15 #define TYPE_FSI_CFAM "cfam"
16 #define FSI_CFAM(obj) OBJECT_CHECK(FSICFAMState, (obj), TYPE_FSI_CFAM)
17 
18 /* P9-ism */
19 #define CFAM_CONFIG_NR_REGS 0x28
20 
21 typedef struct FSICFAMState {
22     /* < private > */
23     FSISlaveState parent;
24 
25     /* CFAM config address space */
26     MemoryRegion config_iomem;
27 
28     MemoryRegion mr;
29 
30     FSILBus lbus;
31     FSIScratchPad scratchpad;
32 } FSICFAMState;
33 
34 #endif /* FSI_CFAM_H */
35