xref: /openbmc/qemu/include/hw/fsi/fsi-master.h (revision 7d87775f)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Copyright (C) 2024 IBM Corp.
4  *
5  * IBM Flexible Service Interface Master
6  */
7 #ifndef FSI_FSI_MASTER_H
8 #define FSI_FSI_MASTER_H
9 
10 #include "exec/memory.h"
11 #include "hw/qdev-core.h"
12 #include "hw/fsi/fsi.h"
13 #include "hw/fsi/cfam.h"
14 
15 #define TYPE_FSI_MASTER "fsi.master"
16 OBJECT_DECLARE_SIMPLE_TYPE(FSIMasterState, FSI_MASTER)
17 
18 #define FSI_MASTER_NR_REGS ((0x2e0 >> 2) + 1)
19 
20 typedef struct FSIMasterState {
21     DeviceState parent;
22     MemoryRegion iomem;
23     MemoryRegion opb2fsi;
24 
25     FSIBus bus;
26 
27     uint32_t regs[FSI_MASTER_NR_REGS];
28     FSICFAMState cfam;
29 } FSIMasterState;
30 
31 
32 #endif /* FSI_FSI_H */
33