2 * QEMU PowerPC 405 shared definitions
4 * Copyright (c) 2007 Jocelyn Mayer
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:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
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
28 #include "qom/object.h"
29 #include "hw/ppc/ppc4xx.h"
30 #include "hw/intc/ppc-uic.h"
31 #include "hw/i2c/ppc4xx_i2c.h"
33 /* PLB to OPB bridge */
34 #define TYPE_PPC405_POB "ppc405-pob"
35 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405PobState
, PPC405_POB
);
36 struct Ppc405PobState
{
37 Ppc4xxDcrDeviceState parent_obj
;
45 #define TYPE_PPC405_OPBA "ppc405-opba"
46 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405OpbaState
, PPC405_OPBA
);
47 struct Ppc405OpbaState
{
48 SysBusDevice parent_obj
;
56 #define TYPE_PPC405_DMA "ppc405-dma"
57 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405DmaState
, PPC405_DMA
);
58 struct Ppc405DmaState
{
59 Ppc4xxDcrDeviceState parent_obj
;
74 #define TYPE_PPC405_GPIO "ppc405-gpio"
75 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405GpioState
, PPC405_GPIO
);
76 struct Ppc405GpioState
{
77 SysBusDevice parent_obj
;
94 #define TYPE_PPC405_OCM "ppc405-ocm"
95 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405OcmState
, PPC405_OCM
);
96 struct Ppc405OcmState
{
97 Ppc4xxDcrDeviceState parent_obj
;
100 MemoryRegion isarc_ram
;
101 MemoryRegion dsarc_ram
;
108 /* General purpose timers */
109 #define TYPE_PPC405_GPT "ppc405-gpt"
110 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405GptState
, PPC405_GPT
);
111 struct Ppc405GptState
{
112 SysBusDevice parent_obj
;
129 #define TYPE_PPC405_CPC "ppc405-cpc"
130 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405CpcState
, PPC405_CPC
);
133 PPC405EP_CPU_CLK
= 0,
134 PPC405EP_PLB_CLK
= 1,
135 PPC405EP_OPB_CLK
= 2,
136 PPC405EP_EBC_CLK
= 3,
137 PPC405EP_MAL_CLK
= 4,
138 PPC405EP_PCI_CLK
= 5,
139 PPC405EP_UART0_CLK
= 6,
140 PPC405EP_UART1_CLK
= 7,
144 struct Ppc405CpcState
{
145 Ppc4xxDcrDeviceState parent_obj
;
148 clk_setup_t clk_setup
[PPC405EP_CLK_NB
];
156 /* Clock and power management */
162 #define TYPE_PPC405_SOC "ppc405-soc"
163 OBJECT_DECLARE_SIMPLE_TYPE(Ppc405SoCState
, PPC405_SOC
);
165 struct Ppc405SoCState
{
167 DeviceState parent_obj
;
175 Ppc405GpioState gpio
;
179 Ppc405OpbaState opba
;
183 Ppc4xxSdramDdrState sdram
;
186 #endif /* PPC405_H */