target/loongarch: Drop tcg_temp_free
[qemu/ar7.git] / hw / pci-host / pnv_phb.h
blobeb429d529f88c2c81e21ae0371d34a3448acddbb
1 /*
2 * QEMU PowerPC PowerNV Proxy PHB model
4 * Copyright (c) 2022, IBM Corporation.
6 * This code is licensed under the GPL version 2 or later. See the
7 * COPYING file in the top-level directory.
8 */
10 #ifndef PCI_HOST_PNV_PHB_H
11 #define PCI_HOST_PNV_PHB_H
13 #include "hw/pci/pcie_host.h"
14 #include "hw/pci/pcie_port.h"
15 #include "hw/ppc/pnv.h"
16 #include "qom/object.h"
18 typedef struct PnvPhb4PecState PnvPhb4PecState;
20 struct PnvPHB {
21 PCIExpressHost parent_obj;
23 uint32_t chip_id;
24 uint32_t phb_id;
25 uint32_t version;
26 char bus_path[8];
28 PnvChip *chip;
30 PnvPhb4PecState *pec;
32 /* The PHB backend (PnvPHB3, PnvPHB4 ...) being used */
33 Object *backend;
36 #define TYPE_PNV_PHB "pnv-phb"
37 OBJECT_DECLARE_SIMPLE_TYPE(PnvPHB, PNV_PHB)
40 * PHB PCIe Root port
42 #define PNV_PHB3_DEVICE_ID 0x03dc
43 #define PNV_PHB4_DEVICE_ID 0x04c1
44 #define PNV_PHB5_DEVICE_ID 0x0652
46 typedef struct PnvPHBRootPort {
47 PCIESlot parent_obj;
49 uint32_t version;
50 } PnvPHBRootPort;
52 #define TYPE_PNV_PHB_ROOT_PORT "pnv-phb-root-port"
53 OBJECT_DECLARE_SIMPLE_TYPE(PnvPHBRootPort, PNV_PHB_ROOT_PORT)
55 #endif /* PCI_HOST_PNV_PHB_H */