xref: /openbmc/qemu/include/hw/fsi/lbus.h (revision 88f5ed70)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Copyright (C) 2024 IBM Corp.
4  *
5  * IBM Local bus and connected device structures.
6  */
7 #ifndef FSI_LBUS_H
8 #define FSI_LBUS_H
9 
10 #include "hw/qdev-core.h"
11 #include "qemu/units.h"
12 #include "exec/memory.h"
13 
14 #define TYPE_FSI_LBUS_DEVICE "fsi.lbus.device"
15 OBJECT_DECLARE_SIMPLE_TYPE(FSILBusDevice, FSI_LBUS_DEVICE)
16 
17 typedef struct FSILBusDevice {
18     DeviceState parent;
19 
20     MemoryRegion iomem;
21 } FSILBusDevice;
22 
23 #define TYPE_FSI_LBUS "fsi.lbus"
24 OBJECT_DECLARE_SIMPLE_TYPE(FSILBus, FSI_LBUS)
25 
26 typedef struct FSILBus {
27     BusState bus;
28 
29     MemoryRegion mr;
30 } FSILBus;
31 
32 #define TYPE_FSI_SCRATCHPAD "fsi.scratchpad"
33 #define SCRATCHPAD(obj) OBJECT_CHECK(FSIScratchPad, (obj), TYPE_FSI_SCRATCHPAD)
34 
35 #define FSI_SCRATCHPAD_NR_REGS 4
36 
37 typedef struct FSIScratchPad {
38         FSILBusDevice parent;
39 
40         uint32_t regs[FSI_SCRATCHPAD_NR_REGS];
41 } FSIScratchPad;
42 
43 #endif /* FSI_LBUS_H */
44