]> git.ipfire.org Git - thirdparty/qemu.git/blame - include/hw/pci-host/uninorth.h
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
[thirdparty/qemu.git] / include / hw / pci-host / uninorth.h
CommitLineData
5d2eaa02
MCA
1/*
2 * QEMU Uninorth PCI host (for all Mac99 and newer machines)
3 *
4 * Copyright (c) 2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25#ifndef UNINORTH_H
26#define UNINORTH_H
27
ec150c7e 28#include "hw/pci/pci_host.h"
e7755cc1 29#include "hw/ppc/openpic.h"
db1015e9 30#include "qom/object.h"
e7755cc1 31
45fefe7c
MCA
32/* UniNorth version */
33#define UNINORTH_VERSION_10A 0x7
34
5d2eaa02
MCA
35#define TYPE_UNI_NORTH_PCI_HOST_BRIDGE "uni-north-pci-pcihost"
36#define TYPE_UNI_NORTH_AGP_HOST_BRIDGE "uni-north-agp-pcihost"
37#define TYPE_UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE "uni-north-internal-pci-pcihost"
38#define TYPE_U3_AGP_HOST_BRIDGE "u3-agp-pcihost"
39
db1015e9 40typedef struct UNINHostState UNINHostState;
8110fa1d
EH
41DECLARE_INSTANCE_CHECKER(UNINHostState, UNI_NORTH_PCI_HOST_BRIDGE,
42 TYPE_UNI_NORTH_PCI_HOST_BRIDGE)
43DECLARE_INSTANCE_CHECKER(UNINHostState, UNI_NORTH_AGP_HOST_BRIDGE,
44 TYPE_UNI_NORTH_AGP_HOST_BRIDGE)
45DECLARE_INSTANCE_CHECKER(UNINHostState, UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE,
46 TYPE_UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE)
47DECLARE_INSTANCE_CHECKER(UNINHostState, U3_AGP_HOST_BRIDGE,
48 TYPE_U3_AGP_HOST_BRIDGE)
5d2eaa02 49
db1015e9 50struct UNINHostState {
5d2eaa02
MCA
51 PCIHostState parent_obj;
52
03756c84 53 uint32_t ofw_addr;
e7755cc1
MCA
54 OpenPICState *pic;
55 qemu_irq irqs[4];
5d2eaa02
MCA
56 MemoryRegion pci_mmio;
57 MemoryRegion pci_hole;
e226efbb 58 MemoryRegion pci_io;
db1015e9 59};
5d2eaa02 60
db1015e9 61struct UNINState {
0662946a
MCA
62 SysBusDevice parent_obj;
63
64 MemoryRegion mem;
db1015e9 65};
0662946a
MCA
66
67#define TYPE_UNI_NORTH "uni-north"
8063396b 68OBJECT_DECLARE_SIMPLE_TYPE(UNINState, UNI_NORTH)
0662946a 69
5d2eaa02 70#endif /* UNINORTH_H */