Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / ppc / pnv_i2c.h
blob1a37730f1e5f0ac000ab6a0a38d80356eb418873
1 /*
2 * QEMU PowerPC PowerNV Processor I2C model
4 * Copyright (c) 2019-2023, IBM Corporation.
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef PPC_PNV_I2C_H
10 #define PPC_PNV_I2C_H
12 #include "hw/ppc/pnv.h"
13 #include "hw/i2c/i2c.h"
14 #include "qemu/fifo8.h"
16 #define TYPE_PNV_I2C "pnv-i2c"
17 #define PNV_I2C(obj) OBJECT_CHECK(PnvI2C, (obj), TYPE_PNV_I2C)
19 #define PNV_I2C_REGS 0x20
21 typedef struct PnvI2C {
22 DeviceState parent;
24 struct PnvChip *chip;
26 qemu_irq psi_irq;
28 uint64_t regs[PNV_I2C_REGS];
29 uint32_t engine;
30 uint32_t num_busses;
31 I2CBus **busses;
33 MemoryRegion xscom_regs;
35 Fifo8 fifo;
36 } PnvI2C;
38 #endif /* PPC_PNV_I2C_H */