xref: /openbmc/qemu/include/hw/fsi/fsi.h (revision dbfd61ce579af0f57c8be9099c03e1c5553df00c)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Copyright (C) 2019 IBM Corp.
4  *
5  * IBM On-Chip Peripheral Bus
6  */
7 #ifndef FSI_FSI_H
8 #define FSI_FSI_H
9 
10 #include "hw/qdev-core.h"
11 
12 /*
13  * TODO: Maybe unwind this dependency with const links? Store a
14  * pointer in FSIBus?
15  */
16 #include "hw/fsi/cfam.h"
17 
18 #define TYPE_FSI_BUS "fsi.bus"
19 #define FSI_BUS(obj) OBJECT_CHECK(FSIBus, (obj), TYPE_FSI_BUS)
20 #define FSI_BUS_CLASS(klass) \
21     OBJECT_CLASS_CHECK(FSIBusClass, (klass), TYPE_FSI_BUS)
22 #define FSI_BUS_GET_CLASS(obj) \
23     OBJECT_GET_CLASS(FSIBusClass, (obj), TYPE_FSI_BUS)
24 
25 /* TODO: Figure out what's best with a point-to-point bus */
26 typedef struct FSISlaveState FSISlaveState;
27 
28 typedef struct FSIBus {
29     BusState bus;
30 
31     /* XXX: It's point-to-point, just instantiate the slave directly for now */
32     CFAMState slave;
33 } FSIBus;
34 
35 #endif
36