ca782334cb
This is a part of patchset where IBM's Flexible Service Interface is introduced. The scratchpad provides a set of non-functional registers. The firmware is free to use them, hardware does not support any special management support. The scratchpad registers can be read or written from LBUS slave. The scratch pad is managed under FSI CFAM state. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> [ clg: - moved object FSIScratchPad under FSICFAMState - moved FSIScratchPad code under cfam.c ] Signed-off-by: Cédric Le Goater <clg@kaod.org>
44 lines
925 B
C
44 lines
925 B
C
/*
|
|
* 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 */
|