aboutsummaryrefslogtreecommitdiff
path: root/include/hw/fsi/lbus.h
blob: 558268c013f583d505bdaff5dc4898d0152bc6f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright (C) 2024 IBM Corp.
 *
 * IBM Local bus and connected device structures.
 */
#ifndef FSI_LBUS_H
#define FSI_LBUS_H

#include "hw/qdev-core.h"
#include "qemu/units.h"
#include "exec/memory.h"

#define TYPE_FSI_LBUS_DEVICE "fsi.lbus.device"
OBJECT_DECLARE_SIMPLE_TYPE(FSILBusDevice, FSI_LBUS_DEVICE)

typedef struct FSILBusDevice {
    DeviceState parent;

    MemoryRegion iomem;
} FSILBusDevice;

#define TYPE_FSI_LBUS "fsi.lbus"
OBJECT_DECLARE_SIMPLE_TYPE(FSILBus, FSI_LBUS)

typedef struct FSILBus {
    BusState bus;

    MemoryRegion mr;
} FSILBus;

#define TYPE_FSI_SCRATCHPAD "fsi.scratchpad"
#define SCRATCHPAD(obj) OBJECT_CHECK(FSIScratchPad, (obj), TYPE_FSI_SCRATCHPAD)

#define FSI_SCRATCHPAD_NR_REGS 4

typedef struct FSIScratchPad {
        FSILBusDevice parent;

        uint32_t regs[FSI_SCRATCHPAD_NR_REGS];
} FSIScratchPad;

#endif /* FSI_LBUS_H */