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 /* TODO: Maybe unwind this dependency with const links? Store a pointer in 13 * FSIBus? 14 */ 15 #include "hw/fsi/cfam.h" 16 17 #define TYPE_FSI_BUS "fsi.bus" 18 #define FSI_BUS(obj) OBJECT_CHECK(FSIBus, (obj), TYPE_FSI_BUS) 19 #define FSI_BUS_CLASS(klass) OBJECT_CLASS_CHECK(FSIBusClass, (klass), TYPE_FSI_BUS) 20 #define FSI_BUS_GET_CLASS(obj) OBJECT_GET_CLASS(FSIBusClass, (obj), TYPE_FSI_BUS) 21 22 /* TODO: Figure out what's best with a point-to-point bus */ 23 typedef struct FSISlaveState FSISlaveState; 24 25 typedef struct FSIBus { 26 BusState bus; 27 28 /* XXX: It's point-to-point, just instantiate the slave directly for now */ 29 CFAMState slave; 30 } FSIBus; 31 32 #endif 33