spapr: Expose the name of the interrupt controller node
[qemu/ar7.git] / include / hw / ppc / pnv_lpc.h
blobd657489b07ce21dcadc01e540d444f02c64159e6
1 /*
2 * QEMU PowerPC PowerNV LPC controller
4 * Copyright (c) 2016, IBM Corporation.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 #ifndef _PPC_PNV_LPC_H
20 #define _PPC_PNV_LPC_H
22 #include "hw/ppc/pnv_psi.h"
24 #define TYPE_PNV_LPC "pnv-lpc"
25 #define PNV_LPC(obj) \
26 OBJECT_CHECK(PnvLpcController, (obj), TYPE_PNV_LPC)
28 typedef struct PnvLpcController {
29 DeviceState parent;
31 uint64_t eccb_stat_reg;
32 uint32_t eccb_data_reg;
34 /* OPB bus */
35 MemoryRegion opb_mr;
36 AddressSpace opb_as;
38 /* ISA IO and Memory space */
39 MemoryRegion isa_io;
40 MemoryRegion isa_mem;
41 MemoryRegion isa_fw;
43 /* Windows from OPB to ISA (aliases) */
44 MemoryRegion opb_isa_io;
45 MemoryRegion opb_isa_mem;
46 MemoryRegion opb_isa_fw;
48 /* Registers */
49 MemoryRegion lpc_hc_regs;
50 MemoryRegion opb_master_regs;
52 /* OPB Master LS registers */
53 uint32_t opb_irq_stat;
54 uint32_t opb_irq_mask;
55 uint32_t opb_irq_pol;
56 uint32_t opb_irq_input;
58 /* LPC HC registers */
59 uint32_t lpc_hc_fw_seg_idsel;
60 uint32_t lpc_hc_fw_rd_acc_size;
61 uint32_t lpc_hc_irqser_ctrl;
62 uint32_t lpc_hc_irqmask;
63 uint32_t lpc_hc_irqstat;
64 uint32_t lpc_hc_error_addr;
66 /* XSCOM registers */
67 MemoryRegion xscom_regs;
69 /* PSI to generate interrupts */
70 PnvPsi *psi;
71 } PnvLpcController;
73 ISABus *pnv_lpc_isa_create(PnvLpcController *lpc, bool use_cpld, Error **errp);
75 #endif /* _PPC_PNV_LPC_H */