This is a part of patchset where FSI bus is introduced. The FSI bus is a simple bus where FSI master is attached.
[ clg: - removed include/hw/fsi/engine-scratchpad.h and hw/fsi/engine-scratchpad.c - dropped FSI_SCRATCHPAD - included FSIBus definition - dropped hw/fsi/trace-events changes ] Signed-off-by: Andrew Jeffery <and...@aj.id.au> Signed-off-by: Cédric Le Goater <c...@kaod.org> Signed-off-by: Ninad Palsule <ni...@linux.ibm.com> --- include/hw/fsi/fsi.h | 19 +++++++++++++++++++ hw/fsi/fsi.c | 22 ++++++++++++++++++++++ hw/fsi/Kconfig | 3 +++ hw/fsi/meson.build | 1 + 4 files changed, 45 insertions(+) create mode 100644 include/hw/fsi/fsi.h create mode 100644 hw/fsi/fsi.c diff --git a/include/hw/fsi/fsi.h b/include/hw/fsi/fsi.h new file mode 100644 index 0000000000..a75e3e5bdc --- /dev/null +++ b/include/hw/fsi/fsi.h @@ -0,0 +1,19 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * Copyright (C) 2023 IBM Corp. + * + * IBM Flexible Service Interface + */ +#ifndef FSI_FSI_H +#define FSI_FSI_H + +#include "hw/qdev-core.h" + +#define TYPE_FSI_BUS "fsi.bus" +OBJECT_DECLARE_SIMPLE_TYPE(FSIBus, FSI_BUS) + +typedef struct FSIBus { + BusState bus; +} FSIBus; + +#endif diff --git a/hw/fsi/fsi.c b/hw/fsi/fsi.c new file mode 100644 index 0000000000..8dca472bc3 --- /dev/null +++ b/hw/fsi/fsi.c @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * Copyright (C) 2023 IBM Corp. + * + * IBM Flexible Service Interface + */ +#include "qemu/osdep.h" + +#include "hw/fsi/fsi.h" + +static const TypeInfo fsi_bus_info = { + .name = TYPE_FSI_BUS, + .parent = TYPE_BUS, + .instance_size = sizeof(FSIBus), +}; + +static void fsi_bus_register_types(void) +{ + type_register_static(&fsi_bus_info); +} + +type_init(fsi_bus_register_types); diff --git a/hw/fsi/Kconfig b/hw/fsi/Kconfig index e650c660f0..f4869c209f 100644 --- a/hw/fsi/Kconfig +++ b/hw/fsi/Kconfig @@ -1,2 +1,5 @@ +config FSI + bool + config FSI_LBUS bool diff --git a/hw/fsi/meson.build b/hw/fsi/meson.build index 4074d3a7d2..487fb31cbc 100644 --- a/hw/fsi/meson.build +++ b/hw/fsi/meson.build @@ -1 +1,2 @@ system_ss.add(when: 'CONFIG_FSI_LBUS', if_true: files('lbus.c')) +system_ss.add(when: 'CONFIG_FSI', if_true: files('fsi.c')) -- 2.39.2